Could be possible to describe the following kind of rule in OpenHab?
"Turn the lights off after 5 mins without motion detection in the room?
The rule should consider more than one motion sensor in the room, so the lights should be turned off only if none of the sensors (in my case 3) have detected motion for more than 5 mins.
Can’t test/verify ATM, I’d use a proxy switch item which my expires to OFF after 5 minutes. Each motion sensor should trigger this proxy switch to ON, thereby restarting the 5 minute count.
rule "Turn the lights off after 5 mins without motion detection"
when
Item MotionSensor1 received command or
Item MotionSensor2 received command // Declare here as many as you want
then
if(triggeringItem.state == ON) { // or OPEN
MotionTimer.sendCommand(ON)
}
end
rule "Turn off light when timer is off"
when
MotionTimer received command OFF
then
RoomLight.sendCommand(OFF)
end