Announcement

Collapse
No announcement yet.

2 devices same value event trigger?

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

    2 devices same value event trigger?

    Is there a way to run a event when 2 sensors get the same value as trigger?
    I know its possible with on/off but now its about temperature sensors inside and outside.
    This way i want to trigger a event that if the outside temperature goes equal to the inside temperature i need to close the windows/doors if sensor says they are open, to keep it cooler inside then outside after letting the colder air in @ night.

    #2
    I've thought about this before, I don't think its possible in the event features currently. In the conditions/triggers you can only have less than/greater than/equal to and then a fixed number or a range - you can't have it <>= to another device value (it would however make a nice feature).

    The way around this is to run a script at a recurring interval, does not need to be a complex script (only a few lines) that checks the two values and then runs an event or some actions for you.

    Comment


      #3
      Actually you might get away without a script with a single line IF statement, try something like this in a recurring event;

      &If hs.devicevalue("T1") >= hs.devicevalue("T2") Then hs.triggerevent "Temp Alarm"

      replacing the device codes/event names/inequalities as applicable

      Comment


        #4
        Tried it and it works great.
        Thanks for the info, great job.

        Comment

        Working...
        X