Weirdness with openzwave and python-openzwave

I’m really befuddled here.

I’m trying to get the humidity sensor on my CT-101 thermostat working. It’s a bug in the firmware and it’s been recently patched in Openzwave, so I’d like to run that new version of Openzwave and see what happens.

So I go into my venv, do pip3 uninstall python-openzwave, and then do pip install python_openzwave --no-cache-dir --no-deps --install-option="–flavor=ozwdev" . This completes successfully and as expected. I run bin/pyozw_check -l -d /dev/ttyUSB0 and it connects to my zwave network and spits out a list of awake nodes, albeit without the network key, exactly as expected. Listed version of openzwave is 1.5.0, again as expected.

Hark! I’ve solved it! Ha ha, no, you haven’t.

I exit out of the venv and start Hass. Behold the logs, wherein I see…Openzwave version 1.4.3142. Wait, what?!

So, where exactly is the libopenzwave coming from? I’ve tried installing openzwave manually and then using the shared flavor of python-openzwave, I’ve tried using the git flavor of python-openzwave, and now the ozwdev flavor…and it always uses the same version, 1.4.3142. Bloody weird if you ask me. How do I get it to use a different version?

edit well, that’s a grade A derp. Hass installs its own python-openzwave==0.4.9. Saw that scroll by as I was rebuilding my venv with the new python-openzwave preinstalled so it would’nt get its own default version. So how exactly do I go about forcing Hass to use the python-openzwave version I want it to use? Or is this even feasible?

Check your ~/.homeassistant/deps/lib/python3.7/site-packages or whatever version of python you use.

I have both /srv/homeassistant/lib/python3.5/site-packages/python_openzwave-0.4.9.dist-info and /srv/homeassistant/lib/python3.5/site-packages/python_openzwave in there. I’d manually installed the ozwdev flavor of python_openzwave and then installed homeassistant in the hopes that Hass would pick up on pyozw already being installed. It didn’t. What I want to do is somehow make Hass use the version of pyozw that I installed rather than its own.

I’m guessing there’s a way to edit the install file to tell it “any pyozw you find is fine” rather than “you have to use this specific version.” I just know absolutely nothing about how pip installs things so I wouldn’t have the faintest idea where to start. Or even if this whole idea is bonkers.

You may just delete them out of your ~/.homeassisant site-packages. Make a backup first just in case.
Make sure you delete the .egg-info file as well.

Dan,

The Linear Garage Door thread has insturctions on how to get python_openzwave to use the dev version of openzwave. Linear NGDZ00-4 Garage Door

The latest commands that I use for a hassbian install:

sudo -u homeassistant -H /bin/bash
source /srv/homeassistant/bin/activate

pip3 uninstall python_openzwave

pip3 install --upgrade cython==0.24.1

pip3 install --no-cache-dir 'python_openzwave==0.4.9' --install-option="--flavor=ozwdev"

deactivate
exit

This will use the python_openzwave version 0.4.9 that is requested in __init__.py but build with the latest OZW Dev branch.

1 Like

YES! THANK YOU!!!

I ended up having to use the git flavor rather than ozwdev, as the latter kept crashing and had a bunch of XML errors. But hey, I’ve got a functioning humidity sensor now!

Gald I could help!