ZWaveJS2MQTT on Docker No Longer Works

Updating Docker and its zwavejs2mqtt container on a RPI3 running Buster no longer works

Introduction

I use Home Assistant with a remote Raspberrry Pi 3 fitted with an Aeotec Z-Stick Gen5 Z-Wave dongle running the excellent zwavejs2mqtt. After running mostly flawlessly for months, a recent Raspberry Pi apt and docker update disabled the whole lot. These types of faults take a few days to figure out what’s going on and can lead you down an unrelated rabbit-hole (And God forbid ruin your WAF – Wife Acceptance Factor).

Using Portainer and navigating to the zwavejs2mqtt container, you will see an icon there to enable you to look at the logs produced by the application. If you Google something along the lines of:

zwavejs2mqtt docker fatal error in line 0

You should start to see that similar problems have occurred to other people.

What Happened?

The first time I knew something was up is when Home Assistant showed an ! next to the ZWave integration corresponding to my remote Raspberry Pi 3 controlling the Z-Wave network in my garage. This Raspberry Pi 3 is an old device that is running Raspberry Pi OS Buster.

Unfortunately, this fault occurred when I was changing other stuff in my house such as the main network switch and also at the same time the latest updates of Home Assistant arrived too (something you should never do in your professional life!).

However, after thinking about how the fault was presenting itself, it must be something wrong in the remote Raspberry Pi itself. When you are running ZWaveJS2MQTT, you have a web page you can open to view the Z-Wave network; this was not working…

I have a small update script that I run on the RPI which updates the OS and also pulls down the latest version of the Docker Images – I tend to put all of my Docker stuff and environments in /opt along with the utilities too. This makes life a little easier. The main script is called update.sh

This script needs to be run as root (i.e. use sudo) and it updates the OS and then pulls the latest docker images down and replaces the ones already running.

update.sh

#!/bin/bash
apt update
apt full-upgrade -y
apt autoremove -y

cd /opt/
docker-compose pull
docker-compose up -d
docker image prune -af
docker volume prune -f

What Went Wrong?

Basically the new version of zwavejs2mqtt uses the wrong libseccomp2 library on Debian buster. I happened to find out this when coming across a similar problem for users of Zibbee2MQTT. Look for the “Notes for Raspberry Pi users” on this web-page:

Docker | Zigbee2MQTT

Fixing libseccomp2

sudo apt-key adv --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
echo "deb http://httpredir.debian.org/debian buster-backports main contrib non-free" | sudo tee -a "/etc/apt/sources.list.d/debian-backports.list"
sudo apt update
sudo apt install libseccomp2 -t buster-backports

Just type those commands into your remote RPI3 and after a reboot and docker rebuild (as shown above), you will find that your Z-Wave web status page on http://<your remote ip>:8091 is accessible again.

Don’t forget to restart your Home Assistant or Domoticz installation as well to restore piece and harmony into your life once more.

This is Amazing Stuff

Thanks and you can use it easily with Domoticz too.

Does this work? Of course it does!