Docker Z-Wave Security Key

Hi I am running the hass docker image and have recently added a Aeotec Z-Wave USB and its up and running thanks to the information here on the forum.

I want to set a security key and I understand this is kept in options.xml within the openzwave library config directory. This directory does not seem to be mapped in the docker image so it would seem that it is stored inside the docker image itself - when I upgrade the docker I will loose the configuratiuon.

Ideally this should be installed in /config which is mapped to a persistent file system.

How are other folks using docker handling the options.xm file?

Hi,
I just ran into the same issue.
Turns out, you can put the options.xml anywhere on a persistent volume and then just map that file into the original path, e.g.:

docker run -d --name="hass" \
...
-v /persistent/config:/config \
-v /persistent/config/options.xml:/usr/src/app/build/python-openzwave/openzwave/config/options.xml \
homeassistant/home-assistant:latest

Hope that helps!

Sebastian

In your configuration.yaml file is your z-wave config_path: /usr/local/lib/python3.5/site-packages/libopenzwave-0.3.1-py3.5-linux-x86_64.egg/config

or /usr/src/app/build/python-openzwave/openzwave/config/

I’m guessing the latter is the proper one use?

Also in your OZW_Log.txt file do you get:

2016-10-26 15:27:51.237 Always, OpenZwave Version 1.4.2215 Starting Up
2016-10-26 15:27:51.373 Info, Setting Up Provided Network Key for Secure Communications
2016-10-26 15:27:51.373 Warning, Failed - Network Key Not Set
2016-10-26 15:27:51.373 Info, mgr, Added driver for controller /dev/ttyACM0
2016-10-26 15:27:51.373 Info, Opening controller /dev/ttyACM0
2016-10-26 15:27:51.373 Info, Trying to open serial port /dev/ttyACM0 (attempt 1)
2016-10-26 15:27:51.380 Info, Serial port /dev/ttyACM0 opened (attempt 1)
2016-10-26 15:27:51.381 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2016-10-26 15:27:51.381 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2016-10-26 15:27:51.381 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2016-10-26 15:27:51.381 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2016-10-26 15:27:51.381 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa

Even when you have a working options.xml file with a security key embedded?

Sorry, I did miss your reply until now.
Yes, the config path in my configuration.yaml is /usr/src/app/build/python-openzwave/openzwave/config/.

On startup, I get this im the OZW_Log.txt:

2016-10-28 21:56:09.046 Always, OpenZwave Version 1.4.2215 Starting Up
2016-10-28 21:56:16.819 Info, Setting Up Provided Network Key for Secure Communications
2016-10-28 21:56:16.819 Info, mgr,     Added driver for controller /dev/ttyACM0
2016-10-28 21:56:16.821 Info,   Opening controller /dev/ttyACM0

If your’re not sure if the container “sees” the correct file, just go inside the container (i.e. docker exec -ti <containerid> /bin/bash) and see if the network key is there.

Sebastian

The default value for config_path seems to be /usr/local/lib/python3.5/site-packages/libopenzwave-0.3.3-py3.5-linux-x86_64.egg/config in the docker container.

This is not as convenient as /usr/src/app/build/python-openzwave/openzwave/config for sure…