When/How to update openzwave and python-openzwave code for HA environment

I have a pi3 with Raspian and the HA All-In-One installer with a virtual environment. Is there a process for updating the Open-zwave code and the python-openzwave code?

1 Like

Go to your installation directory (for me it’s: cd /srv/homeassistant/src/python-openzwave/openzwave)

then type:
sudo git pull

this will get the latest version from GitHub

1 Like

But just pulling isn’t enough, is it? Also, there are two repositories to be pulled, python-openzwave and openzwave. Looking at the all-in-one installer’s source and the Makefile of python-openzwave, my guess would be:

  1. Go to the installation directory (e.g. cd /srv/homeassistant/src/python-openzwave)
  2. Make sure the python3 branch is checked out (git checkout python3)
  3. Run make update (which will pull both repos)
  4. Run make build
  5. Run make install

I have not tried this myself though. Can anybody confirm this is the right prodcedure? Thanks.

Does anyone have any update on this? I’m also looking for an answer to this problem. There are lots of varying opinions on how to update so it would be great to have a confirmed process for getting this done.

Cheers

I would also be very interested to know if this is a correct process…

Hi,

I tried the procedure I suggested above and it worked, with two changes:

  • There is no python3 branch anymore (master supports Python 3), so step 2. can be skipped
  • If you have HA installed in a virtualenv (e.g. when having used the all-in-one installer), make sure to activate it before steps 4 and 5 and use
PYTHON_EXEC=`which python3` make build
PYTHON_EXEC=`which python3` make install

instead (see here).

However, it seems all of this will be unnecessary starting with 0.45.

1 Like

Anyone know how to update on Hassbian? the directories mentioned here don’t exist on my installation.

Most of my z-wave stuff appears to be working after upgrading, I am missing one switch on a dual-relay though.

@DavidMStraub Yeah, I’m hoping that pull request slated for 0.45 fixes all of this without any need of a reinstall or anything.

Do you see any benefit from updating openzwave and python-openzwave manually as of now or just wait until 0.45?

Thanks!

I did it because of this statement in the 0.44 release notes:

you’ll have to update to the latest Python Open Z-Wave with this release

However I’m not sure why or whether it is really necessary.

I just did that on my fresh hassbian 1.22 install. I just logged in and did a :slight_smile:

pip install --upgrade python_openzwave

and that worked, although it told me that I was already running the latest version.

And in my case, these are the install directories:

/srv/homeassistant/src/python-openzwave
/srv/homeassistant/src/open-zwave-control-panel

so, if you are on the latest hassbian as well, I guess that’s where you could find yours.

HTH!

I’ve All In One installer for Raspberry, so

sudo su -s /bin/bash homeassistant
source /srv/homeassistant/homeassistant_venv/bin/activate
pip install --upgrade python_openzwave

results

Collecting python_openzwave
  Downloading python_openzwave-0.4.0.34.zip (134kB)
[...]

but afer HASS restart, in the log file

2017-05-10 14:52:14 ERROR (MainThread) [homeassistant.setup] Error during setup of component zwave
Traceback (most recent call last):
  File "/srv/homeassistant/homeassistant_venv/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/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/zwave/__init__.py", line 253, in setup
    CONF_CONFIG_PATH, default_zwave_config_path))
  File "/srv/homeassistant/homeassistant_venv/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__ (openzwave-embed/open-zwave-master/python-openzwave/src-lib/libopenzwave/libopenzwave.cpp:11179)
libopenzwave.LibZWaveException: "LibOpenZwave Generic Exception : Can't find config directory /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/config"

solved putting config_path in my configuration file

zwave:
  usb_path: /dev/ttyUSB0
  config_path: /srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config
1 Like

Thank you sir, sometimes the easiest explanation is the correct one :slight_smile:

edit:
my config path ended up being:

/usr/local/lib/python3.4/dist-packages/python_openzwave/ozw_config

This seems to have fixed my flaky GE in-wall toggle switch.

Seems like you are running 2 versions of openzwave.
pip seems to have installed 0.4.0.34, but you are pointing your config to 0.3.1
This doesn’t seem right IMO

Hello all,

Just tried to install Open Zwave on my Raspberry Py for the first time. After the install, the startup fails telling me that a config directory not found. I am installing into virtualdev env and I followed instructions from here:

The root cause error:

libopenzwave.LibZWaveException: "LibOpenZwave Generic Exception : Can't find config directory /srv/homeassistant/lib/python3.4/site-packages/python_openzwave-0.4.0.34-py3.4-linux-armv7l.egg/config"

