openhab> smarthome:status FibaroEye1Alarm
ON
openhab> smarthome:status FibaroEye1Alarm
ON
openhab> smarthome:status FibaroEye1Alarm
ON
openhab> smarthome:status FibaroEye1Alarm
ON
openhab> smarthome:status FibaroEye1Alarm
ON
openhab> smarthome:status FibaroEye1Alarm
ON
openhab> smarthome:status FibaroEye1Alarm
ON
openhab> smarthome:status FibaroEye1Alarm
ON
openhab>
When I issue the command OFF to the alarm, the lights turn off.
openhab> smarthome:send FibaroEye1Alarm OFF
Command has been sent successfully.
openhab> smarthome:status FibaroEye1Alarm
OFF
openhab> log:tail
First thing is, you were mapping FibaroEye1Motion (with the old sensor_binary) to a Number item, that’s wrong and would have needed to be a Switch as well.
Anyway, you should have changed that meanwhile (from sensor_binary to alarm_motion)
Second, you’re mapping alarm_general to FibaroEye1Alarm and trigger upon that in your rule.
And then you output FibaroEye1Motion to your logs … now that naming mismatch for one is pretty misleading, but more important even it’s nonsense. Not sure if alarm_general is sent on every type of alarm, but clearly you don’t want to trigger on that.
Change your rule to trigger on FibaroEye1Motion (that now should map to alarm_motion).
What a mess…
Change this, wait for OH to accept the item config change, test again, and send your most recent item definitions and logs.
Yes, I changed to a Switch and that turned it ‘ON’ OK.
So my rule would look like this:
rule "FibaroEye1 motion detection turns ON Living Room Lights when Lux is less than 20, with a 2 Minute Inactivity Timer"
when
Item FibaroEye1Motion changed to ON
then
if (FibaroEye1Lux.state < 20) {
if (Eye1_Timer !== null) {
LivingRoomDim1.sendCommand("5")
logInfo("FibaroEye1Motion","Eye1 Timer rescheduled for " + Eye1_TimeOut + " minutes")
Eye1_Timer.reschedule(now.plusMinutes(Eye1_TimeOut))
} else {
logInfo("FibaroEye1Motion", "Eye1 Motion Detected! Turning ON Living Room Lights")
LivingRoomDim1.sendCommand("5")
logInfo("FibaroEye1Motion","Eye1 Timer created with " + Eye1_TimeOut + " minutes")
Eye1_Timer = createTimer(now.plusMinutes(Eye1_TimeOut))
[ |
if (FibaroEye1Motion.state == ON) {
logInfo("FibaroEye1Motion","Eye1 Timer triggered, but rescheduled again for " + Eye1_TimeOut + " minutes")
Eye1_Timer.reschedule(now.plusMinutes(Eye1_TimeOut))
} else {
logInfo("FibaroEye1Motion", "Eye1 No Motion Detected! Turning OFF Living Room Lights")
LivingRoomSw1.sendCommand("OFF")
Eye1_Timer = null
}
]
}
}
end
22:08:18.668 [INFO ] [smarthome.event.ItemStateChangedEvent] - FibaroEye1Lux changed from 0 to 5
22:08:36.789 [INFO ] [smarthome.event.ItemStateChangedEvent] - FibaroEye1Motion changed from ON to OFF
22:09:12.312 [INFO ] [smarthome.event.ItemStateChangedEvent] - OpenHAB_Sensors_CpuTemperature changed from 29.0 to 30.0
22:09:12.314 [INFO ] [smarthome.event.ItemStateChangedEvent] - OpenHAB_Cpu_Load changed from 0.9 to 0.5
22:09:55.678 [INFO ] [arthome.model.script.FibaroEye1Motion] - Eye1 No Motion Detected! Turning OFF Living Room Lights
22:09:55.681 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'LivingRoomSw1' received command OFF
22:10:02.567 [INFO ] [smarthome.event.ItemStateChangedEvent] - FibaroEye1Motion changed from OFF to ON
22:10:02.570 [INFO ] [arthome.model.script.FibaroEye1Motion] - Eye1 Motion Detected! Turning ON Living Room Lights
22:10:02.573 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'LivingRoomDim1' received command 5
22:10:02.573 [INFO ] [arthome.model.script.FibaroEye1Motion] - Eye1 Timer created with 2 minutes
22:10:12.320 [INFO ] [smarthome.event.ItemStateChangedEvent] - OpenHAB_Cpu_Load1 changed from 0.1 to 0.0
22:10:12.326 [INFO ] [smarthome.event.ItemStateChangedEvent] - OpenHAB_Sensors_CpuTemperature changed from 30.0 to 29.0
22:10:12.327 [INFO ] [smarthome.event.ItemStateChangedEvent] - OpenHAB_Cpu_Load changed from 0.5 to 0.4
22:10:33.291 [INFO ] [smarthome.event.ItemStateChangedEvent] - FibaroEye1Motion changed from ON to OFF