[SOLVED][HELP] How to configure homeassistant container to use symlink /dev device

Hi,

I just bought a shiny Aeotec Z-Wave stick and I want to expose it to my Hass.IO’s home assistant container using a symlinked dev device.

By default, it passes /dev/ttyACM0 but I see a couple of reasons why this could give me issues down the line. So I have a udev rule that symlink the Aeotec USB stick to /dev/zwave. That’s the device that i want to expose to the Home Assistant container, not the ttyACM0 one.

I just don’t know what I need to change in order to make it work.

Where’s the docker-run command I need to change to change the exposed device to the symlink? I tried manually adding it to hassio-supervisor but it doesn’t work. Home Assistant log reports /dev//zwave doesn’t exists.

I installed Hass.io using hassio_install script, using “raspberrypi2” arch (running on Cubox-i4). If that makes any difference.

Thanks!

You don’t modify the docker run command.

Go to the hardware tab in hassio and select your device.

In over a year and a half, my zwave stick has never changed from /dev/ttyACM0

I don’t have a hardware tab in the Hass.io panel.

I have “Dashboard”, “Snapshot”, “Add-on Store” and “System”.

None of them contains anything related to what you’re saying.

Have you looked in SYSTEM?

Yes, none of the tabs named in my last post contain anything related to hardware selection.

In anyway, I find it dissapointing to not be able to specify what device I wish to expose to the docker container.

That seems super weird that I see a hardware button that lists the hardware attached to your system…super weird

All devices ARE exposed already

Well /dev/zwave symlink isn’t.

What’s going to happen if I plug in a new USB-Serial device on my system and then reboot? Another device could acquire ttyACM0. Not fun.

I plan on having a Zigbee USB serial device hooked up soon. I don’t want to have to guess which device is mapped where everytime I reboot my system.

What if I remove hte Aeotec stick for manual pairing and once plugged back in it’s not assigned to ttyACM0 (because it wasn’t properly closed or something first time I unplugged it)?

I just can’t believe there is no way to manually expose symlink as devices…
I don’t want to stupidly rely on exposing ALL system ressource to a container. I want to have a certain control, and certainty on what’s exposed and why.

1 Like

I’ve never had that problem.

There is. If you don’t use hassio. Lol.

Then you’re using the wrong install method.

Yeah that’s what I’m starting to realize :yum:

Anyway, I’m going to trust the Unix gods and use ttyACM0 in my HA config for now.

What are you going with hassio for?

Why not just try normal home assistant in docker?

Add-ons seemed like much added value on top of HA.
Getting notified of new versions and easily installing them.

Hass.io does makes it all easy to manage when you’re starting up with HA (and docker too in my case!).

Installing updates is a simple single command for me. I also prefer to wait until .1 releases. I never install .0 releases.

The add-ons are nothing more than docker containers. You can literally duplicate the functionality in normal docker.

I too am cautious about updates.I’ve seen a few threads where stuff just flat out broke. Thanks for the advice.

I now know that the add-ons could theoritically be manually installed.

I will probably change my install setup in the future. Just not right now.

Thanks!

Ended up using symlink in /dev/serial/by-id which is present in the container fs. Next best thing as I don’t plan on hooking up two Aeotec Z-wave dongles.

1 Like

Hi,
can you explain me what you did step by step? I have the same Problem on my rpi3 with HassOS 1.12
and Home Assistant 0.84.6. I tried the Aotec and the UZB1 and both are swapping from ACM0 to ACM1 after while.
I created “99-usb-serial.rules 99-usb-serial.rules” and inserted

SUBSYSTEM==“tty”,ATTRS{idVendor}==“0658”, ATTRS{idPrtoduct}==“0200”,SYMLINK+=“zwave”

That did not work.
In the config I tried to use “usb_path: /dev/serial/by-id/usb-0658_0200-if00” but that didn`t work either.

Thanks.

Mapping to “/dev/serial/by-id/” should definitely work. It should be exposed in the Home Assistant docker container. To be sure, launch a bash shell in it and list “/dev/serial/by-id/”. They should all be in there.

One last thing is I needed to delete the Z-Wave integration in HomeAssistant that was previously made using my initial Z-wave device mapping (/dev/zwave). Even if I changed the USB device used in my Configuration Yaml file to use the by-id device, it would still stick to using “/dev/zwave”. Deleted the Z-Wave integration in Home Assistant WebUI, restarted HA and it worked.

Enabling debug logging for the Zwave component helped me figure it out. Try to enable that as well and check the logs.

1 Like

Thank you! It works.
I had to delete the Z-Wave Integration.

Sorry for hijacking the thread. In my hass.io running on a Raspberry Pi 3 I lack the /dev/serial directory. I’ve searched the forum and rest of the web for information on exposing /dev/serial/by-id but I sort of get the feeling that it is supposed to be exposed in hass.io. I don’t understand why it’s not exposed in mine. My hass.io supervisor is at version 145. When I log in I do it through the SSH server add-on.

Is /dev/serial/by-id supposed to be visible when logging in through the SSH server add-on?

If it is, any idea how I can make it visible?

First of all, is /dev/serial/ present on root file system?