OzwDaemon

Install ozwdaemon on Raspbian 10 (without Docker).

On this page... (hide)

  1. 1. Extract from Docker
  2. 2. Install on Rpi
    1. 2.1 Upgrade to Buster
    2. 2.2 Dependencies
    3. 2.3 Copy the pre-built libs
    4. 2.4 Run
    5. 2.5 Systemctl Service

1.  Extract from Docker

Do this on a dev host. We don't need or want docker on the RPi?.

Get the latest linux/arm tag from https://hub.docker.com/r/openzwave/ozwdaemon/tags

OZW=openzwave/ozwdaemon:latest@sha256:f51ed08d35d45280b3f5dccfc982d7914c27a548ca4453548b5713c6ab8ec9e8  
docker pull $OZW  
OZW_CONT=$(docker create $OZW)  
docker export $OZW_CONT > ozwdaemon.f51ed08d.tar

2.  Install on Rpi

2.1  Upgrade to Buster

We need glibc 2.28 for the QT libs. Stretch had 2.24 which is too old.

References:

I decided against doing sudo rpi-update.

2.2  Dependencies

Refer to the ozwdaemon Dockerfile

apt-get -y install libunwind8 libcurl4 binutils libglib2.0- libicu63 wget

2.3  Copy the pre-built libs

I suppose I should make a deb for it...

On the dev host:

# explode the tar  
tar xvf ozwdaemon.f51ed08d.tar  
  
# you'll need to deal with some /opt and ~/.local permissions yourself...  
  
scp usr/local/bin/ozwdaemon pi@rpi:.local/bin/  
scp -r opt/qt pi@rpi:/opt/qt

2.4  Run

pi@rpi $ ozwdaemon --version
ozwdaemon 0.1.170

