Z-Wave fresh installation fail

I did a fresh installation of HA on my RPi3. When I wanted to install Z-Wave as per this guide, it failed at step git checkout python3. It gives this error…

error: pathspec ‘python3’ did not match any file(s) known to git.

so I ignore it and continue on to PYTHON_EXEC=$(which python3) make build and sudo PYTHON_EXEC=$(which python3) make install.

When I restart my HA, I see this in the frontend.

In the log, it shows…

ERROR (MainThread) [homeassistant.setup] Error during setup of component zwave
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/homeassistant/setup.py", line 192, 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 "/usr/local/lib/python3.4/dist-packages/homeassistant/components/zwave/__init__.py", line 253, in setup
    CONF_CONFIG_PATH, default_zwave_config_path))
  File "/usr/local/lib/python3.4/dist-packages/openzwave-0.4.0.31-py3.4.egg/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 676, in libopenzwave.PyOptions.__init__ (src-lib/libopenzwave/libopenzwave.cpp:10136)
libopenzwave.LibZWaveException: "LibOpenZwave Generic Exception : Can't find config directory /usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.1-py3.4-linux-armv7l.egg/config"

I browse to /usr/local/lib/python3.4/dist-packages/ and true enough, libopenzwave-0.3.1-py3.4-linux-armv7l.egg directory is missing.

Please help.

1 Like

Looks like they have updated the version to 0.4 and the python3 branch does no longer exist. It might be that it is merged with 0.4

I don’t know how to fix this, but I have some suggestions.

As for finding the correct directory, you can use
sudo find / -type d -iname "libopenzwave-*"

If you want to try with v.3.3:
git checkout fde9839a5310e0f097a26ed871fff6fc1f8334d6

  • this should check out the 3.3 version, perhaps that will work for you?
1 Like

thanks.

when performed…

sudo find / -type d -iname “libopenzwave-*”

it returned…

/usr/local/lib/python3.4/dist-packages/libopenzwave-0.4.0.31-py3.4.egg-info

I tried…

$ git checkout fde9839a5310e0f097a26ed871fff6fc1f8334d6
$ PYTHON_EXEC=$(which python3) make build
$ sudo PYTHON_EXEC=$(which python3) make install

Now I see openzwave-0.3.3-py3.4.egg in /usr/local/lib/python3.4/dist-packages. But it still doesn’t fix it. The same error still in the log.

I am also failed at step git checkout python3, but here is permission denied.

    pi@hassbian:~ $ cd /srv/homeassistant/src
    pi@hassbian:/srv/homeassistant/src $ cd python-openzwave
    pi@hassbian:/srv/homeassistant/src/python-openzwave $ git checkout python3
    fatal: Unable to create '/srv/homeassistant/src/python-openzwave/.git/index.lock                                     ': Permission denied


pi@hassbian:/srv/homeassistant/src/python-openzwave $ ls
archives       Dockerfile        INSTALL_REPO.rst    pyozw_setup.py    setup-manager.py  src-python_openzwave
CHANGELOG.txt  docs              INSTALL_WIN.rst     pyozw_version.py  setup.py          src-web
circle.yml     examples          LICENSE.txt         README.rst        setup-web.py      tests
COPYRIGHT.txt  EXAMPLES.txt      Makefile            setup-api.py      src-api
debian         INSTALL_ARCH.rst  Makefile.archive    setup.cfg         src-lib
DEVEL.txt      INSTALL_MAC.rst   pyozw_pkgconfig.py  setup-lib.py      src-manager

i thought z-wave is already pre-installed in hassbian?

It is not pre-installed in hassbian. If you installed hassbian, you should be able to SSH into the pi and there is a script to run to install open zwave. Please see here: https://home-assistant.io/docs/hassbian/customization/

Hassbian is the “image” install, where you image an SDcard and then just plug the PI in and it installs the OS and HA. You would then have to install Openzwave, Samba from a script. https://home-assistant.io/docs/hassbian/customization/

The AIO or all in one installer on the other hand makes you install Jessie OS onto your PI, and then use the all in one installer. That does install OpenZwave, but it forces you to install Jessie, first.

It is easy to get both installs confused, but the hassbian image is the easiest for people just starting out.

2 Likes

you are right. i never use any of them so i got confuse.

In this case it’s because you are using the user pi, but the git archive was likely downloaded using the homeassistant user account. You need to change user, and probably activate the virtual environment first.

Installation - Home Assistant step 3 + 5

1 Like

But is it really? I started out never having touched a Pi in my life and if I ever had to do an new install, I would definitely go with AIO. Even with zero Pi and very little Linux experience I found the install to be pretty easy. This was pre-December 2016, so I’m not sure if that still holds true.

Hassbian installs seem to generate so many more issues in the forums and the HA subreddit.

rpitera,

It all depends on the person, I guess.

I am happy with the product in general, but I am aware that it takes a great deal of attention and patience, sometimes… As a person who uses HA and reads the posts here, I appreciate the contribution of you and others who try to get everyone they help they need.

1 Like

True and I guess it isn’t fair of me to critique it without having tried it first. Guess I may give it a shot in the future.

Wish I could help you on this one.

Oh. I thought you tried the hassbian install. Let me know what you think of it.

Thanks :slight_smile: i think now i am using right account, but face a error: pathspec ‘python3’ did not match any file(s) known to git.

(homeassistant) homeassistant@hassbian:/srv/homeassistant/src $ cd python-openzwave
(homeassistant) homeassistant@hassbian:/srv/homeassistant/src/python-openzwave $ git checkout python3
error: pathspec 'python3' did not match any file(s) known to git.
(homeassistant) homeassistant@hassbian:/srv/homeassistant/src/python-openzwave $
1 Like

Did you figure out a fix for this? I’ve got the same error.

I am having the same issue here.

Ok here is what Im doing using his suggestions. If you followed what he said without re-compiling openzwave, you probably had the same response as I did when running the last 2 commands. There were done very quickly which i am assuming did not re-compile. So here is what I did and am doing at the moment. I ran “make clean” without the quotes to clear the other build of openzwave and i am now running the commands in order. It is re-building openzwave, hopefully under the older version as I type this. I will have updates for you guys shortly

Kilo

Well, I thought I was going to have some good news for you but Im still getting invalid config error in HA. What next gang??

Oh yeah. This is with the latest HA version of 0.43.1

I don’t think this is related to HA since you can perform the zwave installation even before you install HA. Please correct me if I am wrong.

It may not be. I just did an AIO install and im getting the same exact errors so it must be the updates they did to openzwave.