Cannot get Door Status from AEOTEC ZW089-c Recessed Door Sensor Gen5

Hi,

I am taking my first steps with openHAB and seem to get my configuration working properly, except my recessed door sensor from AEOTEC.

My configuration is;

  • Raspberry PI Model 2
  • Razberry Daughter Card
  • OpenHAB2 2.0.0-SNAPSHOT Build #469
  • Z-Wave Binding binding-zwave - 2.0.0.SNAPSHOT

After installing the z-way-server and openHAB 2 i did include the zwave devices using the z-way devices. I do not think it is possible to include z-way devices otherwise, e.g. by enabling inclusion mode in openHAB.

I tested all things (z-way devices) in the z-way interface the recessed door sensor included. When confirmed that all things were working properly i did shutdown the z-way server and started openHAB.
Adding the binding and the things went almost smoothly, and were finally shown in the paperUI. The ZW096 smartswitch and ZW100 multisensor are showing correct data. Only the ZW089 does not show the door status.

I found in this thread a solution. The controller needed to be a member of the device’s association group for state+battery updates. So i tried to set the association group for the state updates and battery warnings in PaperUI (Configuration > Things > Z-Wave Node 17 > Edit) and in the HABMIN interface (Configuration > Things > Z-Wave Node 17).
But these settings do not seem to be persisted. When stepping of to another thing and stepping back in the configuration the association is not shown.

When tailing the file userdata/logs/openhab.log the following two errors are logged when opening and closing the door containing the sensor.

2016-09-12 20:49:21.326 [ERROR] [col.security.ZWaveSecureNonceTracker] - NODE 17: SECURITY_ERROR Device message contained nonce that is unknown to us, id=43.
2016-09-12 20:49:24.453 [ERROR] [col.security.ZWaveSecureNonceTracker] - NODE 17: SECURITY_ERROR Device message contained nonce that is unknown to us, id=52.

The log userdata/logs/events.log is showing the following events at the same time.

