Zwave / openhab

Hello,

Everything has been running without a flaw for many years (and thanks again a lot for that :slight_smile: ), but with the latest openhab stable (4.2.1-1 via the debian package) update I now have my two Aeotec wallmote quad devices failing with this message :

> *10:42:50.812 [ERROR] [ommandclass.ZWaveSecurityCommandClass] - NODE 3: Error decapsulating security message*
> *java.security.InvalidKeyException: No installed provider supports this key: (null)*
> *        at javax.crypto.Cipher.chooseProvider(Cipher.java:958) ~[?:?]*
> *        at javax.crypto.Cipher.init(Cipher.java:1299) ~[?:?]*
> *        at javax.crypto.Cipher.init(Cipher.java:1236) ~[?:?]*
> *        at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.generateMAC(ZWaveSecurityCommandClass.java:528) ~[bundleFile:?]*
> *        at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.getSecurityMessageDecapsulation(ZWaveSecurityCommandClass.java:319) [bundleFile:?]*
> *        at org.openhab.binding.zwave.internal.protocol.ZWaveNode.processCommand(ZWaveNode.java:1237) [bundleFile:?]*
> *        at org.openhab.binding.zwave.internal.protocol.ZWaveTransactionManager$ZWaveReceiveThread.run(ZWaveTransactionManager.java:548) [bundleFile:?]*

The rest of my Zwave network (a dozen of nodes, everything included with security) still works.

Any idea ?

Thanks !

Did you checkout the below links - maybe you find some valuable info there - mainly it has something to do with battery devices and secure inclusion IMHO.

Thanks @stefan.hoehn, unfortunately it didn’t help.

I tried my controller (Aeon usb key gen5 on the Zwave PC controller windows software) and it dials perfectly with the two devices…

@chris, you have always been for me of good advice on this sort of topics… can I kindly ask you an hint ?

How are you managing the security keys between the windows software and OH; and when you included the devices, did you do that in OH? Lastly what does the current node XML looking like? Specifically is the Security Class in the NIF section?

Thank you @apella12 for your interest.

I’ve the same key for both windows and OH, defined ten years ago and never rotated (sorry for the cybersecurity specialists reading that :wink: )
All devices excepted the two aeotec wallmote still work, and the two devices were working before an openhab update.

You probably got it : the node.xml of the two devices are… empty (the other ones are normal). But what should I do ?

With a battery device in security, that is probably the worst scenario. Normally you could wake it up to get it configured, but since the security is messed up somehow, the wakeup is probably encoded, so OH can’t “hear” it. Probably the best option is to exclude with the Silabs app, then readd using Openhab. Make sure the key (click advanced) on UI controller is the one you have been using. Also could do the factory reset option, but since the Silabs tool is working it might cause less problems just to exclude it from that app.

Sorry for the late reply…

Excluding then including again does not change nothing.
Interesting to see that the device thinks the inclusion worked well, and openhab too (channels are discovered, device is online, …)
But afterwards, openhab says “no provider supports this key” when pressing a button.

23:13:26.660 [ERROR] [ommandclass.ZWaveSecurityCommandClass] - NODE 28: Error decapsulating security message
java.security.InvalidKeyException: No installed provider supports this key: (null)
        at javax.crypto.Cipher.chooseProvider(Cipher.java:958) ~[?:?]
        at javax.crypto.Cipher.init(Cipher.java:1299) ~[?:?]
        at javax.crypto.Cipher.init(Cipher.java:1236) ~[?:?]
        at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.generateMAC(ZWaveSecurityCommandClass.java:528) ~[bundleFile:?]
        at org.openhab.binding.zwave.internal.protocol.commandclass.ZWaveSecurityCommandClass.getSecurityMessageDecapsulation(ZWaveSecurityCommandClass.java:319) [bundleFile:?]
        at org.openhab.binding.zwave.internal.protocol.ZWaveNode.processCommand(ZWaveNode.java:1237) [bundleFile:?]
        at org.openhab.binding.zwave.internal.protocol.ZWaveTransactionManager$ZWaveReceiveThread.run(ZWaveTransactionManager.java:548) [bundleFile:?]

Interesting also : silabs manages perfectly the device…

Seems to be a regression introduced around 4.2.1. It reminds me the very beginnings of the binding :slight_smile:

@apella12 @chris

From my recon the ZWave security has changed in several years.

My advice is basically as above. If the exclude in Silabs and re-add in OH didn’t work (assuming you also deleted the old thing and it was added as a new node number), factory reset the device, remove from the controller using Silabs like a zombie device (Check failed, remove failed), remove all traces of the device in OH including any blank XMLs and try to readd with your security code.

Hi @apella12

Thanks for your support, I appreciate.

Results of the day : it does not work :smiley:

  1. I applied your advice :
  • factory reset + cleanup of nodes in the controller (via silabs) and cleanup of node*.xml in openhab
  • inclusion by openhab : the device shows the signal for successful secured inclusion BUT the immediate wake status that follows does never terminate (it should terminate after 10 seconds when the discovery is completed).
  • openhab logs report the device as “ONLINE”
  • from openhab admin UI, thing is discovered, channels are added
  • node.xml is NOT created
  • there is no activity in the debug log when I wake up the device, even after restarting openhab
  1. I tried to factory reset + cleanup again, but I reincluded by silabs : inclusion and immediate wake-up phase that follows both finish well

BUT when I plug the controller back in, and restart, openhab :

NODE 31: Error decapsulating security message
java.security.InvalidKeyException: No installed provider supports this key: (null)

Well option 1 looks close since channels were created. You could try again but on the controller UI page, advanced, change the max awake time to 20 seconds. Security inclusion takes longer and if it doesn’t finish it might get locked up.

Option 2 are you checking to make sure you are using S0 security (only option in OH). The silabs tool has several options, the default might not be S0

Still not working :frowning:

  1. With 20s delay, the same happens (channels are there, but no further activity)
  2. Silabs reports the included device as in S0 mode, yes

A debug log of a fresh inclusion attempt in OH might help to see what is going on inside the binding. Is the device close to the controller? Other than that I’ve got nothing (outside of non security) Sorry.

Edit I did look yesterday at silab. Under decode/code, S0, use current, I saw my device returned the S0 code, Does that match OH?