Can anyone show me how to accomplish the following code in HAI OmniProII?
I want to setup a timer so that the light in the bedroom goes off after 10 minutes of no motion
Thanks, I would appreciate it.
IF bedroom_motion NOT SECURE THEN
idle_time = 0
ENDIF
IF bedroom_light EQUAL TO ON AND bedroom_motion SECURE THEN
idle_time = idle_time + 1 second
ENDIF
IF idle_time > 600 seconds THEN
bedroom_light = OFF
idle_time = 0
ENDIF
The second IF/ENDIF state might have to change to this:
TIMED EVERY 1 MINUTE
IF bedroom_light EQUAL TO ON AND bedroom_motion SECURE THEN
idle_time = idle_time + 60 seconds
ENDIF
I want to setup a timer so that the light in the bedroom goes off after 10 minutes of no motion
Thanks, I would appreciate it.
IF bedroom_motion NOT SECURE THEN
idle_time = 0
ENDIF
IF bedroom_light EQUAL TO ON AND bedroom_motion SECURE THEN
idle_time = idle_time + 1 second
ENDIF
IF idle_time > 600 seconds THEN
bedroom_light = OFF
idle_time = 0
ENDIF
The second IF/ENDIF state might have to change to this:
TIMED EVERY 1 MINUTE
IF bedroom_light EQUAL TO ON AND bedroom_motion SECURE THEN
idle_time = idle_time + 60 seconds
ENDIF