Hass.io on Ubuntu and UDEV rules

I’ve installed hass.io on Ubuntu and it works great. How can I go about passing my UDEV rules for my symlink /dev/zwave stick into the homeassistant docker container?

Is there a dockerfile or something I could edit?

I see reference to adding -v /dev/zstick:/dev/zstick \, just not sure where that would go. I thought initially /usr/bin/hassio-start, but doesn’t seem that it’s applying it to the homeassistant container.


You don’t have to, just set /dev/zwave as port in the configuration of the component you need it.
The docker stuff should never be touched manually, that’s the whole point of Hass IO

Except it’s not working. Home Assistant UI shows me an Invalid zwave configuration when I try that. Why? Because the symlink in /dev isn’t copied over to the docker container. Even after a reboot of the host.

Here’s how I know that:

On the host:

obrien@hass:~$ ls -al /dev | grep zwave
lrwxrwxrwx  1 root root           7 Jan 17 11:33 zwave -> ttyACM0

This confirms it’s there and working. Now checking the docker container:

obrien@hass:~$ sudo docker exec -ti homeassistant ls -al /dev | grep zwave

Null return. To make sure, let’s open bash in the container itself and try the command:

obrien@hass:~$ sudo docker exec -ti homeassistant /bin/bash
bash-4.4# ls -al /dev
crw-------    1 root     root       10, 238 Jan 17 11:33 vhost-net
crw-------    1 root     root       10,  55 Jan 17 11:33 vmci
crw-rw-rw-    1 root     root       10,  54 Jan 17 11:33 vsock
crw-rw-rw-    1 root     root        1,   5 Jan 17 11:33 zero

So I see all other dev devices inside the homeassistant container except the symlink for zwave.

So how do I carry over the symlink into the docker container for homeassistant?

My guess is by adding -v /dev/zstick:/dev/zstick (or even just -v /dev:/dev) to the startup file that has the docker run in it, but I can’t find it.

Again: You should NEVER touch the docker run commands :wink:

What is in your configuration?

  usb_path: /dev/ttyACM0

I want to use the udev rules.d symlink /dev/zwave but it’s not working as shown above.

Did you figure this out? I’m having this same problem- /dev symlinks aren’t being passed either by default or explicitly into the hassio container.

Nope, it needs to be included in the dockerfile that the hass.io devs generate. I don’t think it’s an option for right now. Maybe on HassOS it’ll be included?

Problem is still here. I noticed it after I replaced a hard-coded /dev/ACM0 with a udev generated softlink. The link is not propagated to the docker container.

Hi guys, I stuck with the same problem here: symlinks are not being passed by supervisor to HA. Is there any option to fix the name and also pass it down to the container?

No - but what I found to be the solution was to SSH to hassio, then run hassio hardware info then under the serial: section look for the named identifier of your USB stick. Mine shows my zwave stick like this: /dev/serial/by-id/usb-0658_0200-if00

Then paste that into your configuration and it should be good to go.

1 Like

Hi @obrienlabs. Thanks! It worked! I figure out that myself a week ago but nice to mention to those who didn’t! Maybe it worth adding to the docs somewhere I don’t know.