I am setting up my Home Assistant in Docker on a Lubuntu mini-PC. I just got tired of the Raspberry Pi (with HASSIO) in terms of it taking forever to restart after config changes. After a break-down, where I could not even restart Hassio anymore, I decided to run it in Docker on a more powerful machine. And indeed, HASS becomes supersnappy in the Docker setup, and I made some good progress thanks to the Home Assistant / Docker videos on the BurnsHA YouTube-channel. Currently, I got Home Assistant, InfluxDB and Mosquitto running very smoothly in Docker.
However, I have spent a lot of hours and a lot of different guides from the Internet trying to get my Z-wave working. I had it running in Raspberry fine - with an Aeotec Z-wave stick, Aeotec three 6-in-1 sensors and eight Eurotronic Spirit radiator thermostats.
It appears that Home-Assistant cannot âseeâ the stick. Of course, Home-Assistant needs to be able to communicate with the USB port and z-wave stick on my Lubuntu host machine - from within its Docker container.
So, I found a number of forum posts and other, with people having similar problems. Mainly around making the USB port with the z-wave stick available to the Docker container in which HASS runs.
A first step is to identify the USB port in which the z-wave controller is. I found some information on how to do this and identified the port as:
/dev/ttyACM0. So far, so good.
I found some posts on how to spin up a container with the USB port mapped to the container. Suggested adding the ââprivilegedâ part to the â-v /devâŚâ mapping. So - full command:
sudo docker run -d \--name="home-assistant" \--restart on-failure \--privileged -v /dev/ttyACM0:/dev/ttyACM0 \--label=com.centurylinklabs.watchtower.enable=false \-v /Users/demelo/HASS/hass_config:/config \-e "TZ=Europe/Copenhagen" \-p 8123:8123 \homeassistant/home-assistant
My configuration.yaml said:
zwave:
usb_path: /dev/ttyACM0
But, I read that since one of the recent Home Assistant versions, there is no longer need for this in, and I took it out.
But - no success. I get this in the OZW_Log.txt:
2018-12-23 12:14:32.295 Always, OpenZwave Version 1.4.3254 Starting Up
2018-12-23 12:14:33.026 Info, Setting Up Provided Network Key for Secure Communications
2018-12-23 12:14:33.026 Warning, Failed - Network Key Not Set
2018-12-23 12:14:33.026 Info, mgr, Added driver for controller /dev/tty
2018-12-23 12:14:33.027 Info, Opening controller /dev/tty
2018-12-23 12:14:33.027 Info, Trying to open serial port /dev/tty (attempt 1)
2018-12-23 12:14:33.027 Error, ERROR: Cannot open serial port /dev/tty. Error code 6
2018-12-23 12:14:33.027 Error, ERROR: Failed to open serial port /dev/tty
2018-12-23 12:14:33.027 Warning, WARNING: Failed to init the controller (attempt 0)
2018-12-23 12:14:38.027 Info, Opening controller /dev/tty
2018-12-23 12:14:38.028 Info, Trying to open serial port /dev/tty (attempt 1)
2018-12-23 12:14:38.028 Error, ERROR: Cannot open serial port /dev/tty. Error code 6
2018-12-23 12:14:38.028 Error, ERROR: Failed to open serial port /dev/tty
2018-12-23 12:14:38.028 Warning, WARNING: Failed to init the controller (attempt 1)
2018-12-23 12:14:43.028 Info, Opening controller /dev/tty
2018-12-23 12:14:43.028 Info, Trying to open serial port /dev/tty (attempt 1)
2018-12-23 12:14:43.028 Error, ERROR: Cannot open serial port /dev/tty. Error code 6
2018-12-23 12:14:43.028 Error, ERROR: Failed to open serial port /dev/tty
2018-12-23 12:14:43.028 Warning, WARNING: Failed to init the controller (attempt 2)
2018-12-23 12:14:48.029 Info, Opening controller /dev/tty
2018-12-23 12:14:48.029 Info, Trying to open serial port /dev/tty (attempt 1)
2018-12-23 12:14:48.029 Error, ERROR: Cannot open serial port /dev/tty. Error code 6
2018-12-23 12:14:48.029 Error, ERROR: Failed to open serial port /dev/tty
2018-12-23 12:14:48.029 Warning, WARNING: Failed to init the controller (attempt 3)
2018-12-23 12:14:53.029 Info, Opening controller /dev/tty
2018-12-23 12:14:53.029 Info, Trying to open serial port /dev/tty (attempt 1)
2018-12-23 12:14:53.029 Error, ERROR: Cannot open serial port /dev/tty. Error code 6
2018-12-23 12:14:53.029 Error, ERROR: Failed to open serial port /dev/tty
2018-12-23 12:14:53.029 Warning, WARNING: Failed to init the controller (attempt 4)
2018-12-23 12:14:53.029 Detail, contrlr, Notification: DriverFailed
So - I am confused that Home Assistant tries /dev/tty and not /dev/ttyACM0. But cannot figure out why.
I found something here: https://github.com/OctoPrint/docker/issues/7 (see post by JMERICH April 13) - I followed JMERICHâs post, but I still get:
2018-12-24 10:48:24.235 Always, OpenZwave Version 1.4.3254 Starting Up
2018-12-24 10:48:24.922 Info, Setting Up Provided Network Key for Secure Communications
2018-12-24 10:48:24.922 Warning, Failed - Network Key Not Set
2018-12-24 10:48:24.923 Info, mgr, Added driver for controller /dev/tty
2018-12-24 10:48:24.923 Info, Opening controller /dev/tty
2018-12-24 10:48:24.923 Info, Trying to open serial port /dev/tty (attempt 1)
2018-12-24 10:48:24.923 Error, ERROR: Cannot open serial port /dev/tty. Error code 6
2018-12-24 10:48:24.923 Error, ERROR: Failed to open serial port /dev/tty
2018-12-24 10:48:24.923 Warning, WARNING: Failed to init the controller (attempt 0)
⌠(continues for a number of attempts)âŚ
So - I am really lost here.
Any ideas? next steps?