[SOLVED] Motion sensor rule not triggering

God afton!

Having spent way too much time on this, I now surrender for the night and leave the community with this question: I have a Nexa SP-816 PIR motion sensor setup (zwave). The sensor itself reacts fine and I receive information to the binding. But I can’t seem to get the item to update - alternatively the rule just refuses to trigger.

//Item
Switch Status_Motion_Babywatch "Motion by the baby" <motion> (gSensor,gOutside,gHistory,gNursery) {channel="zwave:device:033cb946:node28:sensor_binary"}

//Rule
rule "Babywatch rule"
when 
	Item Status_Motion_Babywatch changed
then
logInfo("Babywatch rule","Rule triggered")
pushNotification("Babywatch","Triggered!")
end

I have tried the rule to trigger on “received update”, “changed to on” and “changed”. I get no reliable result. Sitemaps with the item seems not to update - HABmin seems to have the item state locked at “Triggered”.

…and if we go to the log I see nothing for the Item, but the following debug log for Node 28 on Z-wave seems to indicate SOME sort of trigger from the thing. The second part, I reckon, is the thing sending an OFF to reset the trigger/turning of any associated lights etc.

2019-01-09 01:24:00.143 [DEBUG] [nal.protocol.ZWaveTransactionManager] - TID 924: Transaction event listener: DONE: DONE -> 

2019-01-09 01:24:00.145 [DEBUG] [nal.protocol.ZWaveTransactionManager] - ZWaveReceiveThread queue empty

2019-01-09 01:24:00.147 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 8: Went to sleep COMPLETE

2019-01-09 01:24:00.148 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Transaction SendNextMessage 0 out at start. Holdoff false.

2019-01-09 01:24:04.234 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 0F 00 04 00 1C 09 71 05 00 00 00 FF 07 08 00 65 

2019-01-09 01:24:04.241 [DEBUG] [nal.protocol.ZWaveTransactionManager] - processReceiveMessage input 0<>128 : Message: class=ApplicationCommandHandler[4], type=Request[0], dest=28, callback=0, payload=00 1C 09 71 05 00 00 00 FF 07 08 00 

2019-01-09 01:24:04.245 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Received msg (0): Message: class=ApplicationCommandHandler[4], type=Request[0], dest=28, callback=0, payload=00 1C 09 71 05 00 00 00 FF 07 08 00 

2019-01-09 01:24:04.247 [DEBUG] [nal.protocol.ZWaveTransactionManager] - lastTransaction null

2019-01-09 01:24:04.249 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 28: Application Command Request (ALIVE:DONE)

2019-01-09 01:24:04.251 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 28: resetResendCount initComplete=true isDead=false

2019-01-09 01:24:04.253 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 28: Incoming command class COMMAND_CLASS_ALARM, endpoint 0

2019-01-09 01:24:04.255 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 28: SECURITY NOT required on COMMAND_CLASS_ALARM

2019-01-09 01:24:04.258 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 28: Received COMMAND_CLASS_ALARM V4 NOTIFICATION_REPORT

2019-01-09 01:24:04.260 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 28: NOTIFICATION report - 0 = 0, event=8, status=255, plen=0

2019-01-09 01:24:04.262 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 28: Alarm Type = BURGLAR (0)

2019-01-09 01:24:04.264 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got an event from Z-Wave network: ZWaveAlarmValueEvent

2019-01-09 01:24:04.266 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got a value event from Z-Wave network, endpoint = 0, command class = COMMAND_CLASS_ALARM, value = 255

2019-01-09 01:24:04.269 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 28: Alarm converter processing NOTIFICATION

2019-01-09 01:24:04.271 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 28: Alarm converter NOTIFICATION event is 8, type OnOffType

2019-01-09 01:24:04.274 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 28: Alarm converter processing NOTIFICATION

2019-01-09 01:24:04.276 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 28: Alarm converter NOTIFICATION event is 8, type OnOffType

2019-01-09 01:24:04.278 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 28: Commands processed 1.

2019-01-09 01:24:04.280 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 28: Checking command org.openhab.binding.zwave.internal.protocol.ZWaveCommandClassPayload@1b9e809.

2019-01-09 01:24:04.282 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Transaction completed - outstandingTransactions 0

2019-01-09 01:24:04.284 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Transaction completed - outstandingTransactions 0

2019-01-09 01:24:04.286 [DEBUG] [nal.protocol.ZWaveTransactionManager] - ZWaveReceiveThread queue empty

2019-01-09 01:24:04.288 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Transaction SendNextMessage 0 out at start. Holdoff false.

2019-01-09 01:24:09.670 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 10 00 04 00 1C 0A 71 05 00 00 00 FF 07 00 01 08 78 

