I’ve been trying last week to get my fibaro motion sensor to fire event if it detects any movement. I know the sensor works because I used it with Fibaro Home Center Lite before I switched to OpenHAB. I’ve tried following rule in both OH and OH2:
import org.openhab.core.library.types.*
import org.openhab.core.persistence.*
import org.openhab.model.script.actions.*
var timer = null
rule "hallway_movement_detection"
when
Item cellar_hallway_movementSensor received update or
Item cellar_hallway_movementSensor changed or
Item cellar_hallway_burglarAlarm received update or
Item cellar_hallway_burglarAlarm changed or
Item cellar_hallway_alarm received update or
Item cellar_hallway_alarm changed
then
logInfo("Källare - Hall", "Rörelse detekterad")
end
I cleared the logs just to be certain I don’t miss the logging but they still remain empty. Tried to make the items both as Contact and Number, none works… Any help would be much appreciated.
I’ll answer this one myself in case someone else as new to openhab as me has the same problem.
I found that the motion association group (group 2) wasn’t set automatically on the motion sensor. So I set it manually in Habmin and after that I realized the only working item type for the motion channel was Switch.
Since I did those two changes everything has been working like a charm.
Hm, that’s strange (at least for me):
my FGMS001 is working fine as contact: Contact FibEye1_Motion_C "Motion Hallway up [%s]" { zwave="3:command=sensor_binary"}
and I only have set the association group “Controller updates” which was done automatically (because in openhab.cfg zwave:masterController = true ).
BUT: I’m using openHAB 1.8.3, so maybe it’s handled differently …