Security Z-Wave devices require a network key before being added to the network using the zwave.add_node_secure service. You must edit the options.xml file, located in your python-openzwave config_path to use a network key before adding these devices.
You can replace these values with your own 16 byte network key. For more information on this process see the OpenZwave wiki article Adding Security Devices to OZW
An easy script to generate a random key:
cat /dev/urandom | tr -dc â0-9A-Fâ | fold -w 32 | head -n 1 | sed -e âs/(âŚ)/0x\1, /gâ
And the way to edit options.xml is with the nano command I provided:
The two problems Iâm having in following the steps is that 1) inside the /srv/homeassistant/lib/python3.4/site-packages/ there is not the âlibopenzwave-0.3.2-py3.4-linux-armv7l.eggâ showing up at all. Iâm wondering if Iâm missing some of these steps that needs to be done first before moving on to your step 2 (replacing existing script)?
INSTALLATION
To allow Home Assistant to talk to your Z-Wave USB stick you will have to compile the OpenZWave library and install the related python-OpenZWave package. This can be done as follows. (Note: The Home Assistant docker image and the All In One installer have support for Z-Wave already built-in!)
Make sure you have the correct dependencies installed before running the script:
$ sudo apt-get install cython3 libudev-dev python3-sphinx python3-setuptools git
Make sure you have at least version 0.23 and at the most 0.24.1 of cython.
$ sudo pip3 install --upgrade cython==0.24.1
Then get the OpenZWave files and switch to the python3 branch:
Do not use root to build python-openzwave as it will surely fail.
$ git clone https://github.com/OpenZWave/python-openzwave.git
$ cd python-openzwave
$ git checkout python3
$ PYTHON_EXEC=$(which python3) make build
$ sudo PYTHON_EXEC=$(which python3) make install
Instead of make install, you can alternatively build your own python-openzwave package which can be easily uninstalled:
$ sudo apt-get install -y checkinstall
$ sudo PYTHON_EXEC=$(which python3) checkinstall --pkgname python-openzwave --pkgversion 1.0 --provides python-openzwave
With this installation, your config_path needed below will resemble:
/usr/local/lib/python3.4/dist-packages/libopenzwave-0.3.0b8-py3.4-linux-x86_64.egg/config
If you followed along with setting up a virtual environment, your path will be:
The replacement script, install_openzwave.sh from step 2/3 will download, patch, and install the libopenzwave-0.3.2-py3.4-linux-armv7l.egg package once it successfully executes. Then the options.xml file will be in the location mentioned.
The security key is a randomized set of numbers that you can generate if youâre setting it up for the first time. If youâve set it up before, you would have had to have a backup of it (an older options.xml, for example).
If youâre following the steps correctly, it could be that the script is failing to execute. I can double check later today on a new sd card to verify that it works.
Iâm pretty sure I did everything correctly the first time, Iâm probably too much of a newbie to be able to figure out what went wrong. Iâll wait to see what comes of this for existing installs and go back to my other SD card for now. Thanks for the prompt replies though!
Hi
I am 2 week old with hass, just setup a light and thermostat, and just paired my gocontrol/linear garage door opener to my aeon z-stick, but i dont see this opener in my hass screen.
did you say my all-in-one-script (virtualenv) on raspberry has everything that it should show my linear? or do i have to follow the instruction to setup?
@balajeek The OpenZwave files need to be patched before building. The All in One installer does not apply the necessary patch for the Linear Garage door as it is being built. The AIO installed version is not necessarily an easy version to apply the patch and build OZW separately.There is a modified script to install the patch version to the Hasbian version at message 115 which means you would need to start over. As much as it will be a pain, I would suggest reading through the whole thread.
If i start all over and get the garage door sensor working does future Home Assistant update would break in any way. I really had spent a lot of my time setting up the Home Assistant using All-in One installer with following, first dimmer switch, theromostat and SSL and MQTT with OwnTracks and now working on TLS for MQTT.
Would this be fixed in future Home Assistant updates so i can wait. If not then i have no option and i have to start all over again (if the garage door is going to work for sure)
There are no guarantees that a future update wouldnât break something. One would hope that the changes would eventually make it to an update, but it has been quite some time if you go back to earlier posts in this thread.
While I suggested that you should start over, it doesnât mean your current configuration canât survive. You can simply move your configuration back to the proper location on the new install. I canât speak for every zwave stick, but most if not all retain the devices they have been paired with. If you install to a new SD card and copy your configuration to the folder it may not take much to get things up and going reasonably quickly. You would still have the old install that you can swap back in if things didnât go well.
thats a good idea to backup the config and to try it on different SD card. I will try that
So i have to install the hassbian image for raspberry pi 2 and follow the instructions by âuntitledâ posted 15d ago to get this working?
I beleive i will have to install MQTT server (becaz All-inOne script already have built it)
Building CommandClasses.o
/srv/homeassistant/src/python-openzwave/openzwave/cpp/src/command_classes/CommandClasses.cpp:62:54: fatal error: command_classes/MultiInstanceAssociation.h: No such file or directory #include âcommand_classes/MultiInstanceAssociation.hâ
^
compilation terminated.
/srv/homeassistant/src/python-openzwave/openzwave/cpp/build/support.mk:130: recipe for target â/srv/homeassistant/src/python-openzwave/openzwave/.lib/CommandClasses.oâ failed
make[2]: *** [/srv/homeassistant/src/python-openzwave/openzwave/.lib/CommandClasses.o] Error 1
make[2]: Leaving directory â/srv/homeassistant/src/python-openzwave/openzwave/cpp/buildâ
Makefile:20: recipe for target âallâ failed
make[1]: *** [all] Error 2
make[1]: Leaving directory â/srv/homeassistant/src/python-openzwave/openzwaveâ
Makefile:274: recipe for target âopenzwave/.lib/â failed
make: *** [openzwave/.lib/] Error 2
python setup-lib.py build
running build
running build_ext
cythoning src-lib/libopenzwave/libopenzwave.pyx to src-lib/libopenzwave/libopenzwave.cpp
building âlibopenzwaveâ extension
creating build
creating build/temp.linux-armv7l-3.4
creating build/temp.linux-armv7l-3.4/src-lib
creating build/temp.linux-armv7l-3.4/src-lib/libopenzwave
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -DPY_SSIZE_T_CLEAN=1 -Iopenzwave/cpp/src/ -Iopenzwave/cpp/src/value_classes/ -Iopenzwave/cpp/src/platform/ -Iopenzwave/cpp/build/linux/ -I/srv/homeassistant/include -I/usr/include/python3.4m -c src-lib/libopenzwave/libopenzwave.cpp -o build/temp.linux-armv7l-3.4/src-lib/libopenzwave/libopenzwave.o
cc1plus: warning: command line option â-Wstrict-prototypesâ is valid for C/ObjC but not for C++
src-lib/libopenzwave/libopenzwave.cpp:3:0: warning: âPY_SSIZE_T_CLEANâ redefined #define PY_SSIZE_T_CLEAN
^
:0:0: note: this is the location of the previous definition
In file included from openzwave/cpp/src/aes/aescpp.h:26:0,
from openzwave/cpp/src/Driver.h:42,
from src-lib/libopenzwave/libopenzwave.cpp:293:
openzwave/cpp/src/aes/aes.h:75:0: warning: ignoring #pragma warning [-Wunknown-pragmas] #pragma warning( disable : 4324 )
^
openzwave/cpp/src/aes/aes.h:93:0: warning: ignoring #pragma warning [-Wunknown-pragmas] #pragma warning( default : 4324 )
^
Also /srv/homeassistant/lib/python3.4/site-packages/libopenzwave-0.3.2-py3.4-linux-armv7l.egg/config/options.xml path does not exist. I have no libopenzwave folder?
Finally got mine recognized with help from this thread. It registers in Home Assistant and reports door state properly. But opening and closing doesnât work. The unit just beeps when I initiate an open or close. Nothing is obstructing the door, and my push button still works fine. The control wires are well inserted into the unit. Any thoughts?
Adding to this already very long thread I have taken the patch supplied by josh in update 11 and created a docker image that builds OZWCP from source and applies the patch.
I am getting this error when trying to run the container. Is the formating off?
exec format error
docker: Error response from daemon: Cannot start container 1d240cd4d824ae466074c4ca1a403c689d493189aeffd23dc198becc97c35056: [9] System error: exec format error
Ah I wasnât thinking that a large number of people using HA are on RaspPi. This image is for x86 architectures so it wont work on the raspberry pi. Sorry about that.
I should probably update the description to make that clear.
Unfortunately, it looks like two days after this updated script was put together, someone updated CommandClasses.cpp and updated the name of a command class MultiInstanceAssociation to MultiChannelAssociation to match specs.
I was able to get passed the âNo such file or directoryâ error for MultiInstantAssociation, by modifying the patched CommandClasses.cpp file with the renames named in the below change. After that make build was able to complete without error.
I updated today my HASS with 0.41 and i see a new box called âZwaveâ and under that it show all my zwave devices i paired including Aeon zstick. Surprisingly it also showed my garage door opener as âLinear Unknown: type=4744, id=3030 Readyâ
Few weeks back i was trying to get this device setup and hass wouldnât show this device in the UI, now i am glad after this update it atleast shows, but how do i configure so i can open/close the garage door and setup automation?
As always this community is awesome in helping and thanks a lot.