2019-01-09 01:24:09.683 [DEBUG] [nal.protocol.ZWaveTransactionManager] - processReceiveMessage input 0<>128 : Message: class=ApplicationCommandHandler[4], type=Request[0], dest=28, callback=0, payload=00 1C 0A 71 05 00 00 00 FF 07 00 01 08 

2019-01-09 01:24:09.688 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Received msg (0): Message: class=ApplicationCommandHandler[4], type=Request[0], dest=28, callback=0, payload=00 1C 0A 71 05 00 00 00 FF 07 00 01 08 

2019-01-09 01:24:09.690 [DEBUG] [nal.protocol.ZWaveTransactionManager] - lastTransaction null

2019-01-09 01:24:09.692 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 28: Application Command Request (ALIVE:DONE)

2019-01-09 01:24:09.695 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 28: resetResendCount initComplete=true isDead=false

2019-01-09 01:24:09.698 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 28: Incoming command class COMMAND_CLASS_ALARM, endpoint 0

2019-01-09 01:24:09.700 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 28: SECURITY NOT required on COMMAND_CLASS_ALARM

2019-01-09 01:24:09.702 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 28: Received COMMAND_CLASS_ALARM V4 NOTIFICATION_REPORT

2019-01-09 01:24:09.705 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 28: NOTIFICATION report - 0 = 0, event=0, status=255, plen=1

2019-01-09 01:24:09.707 [DEBUG] [.commandclass.ZWaveAlarmCommandClass] - NODE 28: Alarm Type = BURGLAR (0)

2019-01-09 01:24:09.710 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got an event from Z-Wave network: ZWaveAlarmValueEvent

2019-01-09 01:24:09.712 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Got a value event from Z-Wave network, endpoint = 0, command class = COMMAND_CLASS_ALARM, value = 255

2019-01-09 01:24:09.715 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 28: Alarm converter processing NOTIFICATION

2019-01-09 01:24:09.717 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 28: Alarm converter NOTIFICATION event is 0, type OnOffType

2019-01-09 01:24:09.720 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 28: Updating channel state zwave:device:033cb946:node28:alarm_burglar to OFF [OnOffType]

2019-01-09 01:24:09.724 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 28: Alarm converter processing NOTIFICATION

2019-01-09 01:24:09.729 [DEBUG] [ternal.converter.ZWaveAlarmConverter] - NODE 28: Alarm converter NOTIFICATION event is 0, type OnOffType

2019-01-09 01:24:09.731 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 28: Commands processed 1.

2019-01-09 01:24:09.733 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 28: Checking command org.openhab.binding.zwave.internal.protocol.ZWaveCommandClassPayload@3e1ce.

2019-01-09 01:24:09.735 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Transaction completed - outstandingTransactions 0

2019-01-09 01:24:09.737 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Transaction completed - outstandingTransactions 0

2019-01-09 01:24:09.740 [DEBUG] [nal.protocol.ZWaveTransactionManager] - ZWaveReceiveThread queue empty

2019-01-09 01:24:09.742 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Transaction SendNextMessage 0 out at start. Holdoff false.

Thoughts anyone? I will not be surprised if I am missing something dead on obvious.

Save me, Obi-One Kenobi - you’re my only hope!

  • Platform information:
    • Hardware: RPI3 and Z-stick gen 5
    • OS: OpenHABian 2.4.0-1
    • Java Runtime Environment: included; OpenJDK 1.8.0_152 (Zulu embedded)
  • OpenHAB 2.4.0

So. When I said:

…I wasn’t kidding. I’ve been listening to the wrong channel. In my defense, the manual was pretty unclear in this case. For anyone else stumbling on this; it’s the “alarm_burglar” which contains the status update for the motion trigger. Which, ofcourse, is pretty obvious when I actually read that Zwave log. :slight_smile:

'Ta-ta 'til next time!

Petter

@MrPetter Is this working for you? I am having issues with motion detection notification on a couple of other devices and our log files look the same. What puzzles me is that I see you channel state being updated to OFF but I never see it update to ON (NODE 28: Updating channel state zwave:device:033cb946:node28:alarm_burglar to OFF)

Hi,

I actually haven’t checked the log since it started working - but the rule triggers on change to ON, and since it fires I expect that it does work. I was very focused on the wrong item in the above example, so the log I pasted simply attempted to capture whatever happened arount that item. I might therefore simply have missed the state change. I will try to get time to look at my log tonight!

Are you running the same or different hardware?

//PF.

I’m running the RPI3 with Z Stick Gen 5, openHAB 2.5.0.M1 Milestone Build. I am using GE (Jasco) 26931 and 26932 In-Wall Smart Motion Switches. I saw a thread where the database probably needed updating since the ZWave upgrade in 2.4 so that may ultimately solve the issue. Looking at yours, I really found myself needing to validate whether the alarm_burglar state ever went to ON in the log files. I’ve run around in too many circles so just trying to get a grasp on what I think I should be seeing :slight_smile: