Z-wave usb stick problem through Docker

Hi all,

I’m having a problem getting my Aeotec Gen 5 Z-wave usb stick to work. I’m using Docker for Home assistant, through docker-compose. Previously, I had a PI, with the usb stick in it, and I used the zwave stick through a ser2net/socat connection. Although that works, it was verry errorprone and I had to use a separate docker container, containing socat.

Now I want to connect the usb stick directly to my intel Nuc, and want to pass it through Docker to Home assistant, but I have troubles to get that to work.

I installed Proxmox on my nuc. One of the VM’s on proxmox is a docker-vm, that contains the Home assistant docker image. When ssh’ing into proxmox, I see the zwave stick, connected as /dev/ttyACM0. In proxmox, I’ve connected the usb port to the docker VM and that works correctly. In the Docker VM, i also see the usb stick as /dev/ttyACM0. I installed Home Assistant directly on that VM, and after I added this in my configuration, I see the zwave stick in Home assistant:

zwave:
  usb_path: /dev/tyACM0
  network_key: !secret zwave-network_key

In my docker-compose.yaml file, my home-assistant configuration is as follows:

  homeassistant:
    container_name: home-assistant
    restart: unless-stopped
    image: homeassistant/home-assistant
    devices:
      - /dev/ttyACM0:/dev/ttyACM0
    volumes:
      - /srv/docker/homeassistant/config:/config
      - /srv/docker/homeassistant/media:/media
      - /etc/localtime:/etc/localtime:ro
    network_mode: host
    privileged: true

When I use the exact same configuration, there aren’t any z-wave devices. When I enter the console, I see that the adapter is connected:

root@duin-srv-docker-1:/usr/src/app# ls -al /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Feb 25 14:34 /dev/ttyACM0

When Home assistant starts, I see:
2019-02-25 14:43:12 INFO (MainThread) [homeassistant.loader] Loaded zwave from homeassistant.components.zwave
but besides that line, I don’t see a line referring to zwave. There isn’t a OZW.log file. In the configuration, there is a z-wave option, but the nodes list is empty.

Does anyone have a clue what’s going on?

I see two things to try:

  1. You are missing a “t” in the zwave: entry. You have /dev/tyACM0. Should be /dev/ttyACM0.
  2. Since you are running the docker container as privileged, you don’t need to pass the device through. Try commenting out the devices: and the following line for now and verify it passes through.This is my docker-compose entry and I pass through two different sticks. (NOTE: Indents aren’t playing well with the forums. It is formatting properly in my docker-compose yaml file.)

homeassistant:
container_name: homeassistant
image: homeassistant/home-assistant:latest
restart: unless-stopped
network_mode: host
privileged: true
depends_on:
- mosquitto
- nodered
volumes:
- /srv/docker/homeassistant/config:/config
- /srv/docker/homeassistant/db:/db
- /etc/localtime:/etc/localtime:ro

Hi Gregg,

The missing ‘t’ is a copy paste error I guess; the zwave entry in my configuration.yaml was correct. The problem was the devices in my docker-compose.yaml; when I remove that, Home Assistant finds the Z-wave stick and sees my Z-wave devices. Thanks for your help!