This post describes how to build openzwave control panel for the armhf architecture using a docker image and qemu on a amd64 linux desktop (debian stretch). Once built the ozwcp.tar.gz can be extracted and run on an armhf based system (eg. Raspberry Pi).
Install Docker
apt-get install docker.io apparmor apparmor-utils qemu-user-static wget
Download and run the docker image
Download armhf debian (see https://registry.hub.docker.com/u/mattwire/ozwcp_build_armhf_debian/):
sudo docker pull mattwire/ozwcp_build_armhf_debian
Now run the image:
docker run -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static -i -t mattwire/ozwcp_build_armhf_debian /bin/bash
Docker Image (for reference)
The Docker image mattwire/ozwcp_build_armhf_debian is based on the mazzolino/armhf-debian image with the following changes:
cd /root apt-get install subversion vim build-essential autoconf libtool texinfo libudev-dev pkg-config git libgnutls-dev git clone https://github.com/OpenZWave/open-zwave-control-panel.git git clone https://github.com/OpenZWave/open-zwave.git svn checkout https://gnunet.org/svn/libmicrohttpd/ libmicrohttpd
Building openzwave-control-panel
INSTALL libmicrohttpd
To compile the libmicrohttpd dependency:
apt-get install libmicrohttpd-dev
Build open-zwave
To compile the open-zwave library upon which openzwave-control-panel depends:
make
Build openzwave-control-panel
Finally we can compile the openzwave-control-panel itself. But first we need to make some changes to the Makefile:
Uncomment the three linux lines and change the LIBZWAVE path to match the below:
OPENZWAVE := ../open-zwave LIBZWAVE := $(wildcard $(OPENZWAVE)/*.a) LIBUSB := -ludev LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB)
Now we are ready to build:
make ln -s ../open-zwave/config config make dist
Distributing and running
Make a note of the docker container ID (on the command line eg. 40617da12600) and exit the container (type exit).
Execute:
sudo docker cp 40617da12600:/root/openzwave-control-panel/ozwcp.tar.gz .
You now have a file ozwcp.tar.gz. Copy this to your armhf device (eg. odroid), extract it to a specific directory and run (you could choose any port):
./ozwcp -p 8000
Open a web-browser and navigate to http://my-server:8000 and you should get something similar to the following (once you’ve entered your device (eg. /dev/zwave):
Downloads
A pre-compiled version can be downloaded from ozwcp.tar.gz.
Nice guide. Thanks for taking the time to write it, I managed to get everything setup my end.