Plan is to get the Fibaro Motion Sensor via Z-Wave to control the light.
Adding the sensor brings this traces:
2018-01-20 22:36:07.390 [hingStatusInfoChangedEvent] - 'zwave:device:597362ca:node2' changed from UNINITIALIZED to INITIALIZING
2018-01-20 22:36:07.397 [hingStatusInfoChangedEvent] - 'zwave:device:597362ca:node2' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2018-01-20 22:36:07.434 [hingStatusInfoChangedEvent] - 'zwave:device:597362ca:node2' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to UNINITIALIZED
2018-01-20 22:36:07.449 [hingStatusInfoChangedEvent] - 'zwave:device:597362ca:node2' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
2018-01-20 22:36:07.543 [.ItemChannelLinkAddedEvent] - Link 'zwave_device_597362ca_node2_sensor_binary-zwave:device:597362ca:node2:sensor_binary' has been added.
2018-01-20 22:36:07.577 [.ItemChannelLinkAddedEvent] - Link 'zwave_device_597362ca_node2_sensor_temperature-zwave:device:597362ca:node2:sensor_temperature' has been added.
2018-01-20 22:36:07.610 [.ItemChannelLinkAddedEvent] - Link 'zwave_device_597362ca_node2_sensor_seismicintensity-zwave:device:597362ca:node2:sensor_seismicintensity' has been added.
2018-01-20 22:36:07.641 [.ItemChannelLinkAddedEvent] - Link 'zwave_device_597362ca_node2_sensor_luminance-zwave:device:597362ca:node2:sensor_luminance' has been added.
2018-01-20 22:36:07.672 [.ItemChannelLinkAddedEvent] - Link 'zwave_device_597362ca_node2_alarm_motion-zwave:device:597362ca:node2:alarm_motion' has been added.
2018-01-20 22:36:07.701 [.ItemChannelLinkAddedEvent] - Link 'zwave_device_597362ca_node2_alarm_tamper-zwave:device:597362ca:node2:alarm_tamper' has been added.
2018-01-20 22:36:07.730 [.ItemChannelLinkAddedEvent] - Link 'zwave_device_597362ca_node2_battery_level-zwave:device:597362ca:node2:battery-level' has been added.
2018-01-20 22:36:07.760 [.ItemChannelLinkAddedEvent] - Link 'zwave_device_597362ca_node2_alarm_general-zwave:device:597362ca:node2:alarm_general' has been added.
2018-01-20 22:36:07.801 [hingStatusInfoChangedEvent] - 'zwave:device:597362ca:node2' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2018-01-20 22:36:07.834 [hingStatusInfoChangedEvent] - 'zwave:device:597362ca:node2' changed from INITIALIZING to OFFLINE (BRIDGE_OFFLINE): Controller is offline
2018-01-20 22:36:07.840 [hingStatusInfoChangedEvent] - 'zwave:device:597362ca:node2' changed from OFFLINE (BRIDGE_OFFLINE): Controller is offline to ONLINE
2018-01-20 22:36:07.886 [me.event.ThingUpdatedEvent] - Thing 'zwave:device:597362ca:node2' has been updated.
I have no idea how to use an item in the rule.
I’ve tried something like this, and I assume I should see a message in the log file, but I can’t see it.
rule "My first rule"
when
Item zwave_device_597362ca_node2_sensor_binary changed to ON
then
logInfo("MotionSensor", "Binary")
...
end
// Bewegungsmelder Küche im Nachtmodos
rule "Kueche Bewegung AN"
when
Item Ku_Bewegung changed from OFF to ON
then
if(Modus.state == "Nachtmodus") {
sendCommand(Ku_Schrank_Weiss, 5)
sendCommand(Ku_Schrank_Weiss, ON)
}
end
rule "Kueche Bewegung AUS"
when
Item Ku_Bewegung changed from ON to OFF
then
if(Modus.state == "Nachtmodus") {
sendCommand(Ku_Schrank_Weiss, OFF)
}
end
Not true. One can use Items in Rules no matter how they are defined.
But the Item must be linked to the Channel on the Thing. Based on the OP’s Item name and the link events in the log I’m going to guess they are using Simple Mode which automatically creates Items for each Channel named the same as the Channel ID.
// Bewegungsmelder Küche im Nachtmodos
rule "Bad Bewegung AN"
when
Item Bad_Bewegung changed from OFF to ON
then
logInfo("MotionSensor", "Bad_Bewegung OFF -> ON")
sendCommand(Bad_Schrank_Helligkeit, 100)
end
rule "Bad Bewegung AUS"
when
Item Bad_Bewegung changed from ON to OFF
then
logInfo("MotionSensor", "Bad_Bewegung ON -> OFF")
sendCommand(Bad_Schrank_Helligkeit, 0)
end
It does not work when triggering the motion sensor. The led at the fibaro flashes shortly, so motion is being detected.
I can’t see any thing in the log and light isn’t switch either.
Manually switching the “Fibaro Bewegung” in the sitemap triggers the rule. Meaning the light is being switched and an entry is written to the log.
You then should see something like this (taken from a fibaro door contact) when the sensor is triggered.
2018-01-26 22:25:42.473 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 8: Incoming command class MULTI_INSTANCE
2018-01-26 22:25:42.477 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 8: Received MULTI_INSTANCE command V0
2018-01-26 22:25:42.481 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 8: Requested Command Class = ALARM (0x71)
2018-01-26 22:25:42.485 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 8: Originating Command Class ALARM (0x71) was on the root node.
2018-01-26 22:25:42.489 [DEBUG] [class.ZWaveMultiInstanceCommandClass] - NODE 8: Endpoint = 0, calling handleApplicationCommandRequest.
2018-01-26 22:25:42.493 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 8: Received ALARM command V5
2018-01-26 22:25:42.497 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 8: Process NOTIFICATION_REPORT V5
2018-01-26 22:25:42.500 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 8: NOTIFICATION report - 0 = 0, event=23, status=255
2018-01-26 22:25:42.505 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 8: Alarm Type = ACCESS_CONTROL (0)
2018-01-26 22:25:42.507 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveAlarmValueEvent
2018-01-26 22:25:42.510 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Got an event from Z-Wave network: ZWaveAlarmValueEvent
2018-01-26 22:25:42.512 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Got a value event from Z-Wave network, endpoint = 0, command class = ALARM, value = 255
2018-01-26 22:25:42.516 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing NOTIFICATION
2018-01-26 22:25:42.518 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter NOTIFICATION event is 23, type OpenClosedType
2018-01-26 22:25:42.521 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter NOTIFICATION 3
2018-01-26 22:25:42.523 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Updating channel state zwave:device:86910632:node8:sensor_door to CLOSED [OpenClosedType]
2018-01-26 22:25:42.527 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - Alarm converter processing NOTIFICATION
==> /var/log/openhab2/events.log <==
2018-01-26 22:25:42.532 [vent.ItemStateChangedEvent] - Door_Terrace_GroundFloor changed from OPEN to CLOSED
If not, you should try re-include the sensor again. Battery devices sometimes are a bit “bitchy” during inclusion.
Are the other items from this sensor working?
So I do not think that is the issue. The result of my fibaro door sensor (FGK101) also shows the same result in the database.
Just to make sure that the items file doesn’t have an issue:
Can you also create an item via PaperUI and check if PaperUI is displaying something when the sensor triggers?
Does that mean that you have your item created in PaperUI and in addition in your default.items file at the same time?
Especially if they have the same names (Bad_Bewegung) in PaperUI and items file that “could” be a problem.
Does PaperUI show two items being linked to the channel Motion Alarm?
If not (and you still have your item defined in PaperUI and default.items), make sure that you define your item only at one place
If yes, try to delete the item that PaperUI created and only use or default.items (or the other way round).
Once you cleared your items, make sure to delete the cache of OpenHab:
There is a nice description here: Clear the Cache
Sorry for the late reply, I was offline for a couple off days.
As often, it seems, that the error was sitting in front of the machine
Obviously I have not properly paired the Fibaro Motion Sensor.
Reading the manual, I was aware that I have had to push the button on the sensor 3 times.
I am running into same issues. Can´t find the missing thing. I use a Fibaro Motion Sensor and a Switch and the Sensor does not trigger any motion. I have tried everything to get it work, but still not. Please can somebody take a look? The Things i have imported via Paper UI (NO Simple Mode).
Thanks!
**My items:**
// Bewegungsmelder
Group gEG_Garderobe "Garderobe Bewegunsgmelder"
Switch Ga_Bewegung "Garderobe Bewegung" <motion> (gEG_Garderobe) {channel="zwave:device:ffac095e:node2:alarm_motion"}
// Lichter
Group gEG_Wohnzimmer "Garderobe Bewegunsgmelder"
Switch Wz_kl_Licht "Wohnzimmer Licht" <light> (gEG_Wohnzimmer) [ "Lighting" ] {channel="zwave:device:ffac095e:node4:switch_binary"}
**sitemap:**
sitemap meinHeim label="Casa Boro" {
Frame label="Wohnzimmer" {
Group item=gEG_Wohnzimmer label="Erdgeschoss" icon="groundfloor"
Switch item=Wz_kl_Licht
}
Frame label="Garderobe" {
Group item=gEG_Garderobe label="Erdgeschoss" icon="groundfloor"
Switch item=Ga_Bewegung
}
}
**rules:**
// Bewegungsmelder Garderobe
rule "Kueche Bewegung AN"
when
Item Ga_Bewegung changed from OFF to ON
then
sendCommand(Wz_kl_Licht, ON)
end