Turning on the lighting when the motion sensor is triggered from 20:00 to 08:00 and automatically turning off the lighting when there is no movement for 5 seconds


Definition:● Motion Sensor - switch 1● Lighting - out 5● Devices on a single controller (address self)
In this example, the RULE block contains an IF block where:● The value of SWITCH 1 is read (note that is trigger must be enabled for the rule to execute every time the motion sensor changes state).● The current time is checked to see if it falls between 20:00 and 08:00.● These conditions are combined with the AND block, meaning if both conditions are met, the THEN block is executed:OUT 5 is set to a value of 1 (turn on output 5).● Otherwise, if the condition is not met, the code in the ELSE block is executed:Wait for 5000ms (5 seconds) and set OUT 5 to 0 (turn off output 5).

Illustration

Didn’t find the answer to your question?

You can contact the technical support chatbot.Found a mistake on the site? Help us fix it!