Open Z Wave Config File for Network Key Generation

Hi all, I need some expert help here please. I have a Danalock V2 which I am trying to incorporate into my HA. My HA is running on RPI3 with a Aeontec Z Stick.

I have read that the lock needs to be paired securely and a network key needs to be generated and added into the options file. The problem is that I cannot locate the options file at all. My HA is installed using the AIO installer.

Thanks very much in advance.

Use this command to generate a key:

cat /dev/urandom | tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g'

And add it to your configuration.yaml example:

zwave:
  usb_path: /dev/ttyACM0
  network_key: <ouput from the above command>
2 Likes

You can add the network key to your configuration.yaml under the zwave: label.

zwave: 
  usb_path: /dev/ttyACM0
  network_key: "0x49, 0x43, 0x1D, 0xBD, 0x03, 0x6D, 0x9D, 0x8C, 0x39, 0x67, 0x16, 0x82, 0xA8, 0x67, 0xEE, 0x91"
1 Like

Thank you very much !!! firstof9 and zarthan!!!

You are a lifesaver!!! it worked. Loved this community. Much appreciated!!!

For anyone struggling to work the OSX command to generate a network key, use the following

cat /dev/urandom | LC_CTYPE=C tr -dc '0-9A-F' | fold -w 32 | head -n 1 | sed -e 's/\(..\)/0x\1, /g'

This works because it fixes the tr: Illegal byte sequence issue that OSX gives you by prepending LC_CTYPE=C to the command. Checkout this writeup for more detail.

1 Like