I’m having trouble connecting my zwave stick to HA in docker-compose. I’ve copied every reference I could google but no luck. I’m hoping one of you can point out what I must have missed.
Hardware: Intel NUC Kit NUC7CJYH (with 8GB RAM & 120GB SSD)
OS: Ubuntu 16.04 LTS
Zwave stick: Aeotec Z-Stick Gen5
Running ls -l /dev/ttyACM0
gives me
crw-rw---- 1 root dialout 166, 0 Jan 8 10:01 /dev/ttyACM0
I have only one user, so I ran: sudo usermod -aG dialout $USER
Running lsusb
gives me:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 8087:0aaa Intel Corp.
Bus 001 Device 004: ID 0658:0200 Sigma Designs, Inc.
Bus 001 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
Bus 001 Device 002: ID 24ae:1000
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
I set up a persistent path in “/etc/udev/rules.d/10-zwave-static.rules”
SUBSYSTEM=="tty", ACTION=="add", ATTRS{idVendor}=="0658", ATTRS{idProduct}=="0200", SYMLINK+="zwaveusbstick"
SUBSYSTEM=="tty", ACTION=="add", ATTRS{idVendor}=="0a12", ATTRS{idProduct}=="0001", SYMLINK+="bluetoothdongle"
(Bluetooth started working in HA after I added that second line)
I installed docker-compose via these instructions: https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-16-04
This is my docker-compose.yml file (cobbled together from googling):
version: '3'
services:
homeassistant:
container_name: home-assistant
image: homeassistant/home-assistant
ports:
- "8123:8123"
volumes:
- /home/gnuc/home-assistant:/config
- /etc/localtime:/etc/localtime:ro
devices:
# - /dev/ttyUSB0:/dev/ttyUSB0
# - /dev/ttyUSB1:/dev/ttyUSB1
# - /zwaveusbstick:/zwaveusbstick:rwm
# - /zwaveusbstick:/zwaveusbstick
- /zwaveusbstick
- /bluetoothdongle
restart: always
network_mode: host
privileged: true
After running the container, the permissions for my HA folder were owned by root so I ran: sudo chown -hR gnuc /home/gnuc/home-assistant
My configuration.yaml file only has this line regarding zwave: zwave:
When I remove that line and try setting zwave up through Integrations, I get “Z-Wave validation failed. Is the path to the USB stick correct?”
In the home-assistant.log file I see:
2019-01-08 10:06:20 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Z-Wave (import from configuration.yaml) for zwave
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/openzwave/option.py", line 78, in __init__
raise ZWaveException(u"Can't find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
openzwave.object.ZWaveException: "Zwave Generic Exception : Can't find device /zwaveusbstick : ['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 249, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/app/homeassistant/components/zwave/__init__.py", line 283, in async_setup_entry
config_path=config.get(CONF_CONFIG_PATH))
File "/usr/local/lib/python3.6/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 /zwaveusbstick : [\'Traceback (most recent call last):\\n\', \' File "/usr/local/lib/python3.6/site-packages/openzwave/option.py", line 78, in __init__\\n raise ZWaveException(u"Can\\\'t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\\n\', \'openzwave.object.ZWaveException: "Zwave Generic Exception : Can\\\'t find device /zwaveusbstick : [\\\'NoneType: None\\\\\\\\n\\\']"\\n\']'