I actually found this page earlier when trying to figure out how to compile the openzwave control panel
Unfortunately it doesn’t seem to be related to my problem, which is Home Assistant stubbornly not seeing python-openzwave even though it’s installed clear as day.
EDIT: Actually the problem seems to be that Debian python3 is not looking in /usr/local/lib/python3.4/dist-packages/ (at least for libopenzwave). I don’t understand enough about how all this works to fix it at this stage… I see Linux is still as much trouble as when I first got into it when Debian 3.0 was still unstable
I long for the distant future thousands of years ahead when computers just work without all this trouble… But I’m afraid it will take AI to solve and we will be made redundant.
EDIT2: And WTF is this a step when I’m using OpenZwave 1.5?!
make[2]: Entering directory '/home/pi/python-openzwave/openzwave/cpp/build'
Building OpenZWave Version 1.4-2206-gbe834e3-dirty
What do you see if you run pip3 list | grep openzwave? Here is what I have.
root@hass:~# pip3 list | grep openzwave
libopenzwave (0.3.1)
openzwave (0.3.1)
```
I've run into a couple issues where hass tries to install packages via pip but it doesn't actually happen, so after upgrades to newer versions of hass I keep an eye on the log to make sure packages install.
So if you don't have those two packages listed above installed, install them (i.e., `pip3 install openzwave==0.3.1`, etc). Check for pydispatcher (`pip3 list | grep pydispatcher`), if not installed go ahead and install it. Restart hass, and assess.
PyOZW pulls down its own copy of OZW and builds against it. You may need to cd python-openzwave; git submodule update then rebuild. But that probably won’t help with finding it after.
pi@homepi:~ $ python3
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openzwave
pi@homepi:~ $ sudo su -s /bin/bash homeassistant
homeassistant@homepi:/home/pi $ cd /srv/homeassistant
homeassistant@homepi:/srv/homeassistant $ python3 -m venv homeassistant_venv
homeassistant@homepi:/srv/homeassistant $ source /srv/homeassistant/homeassistant_venv/bin/activate
(homeassistant_venv) homeassistant@homepi:/srv/homeassistant $ python3
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import openzwave
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'openzwave'
The problem is the virtual environment in which HA runs… I don’t know what I would have to do to solve this.
EDIT: I haven’t checked whether this is the problem yet, but I’ll take an educated guess that it probably is. If so then the instructions on the HA site for manual installation are very deceiving.
homeassistant@homepi:~ $ cat /srv/homeassistant/homeassistant_venv/pyvenv.cfg
home = /usr/bin
include-system-site-packages = false
version = 3.4.2
So it should be made clear in the manual installation instructions that if you need any python packages they need to be created WITHIN the virtual environment or this setting needs to be changed.
Unfortunately the instructions on the HA website don’t take that into consideration.
That one small change in the confit file should be noted, or it should be explicitly stated and shown in the correct order that you compile and install the python packages inside the virtual environment.
Either way would prevent a lot of frustration for new adopters.
I am now encountering a slight different problem, even after fixing the first issue of a missing python module.
Has anyone seen this in their error log recently?
16-10-26 10:38:14 homeassistant.bootstrap: Error during setup of component zwave
Traceback (most recent call last):
File “/usr/local/lib/python3.5/site-packages/openzwave-0.3.1-py3.5.egg/openzwave/network.py”, line 322, in init
self.dbcon = lite.connect(os.path.join(self._options.user_path, ‘pyozw.sqlite’), check_same_thread=False)
NameError: name ‘lite’ is not defined
I am having extreme difficulty solving this one. It started showing up when I upgraded Cython and recompiled OpenZWave the other day.
Sorry, but what exactly did you do to get this working? I still cannot get z-wave to work under this version of HA after using and installing hassbian.
Any help getting z-wave to work under hassbian will be highly apreciated.
Did you figure it out? If you did please let me know… I installed HASS using HASSBIAN and I cannot get z-wave to work at all. I can see the differences that you pointed out, but I do not know what to do to make it work.
Thanks!
I can’t remember if Hassbian sets things up in a venv like the all-in-one installer does. But if that’s the case, you kinda need to treat that virtual environment like it’s own pi and install inside the venv. Otherwise packages won’t be available.
Search the forum for the commands to sudo to the correct (hass?) user and enter the venv.
I know that this is an older thread, but just wanted to say thanks to @dinki for the suggestion to change include-system-site-packages to “true”, worked like a charm and now zwave component is showing as ‘ready’!
While im happy that its now working, I have no idea why it worked or what it did. could someone please explain? I want to make sure im learning and not just blindly copying lines of code! - thanks