Invalid config for zwave on 0.44.1

Hi All,

Was running HA 0.43.x just fine until my SD card corrupted. So, I reinstalled using the Hassbian image and that got me back online, but now on 0.44.1 (strangely, the upgrade command does not get it up to 0.44.2).

I pulled my config from github and now I keep getting the “Invalid config” message on the UI for my zwave component. I have checked that my aeotec z-stick is indeed on /dev/ttyACM0, I have updated python-openzwave and opzwave using:

pip install --upgrade python_openzwave
and
pip install --upgrade openzwave

yet, the home-assistant.log keeps showing this error:

2017-05-08 19:12:36 INFO (MainThread) [homeassistant.setup] Setting up zwave
2017-05-08 19:12:36 INFO (MainThread) [homeassistant.components.switch] Setting up switch.rfxtrx
2017-05-08 19:12:36 ERROR (MainThread) [homeassistant.setup] Error during setup of component zwave
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/setup.py", line 188, in _async_setup_component
    None, component.setup, hass, processed_config)
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/zwave/__init__.py", line 253, in setup
    CONF_CONFIG_PATH, default_zwave_config_path))
  File "/srv/homeassistant/lib/python3.4/site-packages/openzwave/option.py", line 82, in __init__
    libopenzwave.PyOptions.__init__(self, config_path=config_path, user_path=user_path, cmd_line=cmd_line)
  File "src-lib/libopenzwave/libopenzwave.pyx", line 678, in libopenzwave.PyOptions.__init__ (src-lib/libopenzwave/libopenzwave.cpp:10141)
libopenzwave.LibZWaveException: "LibOpenZwave Generic Exception : Can't find config directory /srv/homeassistant/lib/python3.4/site-packages/config"

I see the error about not finding a config directory, but not sure how to fix that. What I have tried already:

  • after using hassbian-config to install openzwave-pip there is a message saying: “It's recomended that you set the optional config parameter for zwave. to config_path: ozw_config .”

so, I have experimented with that, but to no avail.
My original config section for zwave did not have the config_path set, but I tried setting it to “config_path: ozw_config” as well as “config_path: ozw_config .”, but neither of those makes a difference.

In newer versions of the Hassbian image you need to point the Z-Wave component to the proper config directory which is now named “ozw_config”.

As you can see on the last line the path to the config folder doesn’t exist:
Can't find config directory /srv/homeassistant/lib/python3.4/site-packages/config

I’m currently not able to provide you with the full path, but it should look something like: /srv/homeassistant/lib/python3.4/site-packages/libopenzwave-0.3.2-py3.4-linux-armv7l.egg/ozw_config

Change your configuration.yaml file to point the Z-Wave component to the folder:

zwave:
  usb_path: /dev/ttyACM0
  config_path: /srv/homeassistant/lib/python3.4/site-packages/libopenzwave-0.3.2-py3.4-linux-armv7l.egg/ozw_config

Save the configuration and restart HASS. After this you should be ready to go.

1 Like

Thanks, the problem wasnt really with the HASS side of things, but the OZW Control panel could not find the configs, even though that’s where the ozw_config symlink was. But it turns out (or, at least thats how I got it to work) that OZWCP looks for config files in the ./config directory, which I just created as a symlink to ozw_config, which in turn is a symlink to the folder with the real config files. Works like a charm :slight_smile:

Hi, I’m new to Home Assistant, and I’m having this problem too.

I feel bad asking this, but what is the full directory for this? Or, could you possibly give the whole symlink source and target? I’ve found a few ozw_config directories and files, and I’m not sure which I’m supposed to point at.

Thank you!

If you do a:
ls -lisa ozw_config

from the directory where you found the ozw_config, you see where the directory points to which is the exact location of the zwave config files on your install.

Then you can make a symlink using the ln command, so that you make a config dir in the same directory as the ozw_config dir. The ./config dir “points” to the ./ozw_config dir, which in turn (already) points to the right config files:
ln -s ./config ./ozw_config

That;s what worked for me. If it does not for you, it may be worth reading more topics regarding the location of zwave config files, because there are many… :slight_smile:

1 Like

Thanks aetjansen worked for me, after the usual few hours working it out, installed zwave from pip option in hassbian-config install, took an age… tried every variation of path to ozw_config to no avail and stumbled on this, navigated to the folder containing ozw_config ran your commands above in this folder (found files, created config), then used; config_path: /srv/homeassistant/lib/python3.4/site-packages/python_openzwave/ozw_config for the moment it seems to be working and a shortcut was created in /home/homeassistant/.homeassistant to the ozw_config folder, thanks for that!

1 Like

Note on a fresh install of Hassbian today (I’ve been putting the python upgrade off till now…) the new zwave config location is now

config_path: /srv/homeassistant/lib/python3.5/site-packages/python_openzwave/ozw_config

Directory of the ozw_config is now;

/srv/homeassistant/lib/python3.5/site-packages/python_openzwave
1 Like

Thanks for the follow up @dingleydell! Your zwcfg…xml file is still in the config dir of your home assistant setup I assume?

Yes it was I copied them over from the previous install, I’ve now actually gone for a new install of raspbian stretch and python 3.6.2, trying to future proof the pain of upgrading anytime soon! I think zwave still played up but got there in the end.