OK, so I a trying to get off of the failing Wink platform. Zwave lights are working great, but while my Zwave Schlage lock was added to Zwave2MQTT the status does not update, nor does my command changes take effect.
Zwave2MQTT shows the lock as a Secure Keypad Door Lock, model BE468 Touchscreen Deadbolt (Schlage (Allegion)), and it says the device is “Alive”. However, toggling the Locked (7-98-1-0) switch the Zwave2MQTT interface does not lock or unlock the deadbolt, nor does it update the zwave/entry/7/98/1/0/set MQTT entry.
I added it to Zwave2MQTT with an empty Network Key as my Zwave network has thus far not been secured. Could that be a problem?
I am running the up to date Zwave2MQTT hassio add-on, on 0.100.3 Home Assistant with an Aotec Zwave dongle.
P.S. Here is my MQTT lock definition. However, since the Zwave2MQTT interface can’t change the lock, I’m not surprised that this entity cannot either.
You can’t use secure features without a network key. You’ll need to add a network key and re-include the lock. I don’t use Zwave2MQTT, I am assuming it doesn’t generate a key for you, like HA does. You can check the OZW_Log.txt (first few line), or verify with the Zwave2MQTT project.
It doesn’t generate a key, you’ll need to do that yourself. I just started using Zwave2MQTT just a couple of weeks ago, and I found a few different ways to generate a key:
Methods to generate a key:
1) cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g'
2) pwgen -s 16 1|od -A n -t x1|sed 's/ /,0x/g'|sed 's/,//'|sed 's/0x0a//' (requires pwgen to be installed)
3) https://www.random.org/cgi-bin/randbyte?nbytes=16&format=h
These methods generate a text string representing hex bytes, and they may need to be edited as ZWave2MQTT wants a comma separated list of hex bytes without any spaces.
Does enabling a secure Z-wave network require all devices to re-join the network in secure mode? Or can I just include the lock securely and leave the handful of lights and switches on the unsecured network? I might just exclude and re-include all 5 of them anyway. I’m just curious.
I wonder if Wink generated a key so that’s why the locked worked for it? I definitely didn’t create a key for it, as originally I just used Z-wave a few lights switches and it seemed silly to add security overhead for lights.
Thank you @freshcoast for confirming that I need to add it securely, and thank you @wmaker for the keygen tips.
You can run a mix of secure and non-secure devices. Just note there may be functionality a device can’t support in non-secure mode, but can in secure mode.
Okay @wmaker, @freshcoast, or anyone. I generated a network key, saved it in zwave2mqtt’s settings, then added my Z-wave lock. While it appeared to add, it was not secure, and I could not lock/unlock or get the updated status of the lock.
I finally decided to wipe exclude all of my devices, factory reset my z-stick, and try this again. Zwave2MQTT still shows the z-stick’s secure status as “no” even though I generated a key and added it to the Zwave2MQTT settings. What am I missing? Is there some way to add the key to the z-stick directly that I need to do?
Sorry, I’ve been out for a couple of weeks. Looks like you may have given up, but nevertheless I will share what I know.
I have successfully included some of my devices using only the Zwave2MQTT GUI.
Setup the Key:
In the “Settings” page and under the heading “ZWave” under “Network Key”, I simply added a comma separated list of 16 hex bytes without any spaces (See above for how to generate a random list of these hex bytes).
To include a device in secure mode
ControlPanel->Actions “Add Node (inclusion)” Click the “>>”
Will prompt to add in secure mode (if you have keys configured) with choice to Cancel or OK.
For Secure Mode Hit OK
For non-Secure Mode Hit Cancel
Goto device to include and do what’s needed for it to join the network in secure mode.
Couple of other things:
I did not store the key in the ZStick.
Even though I included some of my devices in secure mode (at the time using v2.0.4), they show in the GUI (now using v2.0.5) under the “secure” column with value “no”. This showing of “secure” mode was a recent addition in v2.0.5 but it may still be an open issue as to whether it works or not (I’m not sure): https://github.com/OpenZWave/Zwave2Mqtt/issues/133