[SOLVED] Accessing Z-Wave USB stick on hass.io installed using Docker on Ubuntu

I’ve had an old venv-based HA installation on my Ubuntu server, that I’m trying to turn into a modern, Docker/hass.io based setup. However, I’m stuck at getting Z-Wave functioning. :frowning:

The problem, as I understand it, is to make sure the Home Assistant docker instance can access the Z-Wave USB stick. Using the hints found in another forum post (Mapping z-wave dongle to Docker Homeassistant), I added “–device /dev/zwave” to the list of docker run options in /usr/sbin/hassio-supervisor. (I have an udev rule that sets up /dev/zwave as a symlink to my real USB stick).

However, this only makes /dev/zwave available to the hassio_supervisor docker image, not the homeassistant image. I’ve verified that I can see /dev/zwave on the former but not the latter.

So, unsurprisingly, I cannot configure Z-Wave on HA running in the latter container.

I’m fairly new to docker, and even newer to hass.io, so I can’t figure out how or where the hassio_supervisor docker instance spawns the homeassistant docker image. I’m assuming I need to pass in an additional --device argument there.

I’m also surprised I’ve found no information about this. I didn’t think I would be the only one trying to use hass.io using Docker directly (not on a Rasperry), and using Z-Wave… So maybe I’m missing something fundamental here.

You’re not on your own as I too would like to be able to setup using docker on Ubuntu. I’m at the early stages of setup (component for new server arrived this morning), so very interested to hear a solution to this. Good luck.

I just noticed that I have a /dev/ttyACM0 in the homeassistant docker image. I’m trying to figure out if that is indeed the Z-Wave stick. It was accepted as input for the basic Z-Wave component setup, but nothing seems to work, so I’m not convinced…

But it might be that the device is exported properly, only that the symlink name got lost on the way…

Just unplug the stick and then see if you still see it there.

Ok, I can confirm that this /dev/ttyACM0 is indeed my Z-Wave stick. It also seems that the added --device line was not needed; this did in fact “work” out of the box, minus the fact that I didn’t know the proper location of the USB device.

I’m still not sure if this device is named ACM0 because it was named so in my host, or if hass.io finds a valid USB stick and remaps the first such into ACM0. In any case, it all feels a bit brittle. But, at least, it’s working.

Also, I’m not getting any log from OZW. :frowning: That was the reason I did not at first know if the stick was correct. (I found out since the stick itself is listed as Node #1 in the node dropdown).

I am in this boat. MOving form Home Assistant on Docker to Hass.io on docker. Hassio does not detect the USB stick on my ubuntu host /dev/ttyACM0. How any help would be much appreciated @magicus @Isablend

Where do I add this –device /dev/zwave? Can I do this using portainer?

I moved my zwfg_xxxxx.xml file over.

The USB device should be auto discovered by Ubuntu, the issue sometime is the ordering of USB devices after reboot, depending upon the time each device takes to be discovered. With Zwave it gets named differently from other USB devices so I haven’t had it hop around.

In configuration.yaml I just have the following declaration;

zwave:
  usb_path: /dev/ttyACM0
  network_key: !secret zwave_key

from the command line the command ‘dmesg | grep USB’ will find the other USB devices and as stated in an earlier posting if you disconnect and re-connect you should be able to determine what is plugged into what port.

1 Like

@Isablend I know for sure that my USB stick is in /dev/ttyACM0. I was using it on Home Assistant on Docker without any issues.

On HAssio config, I already have the lines you mentioned. However, nothing shows up udner “Zwave Node Manage”.

If add this to a fresh install of home assistant, everything shows up as expected. On Hassio it doesnt. So I feel Hassio is unable to see the USB stick or something like that. I am not sure how to proceed.

One other thing to look out for, what version of HA are you using? Reason I ask is the zwave integration is currently broken as of 0.91.1 (something to do with an underlying library file), which is expected to be fixed in 0.91.2

Thanks for the quick response. I am on 0.91.1. But zwave devices now appear in zwave node management.

What I did was, both my old HA instance and new Hassio were running, with both having the same zwcfg_xxxxx.xml file. I deleted the file from old instance and restarted the system. Now it appears to be working, although I still have not tested any automations or any zwave devices.

I did not have to modify hassio-supervisor in /usr/sbin/ or add any udev rules. Entered into hassio container shell and saw /dev/ttyACM0 was already listed under /dev. So used that for zwave device.

So essentially, after moving the zwave configurations to hassio, the only thing I forgot to do was delete the zwcfg_xxxx.xml file form the old instance.

If someone sees something wrong with this approach, please let me know.

I can confirm that the zwave issue with 0.91.1 has been fixed with 0.91.2

Thanks. UPdated to 0.91.2.

Also, after updating, Z-wave nodes disappeared. The only way I could get the zwave nodes to show up on Hassio was to completely stop the old instance from running. So even with 1) zwave config removed from old instance and 2) zwcfg file deleted from old instance there was still some link somewhere.

I have to see if this is persists through restarts.

