OH2 Z-Wave refactoring and testing... and SECURITY

@Chris,
I uninstalled the ZWave binding and did:

cd /usr/share/openhab2/addons
wget http://www.cd-jackson.com/downloads/openhab2/org.openhab.binding.zwave-2.1.0-SNAPSHOT.jar

I deleted all things, including the Z-Stick and restarted OpenHAB2, then, through paper UI, i started a discovery process of wave and found the Z-Stick; i added it but it stays offline.
Console shows:

214 | Active   |  80 | 2.1.0.201704062305    | ZWave Binding

I am a bit lost, what can cause this, how can i get the Z-Stick online?

br,
Raymond

Probably through:

Itā€™s a number - Iā€™ll dig out some information over the weekend.

I think thereā€™s an issue with synchronising the inbox - itā€™s something I need to look into.

Probably you havenā€™t installed the serial dependancy - take a look at the top of this thread where the installation is explained (a few posts down).

@chris, @sihui,
i forgot to mention, i did:

ssh -p 8101 openhab@localhost

and then in the console:

feature:install openhab-transport-serial

So the serial dependency should be installed.
And i restarted OH2 after this.

What else could cause this?
br,
Raymond

I would suggest to look at the logs and see what it showsā€¦

a reboot solved it!
@chris, @sihui thanks guys

IĀ“m seeing a NullPointer on the binding when updating the properties of a network node:

 2017-04-08 21:27:25.276 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured during notification about bridge status change on thing 'zwave:device:9f8f9f9f:node12': null
java.lang.NullPointerException
	at org.openhab.binding.zwave.handler.ZWaveThingHandler.updateNodeProperties(ZWaveThingHandler.java:1396)[184:org.openhab.binding.zwave:2.1.0.201704062305]
	at org.openhab.binding.zwave.handler.ZWaveThingHandler.bridgeStatusChanged(ZWaveThingHandler.java:488)[184:org.openhab.binding.zwave:2.1.0.201704062305]
	at org.eclipse.smarthome.core.thing.internal.ThingManager$12.run(ThingManager.java:851)[106:org.eclipse.smarthome.core.thing:0.9.0.201703201701]

This is after a completely clean install of the system, but where the UZB-controller had the nodes in its memory and I updated the name of one of them.

Thanks - hopefully it will go away once a device initialises further. Iā€™ve found the problem and will do an update of this binding tomorrow.

The binding has succesfully identified and included my IdLock - lock (pun intended) to my network.
However I am not able to control it. When I command it to switch the lock it gives me the following entries in the log:

==> /var/log/openhab2/openhab.log <==
2017-04-09 17:33:04.838 [WARN ] [nal.converter.ZWaveDoorLockConverter] - NODE 19: Command class COMMAND_CLASS_DOOR_LOCK not found

==> /var/log/openhab2/events.log <==
2017-04-09 17:33:04.841 [ItemCommandEvent          ] - Item 'Lock_IdLock' received command OFF
2017-04-09 17:33:04.848 [ItemStateChangedEvent     ] - Lock_IdLock changed from ON to OFF

Nothing happens on the lock end at all.

This probably means the binding thinks secure inclusion did not happen, see OH2 Z-Wave refactoring and testing... and SECURITY

Did you get a message in habmin that secure inclusion was successful?

You are right Olav. Inclusion must have gone wrong somehow. Seems Using security is marked no (and same error when trying to control it).

Excluded it and did a new inclusion with the network set to use security for all types of devices. Got a new NodeID (22), but still did not mark Using security:

There is another thread with ppl also having trouble with this for the idlock. I did an exclude, removed all the batteries, and then included again with the controller close (20cm or so). That did the trick for me.