This above directory indeed does NOT exist. But I do have “/srv/homeassistant/lib/python3.4/site-packages/python_openzwave-0.4.0.34-py3.4-linux-armv7l.egg”

But I actually do have this directory with a bunch of files:
/srv/homeassistant/src/python-openzwave/openzwave/config

However , HA is not looking for it when starting-up. I have used “virtualdev” install instructions for my HA. So should the HA be actually looking for this directory instead? /srv/homeassistant/src/python-openzwave/openzwave/config ?

I am installing the latest version of Open Zwave and I had just did upgrade of HA as well. So everything is the latest version as of May 17th 2017.

Please help to find a resolution.

Here is a section of the HA startup that is relevant:

INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=automation>
May 18 07:20:31 HomeControl hass[708]: ERROR:homeassistant.setup:Error during setup of component zwave
May 18 07:20:31 HomeControl hass[708]: Traceback (most recent call last):
May 18 07:20:31 HomeControl hass[708]: File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/setup.py", line 188, in _async_setup_component
May 18 07:20:31 HomeControl hass[708]: None, component.setup, hass, processed_config)
May 18 07:20:31 HomeControl hass[708]: File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
May 18 07:20:31 HomeControl hass[708]: yield self  # This tells Task to wait for completion.
May 18 07:20:31 HomeControl hass[708]: File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
May 18 07:20:31 HomeControl hass[708]: value = future.result()
May 18 07:20:31 HomeControl hass[708]: File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
May 18 07:20:31 HomeControl hass[708]: raise self._exception
May 18 07:20:31 HomeControl hass[708]: File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
May 18 07:20:31 HomeControl hass[708]: result = self.fn(*self.args, **self.kwargs)
May 18 07:20:31 HomeControl hass[708]: File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/zwave/__init__.py", line 253, in setup
May 18 07:20:31 HomeControl hass[708]: CONF_CONFIG_PATH, default_zwave_config_path))
May 18 07:20:31 HomeControl hass[708]: File "/srv/homeassistant/lib/python3.4/site-packages/pyozwweb-0.4.0.34-py3.4.egg/openzwave/option.py", line 82, in __init__
May 18 07:20:31 HomeControl hass[708]: libopenzwave.PyOptions.__init__(self, config_path=config_path, user_path=user_path, cmd_line=cmd_line)
May 18 07:20:31 HomeControl hass[708]: File "src-lib/libopenzwave/libopenzwave.pyx", line 678, in libopenzwave.PyOptions.__init__ (openzwave-embed/open-zwave-master/python-openzwave/src-lib/libopenzwave/libopenzwave.cpp:11179)
May 18 07:20:31 HomeControl hass[708]: libopenzwave.LibZWaveException: "LibOpenZwave Generic Exception : Can't find config directory /srv/homeassistant/lib/python3.4/site-packages/python_openzwave-0.4.0.34-py3.4-linux-armv7l.egg/config"
May 18 07:20:31 HomeControl hass[708]: INFO:homeassistant.core:Bus:Handling <Event call_service[L]: service=create, service_call_id=1978864720-1, service_data=title=Invalid config, notification_id=invalid_config, message=The following components and platforms could not be set up:
May 18 07:20:31 HomeControl hass[708]: * [zwave](https://home-assistant.io/components/zwave/)
May 18 07:20:31 HomeControl hass[708]: Please check your config, domain=persistent_notification>
May 18 07:20:31 HomeControl hass[708]: INFO:homeassistant.core:Bus:Handling <Event state_changed[L]: new_state=<state sun.sun=above_horizon; elevation=0, friendly_name=Sun, next_setting=2017-05-18T11:06:02+00:00, next_dawn=2017-05-18T22:33:13+00:00, next_midnight=2017-05-18T17:00:42+00:00, next_noon=2017-05-18T05:00:37+00:00, next_rising=2017-05-18T22:55:13+00:00, azimuth=0, next_dusk=2017-05-18T11:28:02+00:00 @ 2017-05-18T07:20:31.348585+08:00>, entity_id=sun.sun, old_state=None>

I answered my OWN question!!

All I had to do wad to change my configuration.yaml in /home/homeassistant/.homeassistant

to include:

zwave:
usb_path: /dev/ttyACM0
config_path: /srv/homeassistant/src/python-openzwave/openzwave/config

The config_path config pointed to the correct directory!