Announcement

Collapse
No announcement yet.

Problem with discrete sensors

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

    Problem with discrete sensors

    I am using a trial for v4.25.3. I have defined several analog sensors and have no problem dispaying graphs for them. But I cannot get the digital (discrete) devices to work. I have defined the virtual house codes for existing HS devices that can be turned on/off. Only the first of those appears on the web page, the others values are not shown (although they do appear in the edit menu). The first one only seems to display the current value (it is shown as 1 if the device is on, 0 if off), however the min, max and average are all zeros and no line graph can be displayed. I also see the following error in the HS log:

    Draw CD Chart with Progress 1000 on line 11060 Invalid use of Null

    Any suggestions?

    #2
    Analog sensors are handled together with sampling at a periodic interval. Discrete sensors are handled individually and only processed when the state changes. For those sensors that the plugin manages it will detect a state change and handle it as expected. For virtual devices, however, it does not monitor state changes. The mcsMovement plugin is the one that deals with discrete changes and the two can be linked together so you will be able to have mcsMovement detect a change in a Homeseer device and have mcsTemperature record the event and display charts associated with it. You can also store into mcsTemperature's discrete database via scripting methods.

    I'm only guessing about the null error message, but it is likely a result of an empty table which exists because of the discrete as discussed above.

    Comment


      #3
      ps
      i use virtual devices, and for every devices i create event with small script
      ie
      sub main()
      set mcs = hs.Plugin("mcsTemperature")
      mcs.StoreDiscrete "Foldszint_Occupancy", 1
      end sub
      or
      sub main()
      set mcs = hs.Plugin("mcsTemperature")
      mcs.StoreDiscrete "Foldszint_Occupancy", 0
      end sub

      Comment


        #4
        Droopyear, thank you for the example. I got my devices working too. picta

        Comment


          #5
          Have a nice day

          Comment

          Working...
          X