Proble Zwave after the upgrade of python 3,6

Hi everybody,

I upgraded python to 3,6.
I used this topic https://github.com/home-assistant/home-assistant/issues/8342#issuecomment-326918777

Now I have a problem with the zwave component.

Could you help me ?

Log Details (ERROR)
Mon Mar 12 2018 16:16:13 GMT+0100 (Paris, Madrid)

Error during setup of component zwave
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/setup.py", line 145, in _async_setup_component
    component.setup, hass, processed_config)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 331, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 244, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/zwave/__init__.py", line 275, in setup
    config_path=config[DOMAIN].get(CONF_CONFIG_PATH))
  File "/srv/homeassistant/lib/python3.6/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__
libopenzwave.LibZWaveException: "LibOpenZwave Generic Exception : Can't find config directory /srv/homeassistant/srv/python-openzwave/config"


Log Details (WARNING)
Mon Mar 12 2018 16:16:13 GMT+0100 (Paris, Madrid)

pysqlite is not installed

Have you set up your venv from scratch and reinstalled python_openzwave?

It looks like your HASS config is specifying /srv/homeassistant/srv/python-openzwave/config but that might not be where the new python_openzwave config is. I had the same problem.

Thank you for your answer

I just applied the “tuto” https://github.com/home-assistant/home-assistant/issues/8342#issuecomment-326918777

How can I find the new directory where python-openzwave is ?

Try running pyozw_check.

I think it shows the location of the config file in the output.

Hum … I can’t find the pyozw_check ???

I don’t have python-openzwave directory …

I suppose that there is another problem …

So in theory Home Assistant will trigger installs of the things it needs (like openzwave) when it starts up.

I found my install errored in the startup, so I installed python_openzwave manually using pip3 in my virtualenv. I’m not using HASSbian though.

It was the case for the first installation but not after the manual upgrade of python :persevere:

Ok so sounds like you need to manually install python_openzwave?

hum :expressionless:

Do you know what’is done by this command ?

sudo -u homeassistant -H /srv/homeassistant/bin/hass

I rebooted my PI3 and after a while Zwave compenent started …

I checked the HA version => 0.65.3 OK
I checked the python version using python -V => 2.7.13 ??

I don’t know why because I have a directory named Python-3.6.0 in /pi/Python-3.6.0

That command changes to your homeassistant user and changes home to /srv/homeassistant/bin/hass

If homeassistant is running in a python virtual environment the version of python in that environment can be different to the one in the normal server environment.

Really thank you for your answers :slight_smile:

I use the Hassbian image

I don’t think that it’s a virtual environnement

It might still be using python virtual envs. In fact looking at this in your tutorial shows that is is:

source /srv/homeassistant/bin/activate

That command activates the virtual env in /srv/homeassistant

Sorry for my late answer. And thank you for your help :grinning:

I thinked that upgrading python on Hassbian image should be easy but that’s not … I don’t know if there is an other tuto to do that correctly.
Did you upgrade your python version to 3.6 ?

Yes I originally did it manually.

However today I spent a couple of hours figuring out Docker, and am now running HA using their Docker image. That way everything is packaged in that image and I don’t need to worry about it anymore :slight_smile:

Ok, but why the Ha docker image is better than Hassbian image ?
Because you have to upgrade python sometimes with new versions ?

No idea - I’ve never looked at Hassbian. My docker image came with Python 3.6.4 already in there.

Maybe whoever maintains the Hassbian image hasn’t updated that image with a new Python?

I thought Pi users were all moving to Hass.io though?

Bimey Hassbian hasn’t been updated since Oct 9, 2017 according to it’s page:

So yeah is it actually being maintained anymore?

Ok that’s why python version is not up to date :slight smile:
I tried first hassio but I thinked that they have some limitations. Could I had all components that I want with hassio ?
Because there is also a market and I don’t know the difference beetween Hassio and Hassbian