I’m trying to get aeotec gen5 zwave stick to work with homeassistant running on ubuntu/docker-compose. It was previously attached to hassbian installation running on pi3 and worked perfectly. I’m moving my services now to PC running ubuntu.
Docker-compose file (HA part). Running in privileged mode to be sure devices are exposed.
version: '3'
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant
volumes:
- /home/juha/homeassistant/conf:/config
- /etc/localtime:/etc/localtime:ro
# devices:
# - /dev/serial/by-id/usb-0658_0200-if00:/dev/ttyAMA0
privileged: true
restart: always
network_mode: host
depends_on:
- "mqtt"
- "nodered"
user: 1000:1000
The problem is that homeassistant is not accepting the stick.
I can see the stick on the ubuntu machine (removed non relevant):
$ lsusb
Bus 002 Device 004: ID 0658:0200 Sigma Designs, Inc.
The following command to see device and serial
$ ls -1tr /dev/tty*|tail -n 1
/dev/ttyACM0
$ ls -ltr /dev/tty*|tail -n 1
crw-rw---- 1 root dialout 166, 0 maali 23 18:13 /dev/ttyACM0
$ ls -lA /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 maali 23 18:12 usb-0658_0200-if00 -> ../../ttyACM0
I have tried to put in the zwave integrations page:
/dev/serial/by-id/usb-0658_0200-if00
/dev/ttyACM0
Did not work. Then I tried creating a symlink for /zwaveusbstick with UDEV rules, didn’t work either.
This is the list I see in the container
$ docker-compose exec homeassistant sh
$ cd /dev
$ ls
autofs i2c-3 loop23 rfkill tty17 tty39 tty60 ttyS23 vcs2
bsg i2c-4 loop3 rtc0 tty18 tty4 tty61 ttyS24 vcs3
btrfs-control i2c-5 loop4 sda tty19 tty40 tty62 ttyS25 vcs4
bus i2c-6 loop5 sda1 tty2 tty41 tty63 ttyS26 vcs5
core input loop6 sg0 tty20 tty42 tty7 ttyS27 vcs6
cpu kmsg loop7 sg1 tty21 tty43 tty8 ttyS28 vcsa
cpu_dma_latency lightnvm loop8 shm tty22 tty44 tty9 ttyS29 vcsa1
cuse loop-control loop9 snapshot tty23 tty45 ttyACM0 ttyS3 vcsa2
dri loop0 mapper snd tty24 tty46 ttyS0 ttyS30 vcsa3
drm_dp_aux0 loop1 mcelog sr0 tty25 tty47 ttyS1 ttyS31 vcsa4
ecryptfs loop10 mei0 stderr tty26 tty48 ttyS10 ttyS4 vcsa5
fb0 loop11 mem stdin tty27 tty49 ttyS11 ttyS5 vcsa6
fd loop12 memory_bandwidth stdout tty28 tty5 ttyS12 ttyS6 vfio
full loop13 mqueue tpm0 tty29 tty50 ttyS13 ttyS7 vga_arbiter
fuse loop14 net tty tty3 tty51 ttyS14 ttyS8 vhci
gpiochip0 loop15 network_latency tty0 tty30 tty52 ttyS15 ttyS9 vhost-net
hidraw0 loop16 network_throughput tty1 tty31 tty53 ttyS16 ttyprintk vhost-vsock
hidraw1 loop17 null tty10 tty32 tty54 ttyS17 uhid zero
hidraw2 loop18 port tty11 tty33 tty55 ttyS18 uinput
hpet loop19 ppp tty12 tty34 tty56 ttyS19 urandom
hwrng loop2 psaux tty13 tty35 tty57 ttyS2 usb
i2c-0 loop20 ptmx tty14 tty36 tty58 ttyS20 userio
i2c-1 loop21 pts tty15 tty37 tty59 ttyS21 vcs
i2c-2 loop22 random tty16 tty38 tty6 ttyS22 vcs1
The integration page is only displaying:
Z-Wave validation failed. Is the path to the USB stick correct?
No errors are produced to log. If I add it manually to configuration.yaml I get this. (tried with all as above)
Error setting up entry Z-Wave (import from configuration.yaml) for zwave
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/openzwave/option.py", line 75, in __init__
raise ZWaveException(u"Can't write to device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: "Zwave Generic Exception : Can't write to device /dev/ttyACM0 : ['NoneType: None\\n']"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/app/homeassistant/config_entries.py", line 302, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/app/homeassistant/components/zwave/__init__.py", line 278, in async_setup_entry
config_path=config.get(CONF_CONFIG_PATH))
File "/usr/local/lib/python3.7/site-packages/openzwave/option.py", line 81, in __init__
raise ZWaveException(u"Error when retrieving device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: 'Zwave Generic Exception : Error when retrieving device /dev/ttyACM0 : [\'Traceback (most recent call last):\\n\', \' File "/usr/local/lib/python3.7/site-packages/openzwave/option.py", line 75, in __init__\\n raise ZWaveException(u"Can\\\'t write to device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\\n\', \'openzwave.object.ZWaveException: "Zwave Generic Exception : Can\\\'t write to device /dev/ttyACM0 : [\\\'NoneType: None\\\\\\\\n\\\']"\\n\']'
It implies docker cannot write to the USB device?
I tried running following. I have user: 1000:1000 in the docker-compose so I suppose docker is trying to write with account “juha”? Did not work. Same error.
$ sudo usermod -aG dialout juha
Then I tried to setup HA in virtual environvent without docker stuff. Installed OK, but was not able to create user. Just prompted to login. So I ditched that. Then I tried running HA without docker-compose in “normal” docker with the commands from the HA installation page. Adding the device parameter to pass the stick to container. No luck.
I’m lost. I read similiar posts on the forum but I can’t find any solutions. Hopefully someone knows what my error is?