29 May 2016

Install OpenZWave on Raspberry Pi 3

This article explains how to install OpenZWave on Raspberry Pi 3, on Fedora 23 Minimal version (but it should be usable for other distribution).
If you need to install or complete your Raspberry Pi 3 installation on Fedora 23 Minimal version, for the most lightweight, you can read part 1, and part 2 of my articles.

Download the last stable version of OpenZWave.
This article will explain how to install the version 1.4 which is currently the newest one.

Download the version 1.4 of OpenZWave
wget https://github.com/OpenZWave/open-zwave/archive/v1.4.tar.gz -O /tmp/open-zwave-1.4.tar.gz

As root user, you should create a sub-directory for OpenZWave installation, and allow your no-root user to work in it
mkdir /opt/open-zwave
chown yourUser /opt/open-zwave

If not already done, you should create a profile file to update the libraries path (as root user)
sudo cat <<EOF > /etc/profile.d/variousEnvironment.sh
#!/bin/bash

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
EOF

Install some additional tools
dnf install gcc-c++ systemd-devel bc doxygen git

All the following instructions can be done with your no-root user.

Uncompress it and prepare environment
cd /opt/open-zwave
tar xf /tmp/open-zwave-1.4.tar.gz
ln -s open-zwave-1.4 open-zwave

Tips: the use of a symbolic link to this 'open-zwave' to a specific version of OpenZWave installation will allow you to switch easily on any newer version, without having to change any environment variable like PATH, in future.

Compile OpenZWave
cd /opt/open-zwave/open-zwave
make -j 4

You can either make OpenZWave available on OS (recommended)
sudo make install

Or update your profile file to add /opt/open-zwave/open-zwave/ in your LIBRARY_PATH (for libopenzwave.so) and in your PATH (for MinOZW binary).

For ease of use, it it recommended to follow my article to ensure to have the same path for your ZWave USB Device.

Now you can easily test your device with OpenZWave (adapt the device path to your needs).
MinOZW /dev/USBzwave

If you get plenty of lines, showing exchange with the USB Device, your setup is successfully completed.

1 comment:

  1. Hi. I wanted to update you that OpenZWave is now available as a Fedora package. You can install it like any other Fedora package.

    dnf install openzwave
    (or if you just need the library)
    dnf install libopenzwave

    ReplyDelete

Thank you for your visit, let's share your point of view: