Is it 4.11 or 4.10?
So on the discord someone pointed out that
HA 0.81.6 is still py_ozw = 0.4.10
BUT
there was a merge very recently bumping to 0.4.11 for HA 0.82
As /zwave/init.py requirement is 0.4.11
Got it. So currently 4.10. But expect to move to 4.11 very soon
Ok, in an attempt to get my thermostats working, I pulled a couple more files from the dev branch. Didnāt notice any changes locally but I donāt have time right now to remove/add my thermostats. Anyone interested in testing? Good news is it didnāt break anything. Pretty sure it will add V3 setpoints to zwave thermostats.
Maybe I am missing something. I just upgrade HA when the new release comes out. If my garage door breaks I look at the python_openzwave requirements. I never upgrade anything else. Am I missing something?
Using docker, itās easier to uninstall and install from a local fork when a rebuild (or update is needed) - than build and change the requirements
Sorry, I pushed this commit to move to 0.4.11. I have been testing it and itās been very stableā¦
ah no worries - and youāre right so far so good
Quick bash script to update openzwave for the virtual env folks:
(modify your paths as necessary and version number/flavor)
#!/bin/bash
# Update python_openzwave
if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use \"sudo ${0} ${*}\"" 1>&2
exit 1
fi
echo "Changing to user homeassistant"
sudo -H -u homeassistant /bin/bash <<EOF
echo "Activating virtual environment"
source /srv/homeassistant/homeassistant_venv/bin/activate
echo "Updating python_openzwave to latest version"
export LOCAL_OPENZWAVE=/home/homeassistant/open-zwave/
pip uninstall -y python_openzwave
pip install python_openzwave==0.4.11 --no-cache-dir --no-deps --install-option="--flavor=dev"
echo "Deactivating virtual environment"
deactivate
EOF
exit 0
Update script for HomeAssistant:
(modify your paths as necessary)
#!/bin/bash
# Update AIO installed HASS
if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use \"sudo ${0} ${*}\"" 1>&2
exit 1
fi
echo "Changing to user homeassistant"
sudo -H -u homeassistant /bin/bash <<EOF
echo "Activating virtual environment"
source /srv/homeassistant/homeassistant_venv/bin/activate
echo "Updating Home Assistant to latest version"
pip3 install --upgrade homeassistant
echo "Deactivating virtual environment"
deactivate
EOF
exit 0
Iām happy to see you posted this for us venv folk.
Iāve been having trouble parsing this huge thread even after following it for a couple weeks (This thread is closing in on 1000 posts, wow!). I thought this was all I needed to do to get open-zwave to the version I need, but Iām guessing I still need to do initial steps because when I run it I get:
Command "/srv/homeassistant/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-gmrvukal/python-openzwave/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-mg2nofr1/install-record.txt --single-version-externally-managed --compile --install-headers /srv/homeassistant/include/site/python3.6/python-openzwave --flavor=dev" failed with error code 1 in /tmp/pip-install-gmrvukal/python-openzwave/
Could you please point me at the right post to get this working?
i spoke to soon, didnāt check if the actual cover.garage_door was there meh
not a dev by any means, but there are some things here that are confusing:
ā0.4.0.x versions are for testers only. Donāt use it in a production environement !!!ā
āThe previous command install python_openzwave statitically linked to sources downloaded from https://github.com/OpenZWave/python-openzwave/tree/master/archives. You can change this using flavors. There is a bug in the package dependencies and flavors on some systems. You may need to install dependencies manualyā
You seem to be missing setuptools, you can switch to your venv and pip install setuptools
.
Also note the --flavor=dev
is for a local version of open_zwave on your system like @pdobrien3ās fork:
So I still attempting to get homeassistant/raspberrypi3-homeassistant
to work with OZW dev and have made some progress but have run into a issue and was wondering if anyone has any ideas:
Current dockerfile
:
FROM homeassistant/raspberrypi3-homeassistant:0.81.6
RUN set -e && \
apk --update add build-dependencies build-base\
rm -rf /var/lib/apt/lists/*
RUN pip3 uninstall -y python-openzwave && \
pip3 install --no-cache-dir 'python_openzwave==0.4.11' --install-option="--flavor=ozwdev" \
apk del build-dependencies
This is the build log:
Sending build context to Docker daemon 3.072kB
Step 1/3 : FROM homeassistant/raspberrypi3-homeassistant:0.81.6
---> 71261674d2fc
Step 2/3 : RUN set -e && apk --update add build-dependencies build-base rm -rf /var/lib/apt/lists/*
---> Running in ceff493406cb
apk: unrecognized option: r
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/armhf/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/armhf/APKINDEX.tar.gz
(1/13) Installing binutils (2.30-r5)
(2/13) Installing libmagic (5.32-r0)
(3/13) Installing file (5.32-r0)
(4/13) Installing isl (0.18-r0)
(5/13) Installing libgomp (6.4.0-r9)
(6/13) Installing libatomic (6.4.0-r9)
(7/13) Installing gcc (6.4.0-r9)
(8/13) Installing musl-dev (1.1.19-r10)
(9/13) Installing libc-dev (0.7.1-r0)
(10/13) Installing g++ (6.4.0-r9)
(11/13) Installing make (4.2.1-r2)
(12/13) Installing fortify-headers (0.9-r0)
(13/13) Installing build-base (0.5-r1)
Executing busybox-1.28.4-r1.trigger
OK: 325 MiB in 165 packages
Removing intermediate container ceff493406cb
---> e3967078a5ad
Step 3/3 : RUN pip3 uninstall -y python-openzwave && pip3 install --no-cache-dir 'python_openzwave==0.4.11' --install-option="--flavor=ozwdev" apk del build-dependencies
---> Running in 87694178a49b
Uninstalling python-openzwave-0.4.10:
Successfully uninstalled python-openzwave-0.4.10
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting python_openzwave==0.4.11
Downloading https://files.pythonhosted.org/packages/31/1a/6837bd4d3dd2bf5f8da5186b0b9b9ee865d21c4f31dc0fcc75deb651fb10/python_openzwave-0.4.11.zip (139kB)
Collecting apk
/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py:206: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options)
Could not find a version that satisfies the requirement apk (from versions: )
No matching distribution found for apk
The command '/bin/sh -c pip3 uninstall -y python-openzwave && pip3 install --no-cache-dir 'python_openzwave==0.4.11' --install-option="--flavor=ozwdev" apk del build-dependencies' returned a non-zero code: 1
Does anyone know why the build is complaining on missing distribution apk? How does hassbian or the venv version build?
apk --update add build-dependencies build-base\
should be
apk --update add build-dependencies build-base && \
pip3 install --no-cache-dir 'python_openzwave==0.4.11' --install-option="--flavor=ozwdev" \
should be
pip3 install --no-cache-dir 'python_openzwave==0.4.11' --install-option="--flavor=ozwdev" && \
Thanks for pointing out some mistakes! I was used to editing docker run commands over multiple lines and missed the &&
.
Now it seems like I can get somewhere. Lets see if this builds successfully.
Thanks for the proofreading! I was finally able to get this to build after installing some other packages.
If anyone else is interested:
dockerfile
FROM homeassistant/raspberrypi3-homeassistant:0.81.6
RUN set -e && \
apk --no-cache add --virtual build-dependencies coreutils linux-headers eudev-dev build-base && \
rm -rf /var/lib/apt/lists/* && \
pip3 uninstall -y python-openzwave && \
pip3 install --upgrade cython==0.28.5 && \
pip3 install --no-cache-dir 'python_openzwave==0.4.10' --install-option="--flavor=ozwdev" && \
apk del build-dependencies
I am not sure if anything can be optimized out (like rm -rf /var/lib/apt/lists/*
) or how to build via git but this builds successfully on a Pi 3 and reports:
$ head OZW_Log.txt
2018-11-06 21:51:45.540 Always, OpenZwave Version 1.5.0 Starting Up
2018-11-06 21:51:45.553 Info, Loading Localization File /usr/local/lib/python3.6/site-packages/python_openzwave/ozw_config/Localization.xml
2018-11-06 21:51:45.556 Always, Using Language Localization
2018-11-06 21:51:50.718 Info, Setting Up Provided Network Key for Secure Communications
2018-11-06 21:51:50.718 Warning, Failed - Network Key Not Set
2018-11-06 21:51:50.752 Info, Manufacturer_Specific.xml file Revision is 15
Improvements: Remove hard-coded values and Git flavor
FYI next release of HASS we wonāt need to update openzwave anymore, they have forked the repos and added the barrier support.
Link in case anyone wants to review.
Figuresā¦ I just got this working last night lol.
Thanks to everyone who made this happen, especially @firstof9