Announcement

Collapse
No announcement yet.

Question on graphing discrete variables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Question on graphing discrete variables

    Some guidance please. Using HS 2.1.104 and mcsTemp 5.2.0.19.

    I have some virtual devices that show the on/off state of HVAC systems. I want to graph these as discrete devices in mcsTemperature.

    They are set up as type Switch. The tables are properly created in mcsTemperature.mdb. No errors found in any logs.

    I am using script like "hs.SetDeviceStatus "v10", 2" to change the device status. The Status page reflects the changes but nothing is logged to the database.

    What am I doing wrong?

    Thanks,
    Ken

    #2
    Enable the General Debug, change a device status, and look in the log for a line containging "Check Device Event " at that point. If it is not present then mcsTemperture is not being called on a status event change. The other information on the debug output line is the device code that changed and if mcsTemperature recognizes this device code as a discrete.

    HS2 has made some event callbacks dependent upon the .misc property setting on a device-by-device basis. I do not know if this is the context of the change or not. If it is then you will need to set/clear the appropriate bits in the .misc property of the device. Here is what I have in my project file

    MISC_SETSTATUS_NOTIFY As Long = &H4000

    which means that status notification is only given when the .misc property has bit 13 (0=lsb) set.

    If you are seeing "Check Device Event " in the log then the callback is happening and you do not need to pursue this second avenue. We just need to see why it is not being loged after the call.

    Comment


      #3
      Ran these two tests with V99

      2/2/2007 3:55:41 PM Info Running script statement immediately: &hs.SetDeviceStatus "V99",2
      2/2/2007 3:55:41 PM mcsTemperature Debug Check Device Event v99=2,DictionaryExists=False

      2/2/2007 3:56:32 PM Info Running script statement immediately: &hs.SetDeviceStatus "V99",3
      2/2/2007 3:56:32 PM mcsTemperature Debug Check Device Event v99=3,DictionaryExists=False

      Ken

      Comment


        #4
        Since I'm asking questions in this vein -

        When I set the sensor type on the mcsTemperature Sensor page, the device type on the HS device setup page goes blank. Any connection?

        Like this:
        Attached Files

        Comment


          #5
          HS2 has some specific functionality that is mapped into DeviceType. There is also IOType which has functionality implications as well. I have a open help desk ticket to explain what the IOType meanings are and as best as I have seen the DeviceType changes result in warnings in the log, but have no significance for mcsTemperaute.

          The problem that we are trying to solve here relates to mcsTemperature not seeing V99 as a discrete when it goes through its initialization of .ini data. I do not have any debug code in that area, but since it shows up as switch on the Sensor page I dont quite understand why it would not show up in the dictionary that is built during each startup/save.

          The mcsTemperature.ini file has a section called [Database]. It will list V99 as a key and contain the fields for database table name and sensor type. The sensor type for Switch is "11". Look in the .ini file and confirm that the line looks something like
          V99=tblV99,11

          If nothting shows up as odd lookiing then I will make a build with debug output in this area.

          Comment


            #6
            In the [Database] section there is the entry

            V99="tblV99,11,1"

            Ken

            Comment


              #7
              I'm uploading 5.2.20 that has debug code, when general debug is enabled, that shows the construction of the dictionary to handle the discrete devices. This will be executed at startup. Just post this initial segment after you run it.

              Comment


                #8
                Here's the whole enchilada.
                Code:
                2/2/2007 11:16:45 PM   mcsTemperature  Version 5.2.20 Registered with Homeseer 
                2/2/2007 11:16:46 PM   COM Plugin  Calling InitIO 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=`1, Database=tbl3500000000A84229S, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=True, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=`2, Database=tbl3500000000A84229S1, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=True, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=`3, Database=tbl3500000000A84229S2, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=True, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=`4, Database=tbl3500000000A84229S3, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=True, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=`65, Database=tbl3500000000A84229Y4, Type=12 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=True, Type=12 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=`66, Database=tbl3500000000A84229Y5, Type=12 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=True, Type=12 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=`67, Database=tbl3500000000A84229Y6, Type=12 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=True, Type=12 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=`68, Database=tbl3500000000A84229Y7, Type=12 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=True, Type=12 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=`5, Database=tblA800000024111981S, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=True, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_22, Database=SolarRadiation, Type=15 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=15 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=[64, Database=RFXtemp01, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=[65, Database=RFXtemp02a, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=[69, Database=RFXtemp02b, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_8, Database=WSoutsidetemp, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_6, Database=WSoutsidehumidity, Type=6 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=6 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_9, Database=WSbarometer, Type=8 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=8 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_2, Database=WSwindspeed, Type=2 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=2 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_5, Database=WSInsidehumidity, Type=6 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=6 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_11, Database=WSdaysrain, Type=4 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=4 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_7, Database=WSinsidetemp, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=0 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_93, Database=LineVoltage, Type=20 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=20 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=_21, Database=WSuvindex, Type=13 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=13 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=V10, Database=tblV10, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Add=V10 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=V11, Database=tblV11, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Add=V11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=V12, Database=tblV12, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Add=V12 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=V13, Database=tblV13, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Add=V13 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=V14, Database=tblV14, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Add=V14 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Group DC=V99, Database=tblV99, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Exists=False, Type=11 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  InitIni Database Dictionary Add=V99 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  Registering Callback Mask 4 
                2/2/2007 11:16:46 PM   mcsTemperature Debug  Internal Timer Started

                Comment


                  #9
                  Hello?

                  Need more information?

                  I would still like to get this working.

                  Comment


                    #10
                    I missed your last response. Thanks for the bump. It looks to be a upper/lower case problem. I fixed that in V5.2.21

                    Comment


                      #11
                      Been running V5.2.21 since late last night. All is working as expected. Am now able to monitor my four heating zones during this sub zero spell. Have already seen a few surprises and reprogrammed thermostats to save a bit of cash.

                      Thanks again.

                      Ken

                      Comment

                      Working...
                      X