Hi,
due to some Zwave devices that were only recently supported by open-zwave (currently in their dev branch) I want to create a Home Assistant docker image that contains an updated version of both open-zwave (from dev branch) and python-openzwave (latest official release 0.4.4).
I have found some posts here where people were updating one or the other component, but many of those approaches did not work in my situation (e.g. resulted in build errors) or were slightly different problems (openzwave + unmerged pull request).
What I did now was create a dockerfile that installs the latest python-openzwave with its “ozwdev” flavor, which means it’s using the dev branch of openzwave:
FROM homeassistant/raspberrypi2-homeassistant:latest
RUN apk update && apk add git make g++ coreutils linux-headers eudev-dev python3-dev python-dev cython python3 py-pip py3-pip build-base yaml-dev
RUN pip3 install --no-cache-dir python_openzwave==0.4.4 --upgrade --no-deps --force-reinstall --install-option="--flavor=ozwdev" -b /tmp/pyozwbuild
Creating the image works fine. It takes quite some time because openzwave is built from source in the process. It finishes without errors, though.
When spinning up a container based on this new image I see this message during startup: 2018-03-02 19:27:04 INFO (SyncWorker_11) [homeassistant.util.package] Attempting install of python_openzwave==0.4.3
I cancelled here because clearly my new 0.4.4 version was not deemed to be suitable.
Therefore my questions:
How do I convice HA to use the already installed python-openzwave 0.4.4?
Should this general approach of updating the zwave packages work?
I adapted the zwave init file so that it requires the new python-openzwave version. In the dockerfile I added: RUN sed -i s/python_openzwave==0.4.3/python_openzwave==0.4.4/ /usr/lib/python3.6/site-packages/homeassistant/components/zwave/__init__.py
to the end.
Now, it works. Zwave can apparently be initialized at HA startup as intended.
However, all of my devices were readded with different entity IDs now… I have no idea why this happened…
Is this preventable so that it uses the previously active entites / config?
The files in my config directory have not changed (zwcfg_.xml).
Thanks for your feedback @marthocoo
I’m on the latest 0.64 and upgraded to that version before I switched to my custom image .
I read something about the registry in another thread. So I renamed my zwave devices again and then restarted HA after I also deleted the registry file. Now the names are corrected and it almost looks like before.there is one zombie zwave device that is displayed as unknown. It is not a physical device though as they are apparently all working.
I don’t know why the devices were readded / changed, though. Was something destroyed by upgrading python-openzwave?
I don’t quite understand what is happening behind the scenes here.
Before renaming them there were also some error messages related to the names of two identical Wall plugs. The heal method could not be executed on one of them.
After restarts of HA, there is an error in the logs:
Log Details (ERROR)
Sun Mar 04 2018 20:46:55 GMT+0100 (Mitteleuropäische Zeit)
notif_callback exception
Traceback (most recent call last):
File "src-lib/libopenzwave/libopenzwave.pyx", line 494, in libopenzwave.notif_callback
IndexError: list index out of range
Is this something you have kept on doing, in more recent years? If I understood things properly, HA is still using 1.4 of open zwave, when there are a lot newer versions around, and I would really like to try to use a later version to see if all my zwave issues improve a bit.
No, I had this running for a while but wound up returning to the stock HA version around 0.97 or so.
There are still many quirks though, e.g. entities suddenly disappear from devices and never return.
Apparently if you use the zwave2mqtt add-on you can somehow use the 1.6 version of openzwave. Haven’t tried this though.
Yeah, I’ve also got tons of problems with my zwave devices, despite having a fairly small network with few devices. I am very tempted to test the zwave2mqtt solution, but since I am guessing it means that all my devices will change names, and all automations needs to be re-written, not to mention learning to manage mqtt as well.
I just wish I new why HA has forked from the official OpenZwave and is lagging years behind.