Z-Wave Bridge Offline / Error: Bridge

Thanks @JoveToo, but unfortunately it still doesn’t work.

So, I’ve now done everything all over again, here are my steps from the beginning:

Hardware:
Raspberry Pi 4 4GB
Razberry Z-Wave Board (ZMEERAZ2)

Software:
Raspberry Pi OS Lite (Release date: May 7th 2021, Kernel version: 5.10)
Docker
Docker Portainer
openHAB 3.0.2 (Docker Image )

sudo apt-get update && sudo apt-get upgrade
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker pi

sudo docker volume create portainer_data
sudo docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
sudo systemctl restart docker
echo "dtoverlay=disable-bt" | sudo tee -a /boot/config.txt
sudo systemctl disable hciuart
sudo reboot
sudo useradd -r -s /sbin/nologin openhab
usermod -a -G openhab pi
sudo mkdir -p /opt/openhab/{conf,userdata,addons}
sudo chown -R openhab:openhab /opt/openhab
cp /usr/lib/tmpfiles.d/legacy.conf /etc/tmpfiles.d/

→ add d /run/lock 0775 root dialout -

Create the following stack:

version: '2.2'

services:
  openhab:
    image: "openhab/openhab:latest"
    container_name: openhab
    restart: always
    network_mode: host
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/etc/timezone:/etc/timezone:ro"
      - "/opt/openhab/addons:/openhab/addons"
      - "/opt/openhab/conf:/openhab/conf"
      - "/opt/openhab/userdata:/openhab/userdata"
    devices:
      - "/dev/ttyAMA0:/dev/ttyAMA0:rwm"
    environment:
      OPENHAB_HTTP_PORT: "8080"
      OPENHAB_HTTPS_PORT: "8443"
      USER_ID: "999"
      GROUP_ID: "994"
      EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Vienna"
      CRYPTO_POLICY: "unlimited"

again:

Allright, I have also had to modify my /etc/default/openhab and had to add

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0"

In your case that should be:

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0"

It’s probably better to copy the default file to the appropriate directory and edit that but I was too lazy to figure out which one that was.

With docker i don´t have the path /etc/default/openhab but i think with this line in my docker-compose file EXTRA_JAVA_OPTS: "-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0" should normally load the export var ${EXTRA_JAVA_OPTS}. I did this now, and you can guess, no success…

#
# set JVM options
#
ARCH=`uname -m`
EXTRA_JAVA_OPTS_COMMON="-Djava.awt.headless=true"
EXTRA_JAVA_OPTS_ARCH=""
case "$ARCH" in
    *arm*) ;;
  *aarch*) ;;
        *) EXTRA_JAVA_OPTS_ARCH="-XX:+UseG1GC" ;;
esac
export EXTRA_JAVA_OPTS="${EXTRA_JAVA_OPTS_COMMON} ${EXTRA_JAVA_OPTS_ARCH} ${EXTRA_JAVA_OPTS}"
export JAVA_NON_DEBUG_OPTS="-XX:-UsePerfData"

Have you tried running openhab without docker? I am unsure about docker security but that might interfere. At least you would know your board is working correctly and you would have a lead on where to find the problem.

Yes, i previously had OH 2.5 in this constellation (Raspberry Pi 4 / Razberry Board) running for a long time without any problems, since the switch to OH 3 the board no longer works - like a lot more, but that’s another story … what has changed is the version of OH and the move to Docker

Hello,

i have now found the solution. The following post provided me with the necessary information:

If openHAB is installed in a Docker on a Raspberry Pi OS, the serial console must be deactivated via raspi-config and the serial port must of course be activated.

@JoveToo thank you for your help.

2 Likes

Glad you got it solved!