I am trying to get NewDelayedEventForNoEcho working with occupancy and are running in to some issues. What I would like is if the bathroom occupancy has been off for 15 minutes and if the light is still on I would like to turn it off. I setup the below for the On and Off in the Bathroom Occupancy but it still triggers to turn the light off even if Occupancy turns back on. I tried to delete the delayed event in the On UDMC but that does not seem to work properly. I am testing below with just a minute value instead of 15 to ensure that everything works properly
On:
hs.RemoveDelayedEvent("","Turn Off Bathroom Light")
Off:
blradar.NewDelayedEventForNoEcho("Turn Off Bathroom Light", "Bathroom Lightff", 1)
There is what the log looks like when NewDelayedEventForNoEcho has triggered when Occupancy goes off but when I walk back in and the Occupancy goes on it still triggers to turn off the light. Maybe I am not doing something correctly here and any hints/pointers would be greatly appreciated.
3/22/2014 6:50:34 PM ACTIVE ZONE Bathroom Occupancy has changed to Bathroom Zone Off; Bathroom Zone On (3 mins, 38 secs)
3/22/2014 6:50:38 PM ECHO On for Bathroom Motion Sensor; Off (1 mins, 4 secs)
3/22/2014 6:50:38 PM ACTIVE ZONE Bathroom Occupancy has changed to Bathroom Zone On; Bathroom Zone Off (3 secs)
3/22/2014 6:51:00 PM Event Event Trigger "Turn Off Bathroom Light"
3/22/2014 6:51:00 PM Device Control Device: Bathroom Light (\10) OFF
3/22/2014 6:51:00 PM Event Deleting event after run: "BLRadar Delayed Turn Off Bathroom Light"
On:
hs.RemoveDelayedEvent("","Turn Off Bathroom Light")
Off:
blradar.NewDelayedEventForNoEcho("Turn Off Bathroom Light", "Bathroom Lightff", 1)
There is what the log looks like when NewDelayedEventForNoEcho has triggered when Occupancy goes off but when I walk back in and the Occupancy goes on it still triggers to turn off the light. Maybe I am not doing something correctly here and any hints/pointers would be greatly appreciated.
3/22/2014 6:50:34 PM ACTIVE ZONE Bathroom Occupancy has changed to Bathroom Zone Off; Bathroom Zone On (3 mins, 38 secs)
3/22/2014 6:50:38 PM ECHO On for Bathroom Motion Sensor; Off (1 mins, 4 secs)
3/22/2014 6:50:38 PM ACTIVE ZONE Bathroom Occupancy has changed to Bathroom Zone On; Bathroom Zone Off (3 secs)
3/22/2014 6:51:00 PM Event Event Trigger "Turn Off Bathroom Light"
3/22/2014 6:51:00 PM Device Control Device: Bathroom Light (\10) OFF
3/22/2014 6:51:00 PM Event Deleting event after run: "BLRadar Delayed Turn Off Bathroom Light"
Comment