MarkR
November 21, 2018, 12:44pm
1
Hello
I managed to get Bluetooth tracker working in a docker, but now zwave stopped working. Any idea how I get them both working please? This is on ubuntu
homeassistant:
container_name: home-assistant
restart: always
image: homeassistant/home-assistant
depends_on:
- "docker-influxdb-grafana"
- "mysql"
devices:
- /dev/zwave:/dev/zwave
volumes:
- /home/mark/HomeAssistant:/config
- /etc/localtime:/etc/localtime:ro
- /dev/bus/usb:/dev/bus/usb
- /var/run/dbus:/var/run/dbus
network_mode: host
# environment:
# - ti
privileged: true
Cheers
Mark
MarkR:
- /dev/zwave:/dev/zwave
Is this what the host sees as your zwave USB device?
berniebl
(Bernard)
November 21, 2018, 1:06pm
3
Hi Mark,
Lucky you, I am still battling trying to get Bluetooh setup correctly on my Ubuntu/Docker setup, so if there is something special that you did could you highlight it or give a few steps?
As far as Z-Wave, this will be my next item to setup. I assume that your “dev/zwave” is a symlink … correct? for me I couldn’t get symlink to work either but I did find that Ubuntu is creating it’s own symlink. For z-wave, you can find it here:
/dev/serial/by-id/usb-0658_0200-if00 --> ../../ttyACM0
This is what I am hoping to use since symlink didn’t work and will put this entry in my configuration.yaml file.
You can find a similar reference in this post:
AFAIK, once Z-Wave is configured you can’t change the usb path in the UI. The UI configuration option is available during the first time setup, but there’s no option to change it later. I think you’re stuck editing the config.
A better choice would be to use persistent device names. There are two choices, 1) use a udev rule to map the device to a name of your choice, or 2) if HASS.IO supports it, use the default persistent paths generated by Linux. Most distributions do support this out of the …
MarkR
November 21, 2018, 1:20pm
4
yeah it is indeed and I can still see that on the host
correct… I have this setup in a file located here
/etc/udev/rules.d/99-usb-serial.rules
file contents
“SUBSYSTEM==“tty”, ATTRS{idVendor}==“0658”, ATTRS{idProduct}==“0200”, SYMLINK+=“zwave””
EDIT, from this article…
https://www.domoticz.com/wiki/PersistentUSBDevices
MarkR
November 21, 2018, 1:45pm
5
looks like when I add
privileged: true
This kills zwave, but without it BT doesn’t work… any ideas please
I run mine privileged and BT and zwave both work fine.
MarkR
November 21, 2018, 2:02pm
7
how frustrating… what OS are you on, I just realised I am on Linux Mint not ubunti
I get this error in HA
2018-11-21 13:59:39 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 /dev/zwave : ['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 244, 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 /dev/zwave : [\'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 /dev/zwave : [\\\'NoneType: None\\\\\\\\n\\\']"\\n\']'
MarkR:
what OS are you on
I run my NUC on Alpine Linux
Try using the /dev/serial/by-id suggestion by @berniebl
Weird that so many people try to symlink their device. I have never had it change on my system. It has always been /dev/ttyACM0
1 Like
MarkR
November 21, 2018, 3:11pm
9
Oh my… I have always had issues with this it flipping to 0 or 1 and hence why I created a symlink… but as a test I have removed the zwave and put using /dev/ttyACM0 using privileged (true) in the docker compase, so far both zwave and BT are running!
Thank you… I will keep this updated if that changes.
The only time this would flip is if you are unplugging/plugging all the time. Even then, if it changes after plugging it back in, just unplug it and plug it back in, and it will go back to 0
I question those that unplug and plug their zwave controllers all the time…like why?
MarkR
November 21, 2018, 3:15pm
11
totally agree… mine is in the loft so I wouldn’t
Mine did flip when I was using an RPi3 a reboot could make it flip
I reboot my NUC about once every 3 months. I have never had it flip on me.
MarkR
November 21, 2018, 3:32pm
13
good to hear thanks… I only setup the synlink when I moved to the NUC, as that was the way I had it… Thanks for your help!
Let’s hope BT detection works for my presence detection now