Announcement

Collapse
No announcement yet.

How to track HS On/Off devices?

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

    How to track HS On/Off devices?

    I'd like to store On/Off events for an appliance module in the DB. I've created a sensor in mcsTemp for this; entered the dev code, set it to a device type of 'switch' and mcsTemp created a discrete table in the DB for it.

    However, after a full day of this module turning on and off, not one transition has been logged.

    Any suggestions?
    Best regards,
    -Mark-

    If you're not out on the edge, you're taking up too much room!
    Interested in 3D maps? Check out my company site: Solid Terrain Modeling

    #2
    I just tried the scenario by identifying P1 on the Sensor Page with a database table name of sP1. I ran a script that toggles the device status of P1 and the following shows in the HS Log when the General Debug is enabled. Do a restart of HS to assure all Sensor Page entries are correlated with HS Status callbacks. Note in the debug output below that the \62 device was not on the Sensor list so no LogDiscrete entry was produced, but it was for P1.

    Code:
    1/13/2008 10:03:00 AM ~!~mcsTemperature Debug~!~Check Device Event \62=2,DictionaryExists=False
    1/13/2008 10:04:08 AM ~!~mcsTemperature Debug~!~Check Device Event P1=3,DictionaryExists=True
    1/13/2008 10:04:08 AM ~!~mcsTemperature Debug~!~LogDiscrete sP1, UseDatabase=True, databaseSchemaIsBeingChanged=False
    1/13/2008 10:04:08 AM ~!~mcsTemperature Debug~!~Log Discrete INSERT INTO sP1 (SampleDate,Discrete) SELECT #2008-01-13 10:04:08 AM# AS QT,0 AS Q1
    1/13/2008 10:04:10 AM ~!~mcsTemperature Debug~!~Check Device Event P1=2,DictionaryExists=True
    1/13/2008 10:04:10 AM ~!~mcsTemperature Debug~!~LogDiscrete sP1, UseDatabase=True, databaseSchemaIsBeingChanged=False
    1/13/2008 10:04:10 AM ~!~mcsTemperature Debug~!~Log Discrete INSERT INTO sP1 (SampleDate,Discrete) SELECT #2008-01-13 10:04:10 AM# AS QT,1 AS Q1
    1/13/2008 10:04:28 AM ~!~mcsTemperature Debug~!~Check Device Event P1=3,DictionaryExists=True
    1/13/2008 10:04:28 AM ~!~mcsTemperature Debug~!~LogDiscrete sP1, UseDatabase=True, databaseSchemaIsBeingChanged=False
    1/13/2008 10:04:28 AM ~!~mcsTemperature Debug~!~Log Discrete INSERT INTO sP1 (SampleDate,Discrete) SELECT #2008-01-13 10:04:28 AM# AS QT,0 AS Q1
    1/13/2008 10:04:30 AM ~!~mcsTemperature Debug~!~Check Device Event P1=2,DictionaryExists=True
    1/13/2008 10:04:30 AM ~!~mcsTemperature Debug~!~LogDiscrete sP1, UseDatabase=True, databaseSchemaIsBeingChanged=False
    1/13/2008 10:04:30 AM ~!~mcsTemperature Debug~!~Log Discrete INSERT INTO sP1 (SampleDate,Discrete) SELECT #2008-01-13 10:04:30 AM# AS QT,1 AS Q1

    Comment


      #3
      Thanks Michael - it was the 'restart HS' to setup the callback that did the trick!
      Best regards,
      -Mark-

      If you're not out on the edge, you're taking up too much room!
      Interested in 3D maps? Check out my company site: Solid Terrain Modeling

      Comment

      Working...
      X