pi@rpi $ ldd `which ozwdaemon`  # complete lib deps
    linux-vdso.so.1 (0x7ee33000)
    /usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so => /usr/lib/arm-linux-gnueabihf/libarmmem-v7l.so (0x76ebb000)
    libopenzwave.so.1.6 => /usr/local/lib/libopenzwave.so.1.6 (0x76d16000)
    libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76d03000)
    libresolv.so.2 => /lib/arm-linux-gnueabihf/libresolv.so.2 (0x76cdf000)
    libqt-openzwave.so.1 => /opt/qt/5.12.9/lib/libqt-openzwave.so.1 (0x76bf1000)
    libqt-openzwavedatabase.so.1 => /opt/qt/5.12.9/lib/libqt-openzwavedatabase.so.1 (0x76bda000)
    libunwind.so.8 => /usr/lib/arm-linux-gnueabihf/libunwind.so.8 (0x76b99000)
    libcurl.so.4 => /usr/lib/arm-linux-gnueabihf/libcurl.so.4 (0x76b15000)
    libQt5RemoteObjects.so.5 => /opt/qt/5.12.9/lib/libQt5RemoteObjects.so.5 (0x76ad0000)
    libQt5WebSockets.so.5 => /opt/qt/5.12.9/lib/libQt5WebSockets.so.5 (0x76ab9000)
    libQt5Mqtt.so.5 => /opt/qt/5.12.9/lib/libQt5Mqtt.so.5 (0x76a9f000)
    libQt5Network.so.5 => /opt/qt/5.12.9/lib/libQt5Network.so.5 (0x769e1000)
    libQt5Core.so.5 => /opt/qt/5.12.9/lib/libQt5Core.so.5 (0x766bc000)
    libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76692000)
    libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x7654b000)
    libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x764c9000)
    libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x7649c000)
    libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x7634e000)
    /lib/ld-linux-armhf.so.3 (0x76f72000)
    liblzma.so.5 => /lib/arm-linux-gnueabihf/liblzma.so.5 (0x7631d000)
    libnghttp2.so.14 => /usr/lib/arm-linux-gnueabihf/libnghttp2.so.14 (0x762ee000)
    libidn2.so.0 => /usr/lib/arm-linux-gnueabihf/libidn2.so.0 (0x762c2000)
    librtmp.so.1 => /usr/lib/arm-linux-gnueabihf/librtmp.so.1 (0x76299000)
    libssh2.so.1 => /usr/lib/arm-linux-gnueabihf/libssh2.so.1 (0x76263000)
    libpsl.so.5 => /usr/lib/arm-linux-gnueabihf/libpsl.so.5 (0x76243000)
    libssl.so.1.1 => /usr/lib/arm-linux-gnueabihf/libssl.so.1.1 (0x761c4000)
    libcrypto.so.1.1 => /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1 (0x75fab000)
    libgssapi_krb5.so.2 => /usr/lib/arm-linux-gnueabihf/libgssapi_krb5.so.2 (0x75f61000)
    libkrb5.so.3 => /usr/lib/arm-linux-gnueabihf/libkrb5.so.3 (0x75ea6000)
    libk5crypto.so.3 => /usr/lib/arm-linux-gnueabihf/libk5crypto.so.3 (0x75e66000)
    libcom_err.so.2 => /lib/arm-linux-gnueabihf/libcom_err.so.2 (0x75e53000)
    libldap_r-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/libldap_r-2.4.so.2 (0x75dfe000)
    liblber-2.4.so.2 => /usr/lib/arm-linux-gnueabihf/liblber-2.4.so.2 (0x75de2000)
    libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x75db7000)
    libicui18n.so.63 => /usr/lib/arm-linux-gnueabihf/libicui18n.so.63 (0x75b69000)
    libicuuc.so.63 => /usr/lib/arm-linux-gnueabihf/libicuuc.so.63 (0x759e3000)
    libicudata.so.63 => /usr/lib/arm-linux-gnueabihf/libicudata.so.63 (0x73fe5000)
    libgthread-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libgthread-2.0.so.0 (0x73fd3000)
    libglib-2.0.so.0 => /usr/lib/arm-linux-gnueabihf/libglib-2.0.so.0 (0x73ec3000)
    libunistring.so.2 => /usr/lib/arm-linux-gnueabihf/libunistring.so.2 (0x73d47000)
    libgnutls.so.30 => /usr/lib/arm-linux-gnueabihf/libgnutls.so.30 (0x73ba4000)
    libhogweed.so.4 => /usr/lib/arm-linux-gnueabihf/libhogweed.so.4 (0x73b65000)
    libnettle.so.6 => /usr/lib/arm-linux-gnueabihf/libnettle.so.6 (0x73b21000)
    libgmp.so.10 => /usr/lib/arm-linux-gnueabihf/libgmp.so.10 (0x73aa8000)
    libgcrypt.so.20 => /lib/arm-linux-gnueabihf/libgcrypt.so.20 (0x739ce000)
    libkrb5support.so.0 => /usr/lib/arm-linux-gnueabihf/libkrb5support.so.0 (0x739b4000)
    libkeyutils.so.1 => /lib/arm-linux-gnueabihf/libkeyutils.so.1 (0x739a0000)
    libsasl2.so.2 => /usr/lib/arm-linux-gnueabihf/libsasl2.so.2 (0x73979000)
    libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0x73902000)
    libp11-kit.so.0 => /usr/lib/arm-linux-gnueabihf/libp11-kit.so.0 (0x737fd000)
    libtasn1.so.6 => /usr/lib/arm-linux-gnueabihf/libtasn1.so.6 (0x737dd000)
    libgpg-error.so.0 => /lib/arm-linux-gnueabihf/libgpg-error.so.0 (0x737b3000)
    libffi.so.6 => /usr/lib/arm-linux-gnueabihf/libffi.so.6 (0x7379b000)

2.5  Systemctl Service

/etc/systemd/system/ozw.service

[Unit]
Description=OpenZWave Daemon
After=network.target

StartLimitIntervalSec=500
StartLimitBurst=5

[Service]
Type=simple
User=hass
WorkingDirectory=/home/hass/ozwdaemon
Environment=OZW_NETWORK_KEY="0x12,0x34,0x56,0x78,0x9a,0xbc,0xde,0xf0,0x12,0x23,0x34,0x45,0x56,0x67,0x78,0x89"
ExecStart=/usr/local/bin/ozwdaemon -s /dev/ttyACM0 -c /etc/openzwave -u /home/hass/ozwdaemon --mqtt-server localhost --stop-on-failure

Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target