Announcement

Collapse
No announcement yet.

What's the difference between state and value

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

    What's the difference between state and value

    What's the difference between device state and device value?

    I'm asking because I recently setup 4 HS-MS100+ motion sensors to control the main lights in my shop. I used the default setting for "motion timeout" which is 10 minutes (600 seconds). I used the events and logic posted by macromark.

    Here's the situation.

    Event #1: Do Things When Motion is Sensed by Either Sensor
    IF Motion Sensor 1 changes and becomes Motion...

    this works if the motion timeout is a few minutes or less, but not if it is the default setting of 10m. "Changes and Becomes..." is a state change

    IF Motion Sensor 1 Motion had its value set to Motion

    this works when the motion timeout is 10m which is the default setting. This is a value change.

    What's the difference between device state and device value?

    #2
    HomeSeer only looks at the Value. Status is verbiage attached to a specific Value but is only used for operator interaction. This thread while specifically addressing Virtual Devices attempts to describe how all the pieces work. Post #3 describes how Status works.

    What you are asking about above has to do with a device’s Value (or Status) changing vs being “set”. The first requires that a device Value (or Status) must be changed in order to be true. The second is true when a Device’s value is set. What this means is that HomeSeer has sent a Value to a Device, even if the Device already has that Value. For example if a light is On and an Event Action sets its Value to On, it is flagged as having been “set”even though the Value remains the same. In this case “changes and becomes” would not Trigger but ‘this device had its value set” would Trigger. Also, a Device is “set’ when changed making that Trigger true in both cases.

    This distinction is especially important with remotes and other central scene devices. Those will “set” a Value each time a button is pressed. You want Events using those devices as a Trigger to run every time a button is pressed, even if it was the same as the previous use.
    HS4 Pro, 4.2.18.3 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      A little late, but Great explanation, This helped a lot! Thanks!

      Comment

      Working...
      X