USB path and Config path (Z-wave setup)

Hello,

I’m very new to Home Assistant. I got HA working well and linked it to Homebridge (to use with Apple’s homekit). I’ve installed it on a raspberry pi zero using the All-in-one Installer, and it’s all working extremely well… until now!

Since I’ve installed it on the pi zero, I had to connect a powered usb hub to it in order to plug in a wifi dongle and now a new z-wave dongle I just got today. The model is the Z-stick gen 5.

My problem: Home Assistant isn’t finding my z-wave stick nor config route.I followed BRUH Automation’s youtube tutorial (https://www.youtube.com/watch?v=ajklDCaOGwY) to set up the z-wave stick. Here’s the log of the errors:

16-08-25 14:27:31 homeassistant.loader: Unable to find component config_path
16-08-25 14:27:31 homeassistant.loader: Unable to find component usb_path
16-08-25 14:27:37 homeassistant.bootstrap: Error during setup of component zwave
Traceback (most recent call last):
File “/srv/hass/hass_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/option.py”, line 72, in init
raise ZWaveException(u"Can’t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))
File “/usr/lib/python3.4/traceback.py”, line 181, in format_exception
return list(_format_exception_iter(etype, value, tb, limit, chain))
File “/usr/lib/python3.4/traceback.py”, line 146, in _format_exception_iter
for value, tb in values:
File “/usr/lib/python3.4/traceback.py”, line 125, in _iter_chain
context = exc.context
AttributeError: ‘NoneType’ object has no attribute ‘context

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/bootstrap.py”, line 156, in _setup_component
result = component.setup(hass, config)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/components/zwave.py”, line 305, in setup
default_zwave_config_path),)
File “/srv/hass/hass_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/option.py”, line 75, 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 “/srv/hass/hass_venv/lib/python3.4/site-packages/openzwave-0.3.1-py3.4.egg/openzwave/option.py”, line 72, in init\n raise ZWaveException(u"Can\‘t find device %s : %s" % (device, traceback.format_exception(*sys.exc_info())))\n’, ’ File “/usr/lib/python3.4/traceback.py”, line 181, in format_exception\n return list(_format_exception_iter(etype, value, tb, limit, chain))\n’, ’ File “/usr/lib/python3.4/traceback.py”, line 146, in _format_exception_iter\n for value, tb in values:\n’, ’ File “/usr/lib/python3.4/traceback.py”, line 125, in _iter_chain\n context = exc.context\n’, “AttributeError: ‘NoneType’ object has no attribute ‘context’\n”]’

Any help would be greatly appreciated!! :slight_smile:

1 Like

Post your ZWave config. In code tags.

Hi,

I’m sorry for being such a noob, but which config file would you like to see?

configuration.yaml. In code tags.

zwave:
  usb_path: /dev/ttyACM0
  config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv6l.egg/config
1 Like

type:

ls /dev/ttyACM*

By default, the Z-Stick Gen5 should be attached to /dev/ttyACM0, however, depending on what else you have plugged into your rpi, it may be attached to /dev/ttyACM1, etc

My primary z-wave controller in my Raspberry Pi 2 is also the Z-Stick Gen5, and at bootup it is always registered as /dev/ttyACM0, however, if I remove it or plug it in after bootup, Raspbian doesn’t always release the interface right away, so if you plug it back in it gets assigned /dev/ttyACM1, but this will most likely set back to /dev/ttyACM0 after a reboot with the Gen5 attached.

If you see ACM1 instead of ACM0, I would first attach all the usb devices that you plan to permanently leave attached and remove any devices that are there for temporary purposes, then reboot the rpi zero, and whatever device (ACM0 or ACM1) it is then attached to at that point should be the device you hardcode into your configuation.yaml

Also, I don’t own a Pi Zero, but is it an arm6 device or an arm7 device? My Raspberry Pi 2 uses libopenzwave-0.3.1-py3.4-linux-armv7l.egg and your config_path is referencing libopenzwave-0.3.1-py3.4-linux-armv6l.egg

Just make sure you are using the correct path for your config folder and didn’t simply copy and paste the url from the website tutorial

UPDATE: Nevermind about the usb_path, I just checked online and the zero has an arm6

Thanks for your help, guys. I managed to fix it somehow? I think it was due to some spacing I hadn’t noticed in the config file. You really have to be careful with spaces in yaml! :blush:

I get the exact same error as on the original post. Stuck - cannot get it to move forward. :frowning:

zwave:
usb_path: /dev/ttyACM0
config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config
polling_interval: 60000 

I can get the Aeotec Z-stick working inside OZWCP and use all paired devices. but inside HA no show !

Confirm that the yaml file requires specific spacing, not tabs and stuff. I used Sublime Text 3 to adjust the spacing, using the
“translate_tabs_to_spaces”: true
option and hass can find the components usb_path and config_path

This was super helpful, as I couldn’t locate the “options.xml” file and the path given on the HomeAssistant getting started guide were more than a little confusing.

After looking at this path as a guide I realized my libopenzwave folder has slightly newer version numbers – than the first config posted here – but I was able to open it and find the options.xml for the Home Assistant open z-wave configuration when using the All In One Installation.

Once I set the network key there, and specified the path (not 100% sure if the default was reading this location or not so I just added it to the configuration.yaml just as you have it – all my Secuire pairing woes for my Schlage Connect Z-Wave Lock went away! Woohoo!

My Z-Wave to enable Secure pairing using the All In One Installer is:

zwave:
  usb_path: /dev/ttyACM0
  config_path: /srv/hass/hass_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config

Thanks!