Warning, Failed - Network Key Not Set

Using Aeotec Z-Stick Gen5 together with Hass.io on a Raspberry Pi. Getting the Network Key Not Set even though I have set it in configuration.yaml:

2018-11-30 16:26:53.907 Always, OpenZwave Version 1.4.3253 Starting Up
2018-11-30 16:27:00.296 Info, Setting Up Provided Network Key for Secure Communications
2018-11-30 16:27:00.297 Warning, Failed - Network Key Not Set

Here is my configuration.yaml entry:

zwave:
usb_path: /dev/ttyACM0
network_key: "0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E, 0x5E"

I can ad devices ok. Even by using ADD NODE SECURE, but I guess they aren’t really secure.

If this is the exact formatting, you’re indents are wrong for usb_path and network_key

No, the indents are correct in my configuration.yaml file. Just got screwed up when trying to use this forums preformatted text option.
Can’t get it to work using the network key in the configuration. yaml file, but if I ad the key to options.xml it work.

I’m having the same issue here where the network_key is not being applied to the zwave configuration.

FWIW, I seemed to get the network key working by setting the value in the options.xml directly and removing the network_key setting from my HASS zwave config.

That’s what I did too. I just wish stuff would work as described in the documentation.

If you already configured Z-Wave and then try to add the network key after, you can’t use configuration.yaml anymore to set it. You will need to edit the file .storage/core.config_entries instead.

The zwave key in configuration.yaml can actually be removed unless you have some device-specific configuration settings.

2 Likes

Thanks,

So does adding it to options.xml not do anything?

I assume so, especially if it’s working for you. OZW does currently look in that file for the user config. Usually though, HA sets up the configuration at run time when it loads the OZW driver. I wouldn’t rely on the options.xml in the future, plus it’s another file you have to worry about backing up.

What I don’t understand is, why doesn’t the OZW driver revisit the configuration.yaml file at reboot? It doesn’t make much sense or maybe I’m missing something.
Is this behavior documented in the tutorials?

What I don’t understand is, why doesn’t the OZW driver revisit the configuration.yaml file at reboot? It doesn’t make much sense or maybe I’m missing something.

OZW is not involved in this case. Z-Wave was converted to an “Integration”. Integration settings are stored in the .storage directory. The settings in configuration.yaml are imported only one time. Changing usb_path and network_key in the yaml file afterwards have no effect. The only thing the yaml file is used for is device configs and other settings. If you have no other configuration besides those two settings, you can just remove the zwave entry from your configuration.yaml.

Is this behavior documented in the tutorials?

Sort of. At Z-Wave - Home Assistant

You can also use the Z-Wave Integration in the Configuration menu to set up the Z-Wave component.

As of Home Assistant 0.81, the Z-Wave usb_path and network_key options are configured through the Integrations page in Home Assistant. Specifying a zwave: section in configuration.yaml is no longer required unless you need to customize other settings, such as device_config , polling_interval , etc.

It does say they are configured by the Integrations page, but maybe it could be more explicit and say that’s the only place they are configured now. The documentation could probably be clarified in this regard (feel free to submit an issue or PR!). But also, I think the Integration is still a work in progress.

1 Like

I had the same issue when trying to add my kwikset 916 dead bolt; it would let me add it however would not let me control it. As many did, I added my z-wave network key to the config file after my initial z-wave set up. However, I found a much better option then manually entering.

If you have already set up your z-wave network and have added zwave: code to the configuration file follow these steps to fix your secure devices:

Step 1: Remove your secure devices from the z-wave network by selecting the node and clicking “remove node” (Follow each devices remove from network instructions).
Step 2: After you have removed the devices from your network. Remove the z-wave code you manually added to any configuration/option file.
Step 3: Go to Configuration>Integrations> Delete the Z-Wave Integration
(Note: This will not remove your existing devices since they are stored on your Z-Wave Stick. However, if you have created custom names for devices you may have to rename them again after.)

Step 4: Go to Supervisor>System>Reboot

Step 5: Create a network key
(There are many ways to generate one however I just changed some of the characters of this example one I found)
0x67, 0x8b, 0x93, 0x5d, 0x84, 0x8b, 0x58, 0x31, 0x06, 0x08, 0xe9, 0xf7, 0xaa, 0x60, 0x9d, 0x5e
(Note: There should not be a z-wave integration after reboot, also your configuration files should be z-wave free at this point)

Step 6: Go to Configuration>Integration>Click “Add Integration”>Add Z-Wave>A dialog box will pop up with 2 text boxes, Path & Network Key
Step 7: For Path Enter: /dev/ttyACM0 For Network Key Enter your network key without parentheses
Example: 0x67, 0x8b, 0x93, 0x5d, 0x84, 0x8b, 0x58, 0x31, 0x06, 0x08, 0xe9, 0xf7, 0xaa, 0x60, 0x9d, 0x5e
Step 8: Start the Z-Wave network and add your secure devices that you removed using Add Node Secure.

Happy Holidays.