I have a similar situation.

HASS.io is running on a Raspberry Pi3 and I’m migrating from the Pi3 to Ubuntu on a different box on the same network.

The HASS.io instance on the server under docker is running well, but the zwave configuration doesn’t seem to be working.

The /dev/ttyACM0 port is visible through ssh and on the Hardware button under host system information in the Hass.io system tab, so I assume it can be seen.

I only have one Zstick, which I moved from the Pi3 (still in operation) to the Ubuntu server in hopes that I could simply configure the new instance of HASS.io and recognize the hardware. But, after adding the configuration information on the new setup, no Zwave configuration is loaded.

Do I need to eliminate something from the other host (192.168.1.2) before the new setup will see the stick?

EDIT: I’m an idiot. I forgot to put the zwave: !include in my configuration.yaml. I had created the include folder with the parameters for zwave, but forgot to tell the core config where the hell to look for it.

Seems that all of the nodes have been found in the new setup.

I am having the same issue… I moved from hassio on a RPI3 to Docker on Ubuntu 16.04. I followed the instructions from this YouTube video https://youtu.be/ekVfLXnoM7k

I have HA up and running but cannot get it to recognize my Z-Wave stick. If I SSH into the ubuntu machine I can confirm that the stick is at /dev/ttyAMC0, which is what my HA configuration.yaml lists for zwave.

I tried to start the zwave network through Configuration>Z-Wave>Start Network but it fails. Here is the z-wave log:

2019-09-09 09:23:56.082 Always, OpenZwave Version 1.4.3440 Starting Up
2019-09-09 09:24:56.833 Info, Setting Up Provided Network Key for Secure Communications
2019-09-09 09:24:56.833 Info, mgr,     Added driver for controller /dev/ttyACM0
2019-09-09 09:24:56.833 Info,   Opening controller /dev/ttyACM0
2019-09-09 09:24:56.833 Info, Trying to open serial port /dev/ttyACM0 (attempt 1)
2019-09-09 09:24:56.834 Info, Serial port /dev/ttyACM0 opened (attempt 1)
2019-09-09 09:24:56.834 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2019-09-09 09:24:56.834 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2019-09-09 09:24:56.834 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2019-09-09 09:24:56.834 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2019-09-09 09:24:56.834 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2019-09-09 09:24:56.834 Detail,
2019-09-09 09:24:56.834 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x15) - FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9
2019-09-09 09:24:57.835 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2019-09-09 09:24:57.835 Detail, contrlr, Removing current message
2019-09-09 09:24:57.835 Detail, contrlr, Notification: Notification - TimeOut
2019-09-09 09:24:57.835 Detail,
2019-09-09 09:24:57.835 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x20) - FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc
2019-09-09 09:24:58.835 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2019-09-09 09:24:58.835 Detail, contrlr, Removing current message
2019-09-09 09:24:58.835 Detail, contrlr, Notification: Notification - TimeOut
2019-09-09 09:24:58.835 Detail,
2019-09-09 09:24:58.835 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x05) - FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9
2019-09-09 09:24:59.835 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2019-09-09 09:24:59.835 Detail, contrlr, Removing current message
2019-09-09 09:24:59.835 Detail, contrlr, Notification: Notification - TimeOut
2019-09-09 09:24:59.836 Detail,
2019-09-09 09:24:59.836 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x07) - FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb
2019-09-09 09:25:00.836 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2019-09-09 09:25:00.836 Detail, contrlr, Removing current message
2019-09-09 09:25:00.836 Detail, contrlr, Notification: Notification - TimeOut
2019-09-09 09:25:00.836 Detail,
2019-09-09 09:25:00.836 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x56) - FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa
2019-09-09 09:25:01.836 Error, contrlr, ERROR: Dropping command, expected response not received after 1 attempt(s)
2019-09-09 09:25:01.836 Detail, contrlr, Removing current message
2019-09-09 09:25:01.836 Detail, contrlr, Notification: Notification - TimeOut

This is my first time using Docker for anything. As the video indicates I have portainer running as well (also new to this). Everything I find online talks about adding the /dev/ttyACM0 to the “devices” section in “your existing YAML file” for docker but I have no idea where this is and google is failing me!

Any help is much appreciated!! Thanks!

See if the Modem Manager service is running. If so, disable it using the command:

sudo systemctl disable ModemManager.service

Make sure the following is in configuration.yaml:

zwave:
  usb_path: /dev/ttyACM0

I got the Z-Wave aeon_labs_zw090_z_stick_gen5_us detected by homeassistant once I gave the docker container access to the host usb device /dev/ttyACM0 using the following:

docker run -t -i --device=/dev/ttyACM0 --init -d --name="home-assistant" -e "TZ=America/Chicago" -v /home/hass/homeassistant:/config --net=host --restart=unless-stopped homeassistant/raspberrypi3-homeassistant:stable

See https://stackoverflow.com/questions/24225647/docker-a-way-to-give-access-to-a-host-usb-or-serial-device