Z-Wave in Hass.io - How To

I just switched over to Hass.io and at the same time attempted to use Z-Wave. I bought a Kwikset Z-Wave lock and have been trying to pair with it. I am using the Z-Wave config page in Hass.io.

My current configuration.yaml has this:
usb_path: /dev/ttyACM0
network_key: "0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01"

I also see there is an options.xml in my config directory with the “NetworkKey” section commented out. Should I also be putting the key in there? Is Hass.io supposed to update that file with the proper key?

What exactly is the procedure for pairing devices? Just put the device in pairing mode and click ‘Add Node Secure’ or ‘Add Node’? I haven’t found one definitive article saying how to pair in Hass.io.

The stock Z-Wave documentation applies to HassIO, except for the configuration (this will be mentioned in the documentation when it next updates). Just follow the instructions for adding devices - using Add Node Secure for devices that support it.

Don’t worry about options.xml.

Stupid question: what are you using for your z-wave hub? I bought the AeoTec z-wave stick.

I’m using a Razberry board, but many people are using the Aoetec 5th generation stick.

I am using the 5th gen stick myself.

When you add a device and it is picked up… what actually happens? Does it show up in the node list automatically or do you refresh the page to get it in the node list? I haven’t done any Z-Wave work on Hass until now. Just trying to make sure I understand the expected behavior.

Make sure you generate a random network key (secret) for your network e.g. see https://home-assistant.io/docs/z-wave/installation/#network-key

I think you need to do this before doing any “Add Node Secure”.

I had generated a unique key at the very beginning.

I actually got the lock to show up now by setting remove node, pressing the pair button, waiting a few seconds, setting ‘add node secure’, pressing the pair button, waiting 45-60 sec until zwave log activity stopped, and then restarting Hass. After this the lock shows up, but shows a ‘Dead (CacheLoad)’ status under the Zwave section in States.

If I try a ‘Heal Network’ I get this in the logs:

2017-10-27 14:38:19.049 Detail, Node001, Queuing (Controller) Request Node Neighbor Update
2017-10-27 14:38:19.051 Info, Requesting Neighbor Update for node 1
2017-10-27 14:38:19.051 Detail, Node002, Queuing (Controller) Request Node Neighbor Update
2017-10-27 14:38:19.052 Detail, Node001, Queuing (Command) ControllerCommand_RequestNodeNeighborUpdate (Node=1): 0x01, 0x05, 0x00, 0x48, 0x01, 0x11, 0xa2
2017-10-27 14:38:19.053 Detail, Notification: ControllerCommand - Starting
2017-10-27 14:38:19.072 Detail,
2017-10-27 14:38:19.073 Info, Node001, Sending (Command) message (Callback ID=0x11, Expected Reply=0x48) - ControllerCommand_RequestNodeNeighborUpdate (Node=1): 0x01, 0x05, 0x00, 0x48, 0x01, 0x11, 0xa2
2017-10-27 14:38:19.103 Detail, Node001, Received: 0x01, 0x05, 0x00, 0x48, 0x11, 0x21, 0x82
2017-10-27 14:38:19.104 Detail,
2017-10-27 14:38:19.105 Info, Node001, REQUEST_NEIGHBOR_UPDATE_STARTED
2017-10-27 14:38:19.106 Detail, Node033, Expected callbackId was received
2017-10-27 14:38:19.107 Detail, Node033, Expected reply was received
2017-10-27 14:38:19.108 Detail, Node033, Message transaction complete
2017-10-27 14:38:19.108 Detail,
2017-10-27 14:38:19.109 Detail, Node001, Removing current message
2017-10-27 14:38:19.111 Detail, Notification: ControllerCommand - InProgress
2017-10-27 14:38:41.625 Detail, Received: 0x01, 0x05, 0x00, 0x48, 0x11, 0x23, 0x80
2017-10-27 14:38:41.626 Detail,
2017-10-27 14:38:41.627 Warning, WARNING: REQUEST_NEIGHBOR_UPDATE_FAILED
2017-10-27 14:38:41.628 Detail, Notification: ControllerCommand - Failed
2017-10-27 14:38:41.632 Info, Requesting Neighbor Update for node 2
2017-10-27 14:38:41.633 Detail, Node002, Queuing (Command) ControllerCommand_RequestNodeNeighborUpdate (Node=2): 0x01, 0x05, 0x00, 0x48, 0x02, 0x12, 0xa2
2017-10-27 14:38:41.634 Detail, Notification: ControllerCommand - Starting
2017-10-27 14:38:41.638 Error, Node002, ERROR: Dropping command because node is presumed dead
2017-10-27 14:38:41.639 Detail, Node002, Removing current message
2017-10-27 14:38:41.640 Detail, Notification: ControllerCommand - Error - Failed

So, I just pressed the pair button and then did a refresh on the node at the same time. It came online and works. So far it has stayed online for 30 min. I’ll have to make sure it survives a restart of the RPi and the lock itself.

Maybe it wasn’t fully online when it was finishing the initial probe?

You’ll get an entity with a blank name in the states page. Once you’ve restart Home Assistant (not rebooted) it’ll be visible fully.

Dead, means that the lock isn’t communicating, I’ve seen a few threads about them doing that.

It could be that it’s too far from the Pi for reliable communication - Z-Wave is normally fine through one (plasterboard wall) and usually ok through 2. It all depends on the wall material, the angles, and other objects in the way.

I had the blank name and I knew to reboot at that point. After rebooting that is when it showed the dead status. After I did a node refresh while pressing the pair button on the lock it came online and hasn’t dropped off since.

You’ll need to remove all spaces from the network key if you have them.

I had some trouble with adding new z-wave devices to my Hassio installation. With the help of folks on the discord channel, I’ve learned that the best method to add devices is to first put the controller into Add Secure Node mode and then initiate a pair from the device you are adding. I’ve had a 100% success rate with this method.

Didn’t have any spaces, but it is working now.

Somehow putting it into remove mode and then putting into add secure node mode helped.

I’ve read that sometimes a device new out of the box was paired with a network during testing before shipping, so using exclude or remove first can help resolve issues. Not sure if that matches your scenario, but it may explain why you had to do extra steps.

when you say “the pair button” are you talking about the pair button on the Kwikset lock? (I believe it’s called the “A button” on my Kwikset 910).
I am struggling to get my Kwikset 910 to show up.
Also, what do you mean by a “refresh”?

By pair button I meant the white “Smart Code” button. By refresh I mean in the Hass.io z-wave console… selecting the node and clicking ‘refresh node’.

thank you for the reply. after restarting hassio and trying the method you described in your previous comment (remove node, press pair button, add secure node, press pair button) it started showing up in the list of nodes as an unnamed “node 2”. I believe somehow my z-stick froze up (nothing was changing in the “OZW log” regardless of what commands i gave it). but after restarting hassio (under Configuration > General > Server Management > restart) your method worked.

That’s great. If you chose to rename it from the Z-wave console you have to reboot again. I always do this for new devices… add device, rename node, reboot.

1 Like