I`ll give it a try it. Extremely impractical to move the device close to the controller. The lock sure cannot be moved, but I will get a long network cable and keep it close.

Tips for getting secure inclusion with IDLock

  1. Fresh batteries
  2. Controller really close (few cm)
  3. Do a reset on the lock (lock 5 sec + ā€œ0ā€) (OBS wipes the ID-Tags !) <- not always necesserry
  4. Dont miss the feature:install openhab-transport-serial and bundle:start org.openhab.binding.zwave

I use this script for a ā€œfreshā€ install :

systemctl stop openhab2.service
# download new version
cd /tmp
wget https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip

# Download thet expererimental binding with support for SECURE inclusion from cd-jackson.com
wget http://www.cd-jackson.com/downloads/openhab2/org.openhab.binding.zwave-2.1.0-SNAPSHOT.jar

unzip openhab-2.1.0-SNAPSHOT.zip -d /opt/openhab2
rm openhab-2.1.0-SNAPSHOT.zip

cp -arv org.openhab.binding.zwave-2.1.0-SNAPSHOT.jar /opt/openhab2/addons/

# fix permissions
chown -hR openhab:openhab /opt/openhab2

# restart openhab instance
systemctl start openhab2.service

echo "Do this post install"
echo "ssh openhab@openhab -p 8101"
echo "alternatively ssh openhab@localhost -p 8101"
echo "Note: ssh times out a couple of times on first run due to keygeneration, and maybe overheating you raspberry"
echo "feature:install openhab-transport-serial"
echo "bundle:start org.openhab.binding.zwave"
echo "log:set debug org.openhab.binding.zwave"
echo "logout"
echo "tail -f /opt/openhab2/userdata/logs/openhab.log"
1 Like

Trying out the new code, but I canā€™t get my Aeon minimoteā€™s recognized. Here is the relevant debug on startup. Worked when I tried the latest snapshot

2017-04-03 19:50:37.532 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 0A 00 04 00 1F 04 2B 01 01 00 C1
2017-04-03 19:50:37.532 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Response SENT 6
2017-04-03 19:50:37.532 [DEBUG] [nal.protocol.ZWaveTransactionManager] - processReceiveMessage inputMessage: class=ApplicationCommandHandler[0x04], type=Request[0x00], dest=31, callback=0, payload=00 1F 04 2B 01 01 00
2017-04-03 19:50:37.532 [DEBUG] [nal.protocol.ZWaveTransactionManager] - processReceiveMessage past lockMessage: class=ApplicationCommandHandler[0x04], type=Request[0x00], dest=31, callback=0, payload=00 1F 04 2B 01 01 00
2017-04-03 19:50:37.532 [DEBUG] [nal.protocol.ZWaveTransactionManager] - Received msg Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], dest=31, callback=0, payload=00 1F 04 2B 01 01 00
2017-04-03 19:50:37.532 [DEBUG] [nal.protocol.ZWaveTransactionManager] - lastTransaction TID:474 [WAIT_DATA] callback: 0
2017-04-03 19:50:37.532 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 31: Application Command Request (ALIVE:REQUEST_NIF)
2017-04-03 19:50:37.532 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 31: Incoming command class COMMAND_CLASS_SCENE_ACTIVATION, endpoint 0
2017-04-03 19:50:37.532 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 31: Command class COMMAND_CLASS_SCENE_ACTIVATION not found, trying to add it.
2017-04-03 19:50:37.533 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 31: Creating new instance of command class COMMAND_CLASS_SCENE_ACTIVATION
2017-04-03 19:50:37.533 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE Node 31: Manufacturer=7FFFFFFF, Type=7FFFFFFF, Id=7FFFFFFF: Command class COMMAND_CLASS_SCENE_ACTIVATION, endpoint 0 created
2017-04-03 19:50:37.533 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 31: Adding command class COMMAND_CLASS_SCENE_ACTIVATION to endpoint 0
2017-04-03 19:50:37.533 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 31: Adding command class COMMAND_CLASS_SCENE_ACTIVATION to the list of supported command classes.
2017-04-03 19:50:37.533 [DEBUG] [ng.zwave.internal.protocol.ZWaveNode] - NODE 31: SECURITY not supported
2017-04-03 19:50:37.533 [DEBUG] [tocol.commandclass.ZWaveCommandClass] - NODE 31: Received COMMAND_CLASS_SCENE_ACTIVATION V0 SCENEACTIVATION_SET
2017-04-03 19:50:37.533 [DEBUG] [.commandclass.ZWaveBasicCommandClass] - Scene activation node from node 31: Scene 1, Time 0
2017-04-03 19:50:37.533 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveCommandClassValueEvent
2017-04-03 19:50:37.533 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 31: Commands processed 1.
2017-04-03 19:50:37.533 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 31: Checking command org.openhab.binding.zwave.internal.protocol.ZWaveCommandClassPayload@51d29e73.
2017-04-03 19:50:37.533 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 31: Checking transaction 474  ApplicationUpdate.
2017-04-03 19:50:37.533 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 31: Checking transaction : state >> WAIT_DATA
2017-04-03 19:50:37.533 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 31: Checking transaction : node  >> 59
2017-04-03 19:50:37.533 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 31: Checking transaction : class >> 43 == null.
2017-04-03 19:50:37.533 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 31: Checking transaction : commd >> 1 == null.
2017-04-03 19:50:37.533 [DEBUG] [nal.protocol.ZWaveTransactionManager] - NODE 31: Command NOT verified org.openhab.binding.zwave.internal.protocol.ZWaveCommandClassPayload@51d29e73.

Try waking it up - currently from this very short log it looks like the binding hasnā€™t gone very far with the initialisation of the device and hasnā€™t yet downloaded the device information.

What is the recommended way for upgrading (following new releases for this experimental binding) ? Is it sufficient to just download the new binding to the addon folder and reboot ? Or is ther any other action required ? Eg is a must to re-add all my things via inclusion (any other caveats) ?

Thank you :slight_smile:
Torstein

Take a look at the top of this thread - a few messages in there is a discussion about installationā€¦

1 Like

Not certain if this has been mentioned before in this thread. But, when a new thing is discovered it is displayed as unknown until I add another thing. Then the first thing is being shown with itĀ“s complete name and properties. Is this something wrong with transactions?

Before adding my next devices it would stay like this for at least 20 minutes (as long as I have waited when reinstalling all my devices):

After adding another device to the network (same time as new device is discovered):