Z-wave USB via docker

So I have the Aeon Labs Aeotec Z-Wave Gen 5 USB stick and HA running inside docker on my Linux box. I am following the instructions here: home-assistant.io/components/zwave/ but when I run an interactive docker shell, doing the ls on /dev/ttyUSB* or /dev/ttyACM* doesn’t return anything. In the host OS /dev/ttyACM0 is the only device returned. Is this what I should use in my config?

Thanks!

So it looks like you need to expose the ports to docker by adding this to the run command:

--privileged -v /dev/ttyACM0:/dev/ttyACM0

So basically when you first run the container you would do this:

docker run -d --name="hass" -v /path/to/host/config:/config -v /etc/localtime:/etc/localtime:ro --privileged -v /dev/ttyACM0:/dev/ttyACM0 --net=host balloob/home-assistant

If I get time I will try to make a pull request to update the documentation.

1 Like

Instead of privileged, you can use this to map a device into your docker instance: --device=/dev/ttyUSB0:/zwaveusbstick:rwm

2 Likes

Nice! I like it! I will try to make a PR to mention this in the docs. :slight_smile: Thanks!

Hmmm, that doesn’t quite work for me, I get this error:

error gathering device information while adding custom device “/dev/ttyACM0”: not a device node

1 Like

/dev/ttyUSB0 is how the device is called on my Mac, your device name might be different.

My device is definitely located at /dev/ttyACM0 on my Ubuntu Linux box. It seems to work when I use the --privileged flag but when I try to start docker with the simple --device I get the error I mentioned. Perhaps my version of docker is older or ot works differently on Linux.

Hi, I also experiencing similar issue, but with Arduino over /dev/ttyUSB0. It’s not working in latest Docker build (will try dev lated today). But it works in old bolloob/homeassistant image.
using Docker version 1.6.2, build a263667 on Synology DS3615x (all right it is not exactly Synology, but XPEnology on Intel based board).

This is an error from log:
16-05-24 08:31:17 homeassistant.bootstrap: Error during setup of component arduino Traceback (most recent call last): File "/usr/src/app/homeassistant/bootstrap.py", line 157, in _setup_component if not component.setup(hass, config): File "/usr/src/app/homeassistant/components/arduino.py", line 29, in setup BOARD = ArduinoBoard(config[DOMAIN]['port']) File "/usr/src/app/homeassistant/components/arduino.py", line 58, in __init__ self._board = PyMata(self._port, verbose=False) File "/usr/local/lib/python3.4/site-packages/PyMata/pymata.py", line 127, in __init__ self.transport = PyMataSerial(port_id, self.command_deque) File "/usr/local/lib/python3.4/site-packages/PyMata/pymata_serial.py", line 53, in __init__ timeout=int(self.timeout), writeTimeout=0) TypeError: __init__() got an unexpected keyword argument 'writeTimeout'

Are you use an donker with zwave on macos?

Do you use donker with vbox?