2016-09-12 20:50:53.257 [ItemStateChangedEvent ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 364 to 365
2016-09-12 20:50:56.364 [ItemStateChangedEvent ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 365 to 366
2016-09-12 20:51:02.295 [ItemStateChangedEvent ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 366 to 367
2016-09-12 20:51:05.394 [ItemStateChangedEvent ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 367 to 368

Any idea how to resolve this?

I don’t know if I can be of any help, but here are my thoughts:

Is the sensor battery operated? If so, it takes some time (at least until the next scheduled wakeup) for HABmin to change the association group settings. So maybe that’s the reason why you think it is not persisted. Or you do a wakeup manually. Concerning the settings: You do not need to update the association in PaperUI AND in HABmin. Just choose one (I suggest using HABmin for zwave devices).

Furthermore, the openhab.log says something about SECURITY. Do you have included the device with secure inclusion? AFAIK this could lead to some problems and this device is no security device where a secure inclusion is needed, is it?
Maybe chris could light this up?

The events.log shows nothing particular interesting (at least for me).

And (I also do not know if this is related to your problem) chris is updating/improving the NOTIFICATION CLASS for the OH2 binding at the moment, as there are some kind of issues with that. The door status is a notification, isn’t it?

But you should change the log level to DEBUG, so we can see what exactly happens (or not) when you open the door.

Regards,
Stefan

There is some discussion going on related to secure inclusion and devices which will act faulty when included secure. See:

I guess you are receiving the battery status report but just nothing when you open or close the door/window.

Please check Configuration parameter 121 (121: Configuration Value 4(LSB) SENSOR BINARY) for this device
it is probably set to “Disable sensor binary” change it to “enable sensor binary” wake up your device and let it update it’s configuration… you should be good to go once it has received it’s new settings for parameter 121

If you think this is related to security, have you disabled the secure inclusion in the controller? Does it help?

It wasn’t me who had this problem. It was @macPeterr. Based on his logs I just assumed (maybe wrong?) that his problems could be related to a secure inclusion (as there were many security/secure messages in the log which I do not see in my logs…).

Ok - sorry, so same question to @macPeterr - I would try disabling security and see if that helps.

Hi Roel,

Started openHab in debug mode and change the suggested configuration parameter. When saving the changes the following is logged

2016-09-13 19:04:03.036 [ERROR] [ding.zwave.handler.ZWaveThingHandler] - NODE 17: Error getting configurationCommandClass
2016-09-13 19:04:03.131 [ThingUpdatedEvent         ] - Thing 'zwave:device:20a5ffa6:node17' has been updated.
2016-09-13 19:04:03.142 [ConfigStatusInfoEvent     ] - org.eclipse.smarthome.config.core.status.events.ConfigStatusInfoEvent@cac77a

When stepping of the Thing record and stepping back in the value is back again at “Disable sensor binary”.
Also the sensor status in the description is empty

as well as in the contol tab of Paper UI

Seems i am getting a NullPointer Exception when opening/closing the door.

root@raspberrypi:/opt/openhab/userdata/logs# 2016-09-13 19:10:40.618 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 346 to 347
2016-09-13 19:10:40.636 [ERROR] [ve.internal.protocol.ZWaveController] - Exception during ZWave thread: Input 2. {}
java.lang.NullPointerException
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.sendNonceReport(ZWaveSecurityCommandClass.java:432)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.handleApplicationCommandRequest(ZWaveSecurityCommandClass.java:387)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClassWithInitialization.handleApplicationCommandRequest(ZWaveSecurityCommandClassWithInitialization.java:269)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.serialmessage.ApplicationCommandMessageClass.handleRequest(ApplicationCommandMessageClass.java:119)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.ZWaveController.handleIncomingRequestMessage(ZWaveController.java:242)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.ZWaveController.handleIncomingMessage(ZWaveController.java:208)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.ZWaveController.access$7(ZWaveController.java:202)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.ZWaveController$ZWaveInputThread.run(ZWaveController.java:1298)[188:org.openhab.binding.zwave:2.0.0.201609062002]
2016-09-13 19:10:43.667 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 347 to 348
2016-09-13 19:10:43.668 [ERROR] [ve.internal.protocol.ZWaveController] - Exception during ZWave thread: Input 2. {}
java.lang.NullPointerException
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.sendNonceReport(ZWaveSecurityCommandClass.java:432)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.handleApplicationCommandRequest(ZWaveSecurityCommandClass.java:387)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClassWithInitialization.handleApplicationCommandRequest(ZWaveSecurityCommandClassWithInitialization.java:269)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.serialmessage.ApplicationCommandMessageClass.handleRequest(ApplicationCommandMessageClass.java:119)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.ZWaveController.handleIncomingRequestMessage(ZWaveController.java:242)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.ZWaveController.handleIncomingMessage(ZWaveController.java:208)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.ZWaveController.access$7(ZWaveController.java:202)[188:org.openhab.binding.zwave:2.0.0.201609062002]
	at org.openhab.binding.zwave.internal.protocol.ZWaveController$ZWaveInputThread.run(ZWaveController.java:1298)[188:org.openhab.binding.zwave:2.0.0.201609062002]

Is this with security disabled?

Hi Chris,

I disabled “Do Not Use Security” for the Secure Inclusion Mode. Then excluded the door sensor.
Including through the HABmin admin interfaces seemed not to work, so started the z-way server (shutdown openHAB first) and excluded all z-way devices. Then restarted openHAB again.

No things showing up, except the z-wave serial controller. Tried to include z-way devices from HABmin but this fails.
Started z-way server again and included the three devices using the zwave>me interface.
Back in HABmin the new things are reported to be included.

After including the configuration parameter “121: Configuration Value 4(LSB) SENSOR BINARY” for the ZW089 Recessed Door Sensor Gen5 is changed to “enable sensor binary”. Association group for Status Updates and Battery Warnings are set to “OpenHAB Controller” After setting Association group a status is shown “Node initialising ASSOCIATIONS”.
The status keeps showing up and the sensor data in the properties view stays emtpy.

Excluded and included the devices again in the zwave>me interface. When testing the door sensor in z-wave-me, the events from the door sensor are shown.

Back in HABmin added the things again and changed parameter “121: Configuration Value 4(LSB) SENSOR BINARY” for the ZW089 Recessed Door Sensor Gen5 is changed to “enable sensor binary” again. When hitting ‘Save’ logs show

root@raspberrypi:/opt/openhab/userdata/logs# 2016-09-13 20:32:26.493 [ERROR] [ocol.ZWaveController$ZWaveSendThread] - NODE 5: Timeout while sending message. Requeueing - 0 attempts left!
2016-09-13 20:32:26.497 [ERROR] [l.serialmessage.SendDataMessageClass] - NODE 5: Got an error while sending data. Resending message.
2016-09-13 20:32:26.510 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_ack changed from 342 to 343
2016-09-13 20:32:26.515 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 890 to 891
2016-09-13 20:32:26.528 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 891 to 892
2016-09-13 20:32:27.847 [ERROR] [ding.zwave.handler.ZWaveThingHandler] - NODE 5: Error getting configurationCommandClass
2016-09-13 20:32:27.924 [ThingUpdatedEvent         ] - Thing 'zwave:device:20a5ffa6:node5' has been updated.
2016-09-13 20:32:27.934 [ConfigStatusInfoEvent     ] - org.eclipse.smarthome.config.core.status.events.ConfigStatusInfoEvent@1cf97fb
2016-09-13 20:32:31.514 [WARN ] [ocol.ZWaveController$ZWaveSendThread] - NODE 5: Too many retries. Discarding message: Message: class=SendData[0x13], type=Request[0x00], priority=Config, dest=5, callback=44, payload=05 03 85 02 02 

Healed the device, no positive effect

Disabled security by setting “Do Not Use Security” for Secure Inclusion Parameters in the (advanced) Z-Wave network settings.

What does this mean? Do you really mean “Z-Way devices” as in the Z-Way system? there should be no problem including devices, but if there are really a debug logfile would be good to see.

This indicates that the device interrogation probably failed.

This indicates that there are problems sending data to the device.

Really it’s hard to see what’s happening without debug logs though - sorry.

I am not able to get the razberry daughter card in inclusion mode within HABmin. To get the razberry daughter card in inclusion mode i need to do this through the z-way server. When included through the z-way server the new included things/devices can be included in habmin.

Started the openHAB with the start_debug.sh script but seems not to log substantially more in the logfiles events.log and openhab.log in /opt/openhab/userdata/logs.

When changing the parameter “121: Configuration Value 4(LSB) SENSOR BINARY” for the ZW089 Recessed Door Sensor Gen5 to “enable sensor binary”. Only the following is logged;

2016-09-13 21:06:51.183 [ERROR] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Error getting configurationCommandClass
2016-09-13 21:06:51.267 [ThingUpdatedEvent         ] - Thing 'zwave:device:20a5ffa6:node8' has been updated.
2016-09-13 21:06:51.286 [ConfigStatusInfoEvent     ] - org.eclipse.smarthome.config.core.status.events.ConfigStatusInfoEvent@11fd8a6

When reinitialising the device the following is logged (after closing and opening the door to activate the device)

2016-09-13 21:08:19.316 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_ack changed from 126 to 127
2016-09-13 21:08:19.320 [hingStatusInfoChangedEvent] - 'zwave:device:20a5ffa6:node8' changed from ONLINE: Node initialising: RETURN_ROUTES to ONLINE: Node initialising: NEIGHBORS
2016-09-13 21:08:19.321 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 291 to 292
2016-09-13 21:08:19.407 [ConfigStatusInfoEvent     ] - org.eclipse.smarthome.config.core.status.events.ConfigStatusInfoEvent@12f570d
2016-09-13 21:08:19.408 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Initialising Thing Node...
2016-09-13 21:08:19.410 [ThingUpdatedEvent         ] - Thing 'zwave:device:20a5ffa6:node8' has been updated.
2016-09-13 21:08:19.413 [hingStatusInfoChangedEvent] - 'zwave:device:20a5ffa6:node8' changed from ONLINE: Node initialising: NEIGHBORS to ONLINE
2016-09-13 21:08:19.447 [WARN ] [ding.zwave.handler.ZWaveThingHandler] - NODE 8: Initialising Thing Node...
2016-09-13 21:08:32.991 [ERROR] [col.security.ZWaveSecureNonceTracker] - NODE 8: SECURITY_ERROR Device message contained nonce that is unknown to us, id=-93.
2016-09-13 21:08:32.991 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 292 to 293
2016-09-13 21:08:33.007 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_ack changed from 127 to 128
2016-09-13 21:08:33.016 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 293 to 294
2016-09-13 21:08:33.028 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 294 to 295
2016-09-13 21:08:33.042 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 295 to 296
2016-09-13 21:08:33.066 [ERROR] [mmandclass.ZWaveSecurityCommandClass] - NODE 8: SECURITY_ERROR MAC Authentication of packet failed. Dropping.
2016-09-13 21:08:33.069 [ERROR] [ssage.ApplicationCommandMessageClass] - NODE 8: Failed to decrypt message out of Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 08 17 98 81 4B 97 F7 FD 17 C7 9A 26 30 22 E4 53 A3 56 89 22 CE B1 37 AD 57  .
2016-09-13 21:08:33.088 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 296 to 297
2016-09-13 21:08:33.107 [ERROR] [col.security.ZWaveSecureNonceTracker] - NODE 8: SECURITY_ERROR Device message contained nonce that is unknown to us, id=-89.
2016-09-13 21:08:33.119 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_ack changed from 128 to 129
2016-09-13 21:08:33.125 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 297 to 298
2016-09-13 21:08:33.153 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 298 to 299
2016-09-13 21:08:33.169 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 299 to 300
2016-09-13 21:08:33.203 [ERROR] [mmandclass.ZWaveSecurityCommandClass] - NODE 8: SECURITY_ERROR MAC Authentication of packet failed. Dropping.
2016-09-13 21:08:33.207 [ERROR] [ssage.ApplicationCommandMessageClass] - NODE 8: Failed to decrypt message out of Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 08 17 98 81 47 33 0D C1 A6 27 46 EC C7 A6 A0 1B A7 83 2E 7A 8F D0 9C 1B EF  .
2016-09-13 21:08:33.387 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 300 to 301
2016-09-13 21:08:33.404 [ERROR] [col.security.ZWaveSecureNonceTracker] - NODE 8: SECURITY_ERROR Device message contained nonce that is unknown to us, id=-55.
2016-09-13 21:08:33.417 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_ack changed from 129 to 130
2016-09-13 21:08:33.422 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 301 to 302
2016-09-13 21:08:33.449 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 302 to 303
2016-09-13 21:08:33.472 [ItemStateChangedEvent     ] - zwave_serial_zstick_20a5ffa6_serial_sof changed from 303 to 304
2016-09-13 21:08:33.500 [ERROR] [mmandclass.ZWaveSecurityCommandClass] - NODE 8: SECURITY_ERROR MAC Authentication of packet failed. Dropping.
2016-09-13 21:08:33.505 [ERROR] [ssage.ApplicationCommandMessageClass] - NODE 8: Failed to decrypt message out of Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 08 17 98 81 2F 57 05 71 8D 60 12 5E CC 46 91 8D C9 C5 61 53 6E 83 F6 EB 15  .

Hmmm - ok, I thought that the razberry used the standard API. I thought this worked with others, but maybe not. What error do you get in the log?

This doesn’t increase the logging. You need to log on to the console, and use the command “log:set debug org.openhab.binding.zwave” to enable debug logging.

It still looks like security is used :confused:.

Secure Inclusion Mode is really set to ‘Do Not Use Security’

What is the correct way to include devices in HABmin. I expect that the correct procedure was by going to things > z-wave serial controller > z-wave network settings and selecting a inclusion mode.

I didn’t think there was such an option?

The correct way in openhab is to enable discovery mode. In HABmin, that is done through a button in the top taskbar that looks like a search button.

See here in the “Adding Z-Wave devices” section.

Hi Peter,

additionally I would clearly suggest to get the razberry card fully working with HABmin/Zwave-binding first!

I’ve found a thread where you can find helpful informations for the installation and configuration of the daugther card:

https://community.openhab.org/t/openhab2-razberry-z-wave-binding/13033

Hi Stefan,

Did a complete installation from scratch now without the z-wave software. Have a complete installation process document in markdown format but am not able to upload it to this thread. I have read the suggested thread again, but there seems to be nothing new.

In short, openHab 2.0.0B3 is now installed and the Z-Wave Serial Controller is added as a thing.
When changing the port configuration to /dev/ttyAMA0, the logs report that the port does not exist.

2016-09-14 20:32:33.303 [INFO ] [smarthome.event.ThingUpdatedEvent   ] - Thing 'zwave:serial_zstick:1572a637f7a' has been updated.
2016-09-14 20:32:33.313 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:1572a637f7a' changed from INITIALIZING to OFFLINE
2016-09-14 20:32:33.313 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:1572a637f7a' changed from INITIALIZING to OFFLINE
2016-09-14 20:32:33.407 [hingStatusInfoChangedEvent] - 'zwave:serial_zstick:1572a637f7a' changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyAMA0 does not exist
2016-09-14 20:32:33.407 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'zwave:serial_zstick:1572a637f7a' changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): Serial Error: Port /dev/ttyAMA0 does not exist

Also making a symbolic link (/dev/ttyUSB30) to the port /dev/ttyAMA0 and using the symbolic link gives no luck.
Port does exist.
Also removing the property -Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0 from the JAVA_OPTS in karaf/bin/setenv does not make a change.