Docker, Portainer, OpenMediaVault system - Raspbee II Not Connected

Hi,

I asked this same question on the deCONZ forum here >

But this forum seems more active, and someone here might have encountered this specific problem before.

I have a problem connecting my deCONZ Raspbee II HAT.

My system is a Pi 4 booting directly from SSD, Raspbian Lite 64 bit OS Bullseye
Then I use OpenMediaVault to manage my system and to install Docker and Portainer via omv-extras.
I then run a stack of software in Docker; including OpenHAB, Grafana, and deCONZ Phoscon etc.
I also have a PiJuice HAT.
Everything is working well and smoothly. deCONZ is the final hurdle.

The annoying thing is that is was working for a while last night but stopped working again after a reboot. Even though I didn’t change anything (at least I didn’t think I had changed anything), I just wanted to see if it survived the reboot. So I know I’m close to getting this working. I can still go back to the deCONZ SD card image from here RaspBee SD-card images and it works everytime.

I am convinced that I have done what is necessary and there there is something about my system of OpenMediaVaul, Docker, and Portainer that is doing something that makes the standard instructions not work. As far as I can see, the countless pages of instructions boil down to three things:
1- Add user to dial out group
2- Set interface options in raspi-config
3- Add one line to /boot/config.txt - dtoverlay=miniuart-bt
Which leaves me not sure how to proceed any further.

The log messages from deCONZ look like this

17:00:18:073 DDF: status: Silver
17:00:18:073 DDF: subdevices: 
17:00:18:073 DDF: loaded resource item descriptor: attr/id
17:00:18:073 DDF: loaded resource item descriptor: attr/lastannounced
17:00:18:073 DDF: loaded resource item descriptor: attr/lastseen
17:00:18:073 DDF: loaded resource item descriptor: attr/manufacturername
17:00:18:073 DDF: loaded resource item descriptor: attr/modelid
17:00:18:073 DDF: loaded resource item descriptor: attr/name
17:00:18:073 DDF: loaded resource item descriptor: attr/swversion
17:00:18:073 DDF: loaded resource item descriptor: attr/type
17:00:18:073 DDF: loaded resource item descriptor: attr/uniqueid
17:00:18:073 DDF: loaded resource item descriptor: state/alert
17:00:18:073 DDF: loaded resource item descriptor: state/on
17:00:18:073 DDF: loaded resource item descriptor: state/reachable
17:00:18:073 DDF: loaded resource item descriptor: attr/id
17:00:18:073 DDF: loaded resource item descriptor: attr/lastannounced
17:00:18:073 DDF: loaded resource item descriptor: attr/lastseen
17:00:18:073 DDF: loaded resource item descriptor: attr/manufacturername
17:00:18:074 DDF: loaded resource item descriptor: attr/modelid
17:00:18:074 DDF: loaded resource item descriptor: attr/name
17:00:18:074 DDF: loaded resource item descriptor: attr/swversion
17:00:18:074 DDF: loaded resource item descriptor: attr/type
17:00:18:074 DDF: loaded resource item descriptor: attr/uniqueid
17:00:18:074 DDF: loaded resource item descriptor: config/on
17:00:18:074 DDF: loaded resource item descriptor: config/reachable
17:00:18:074 DDF: loaded resource item descriptor: state/consumption
17:00:18:074 DDF: loaded resource item descriptor: state/lastupdated
17:00:18:074 DDF: loaded resource item descriptor: attr/id
17:00:18:074 DDF: loaded resource item descriptor: attr/lastannounced
17:00:18:074 DDF: loaded resource item descriptor: attr/lastseen
17:00:18:074 DDF: loaded resource item descriptor: attr/manufacturername
17:00:18:074 DDF: loaded resource item descriptor: attr/modelid
17:00:18:074 DDF: loaded resource item descriptor: attr/name
17:00:18:074 DDF: loaded resource item descriptor: attr/swversion
17:00:18:074 DDF: loaded resource item descriptor: attr/type
17:00:18:074 DDF: loaded resource item descriptor: attr/uniqueid
17:00:18:074 DDF: loaded resource item descriptor: config/on
17:00:18:074 DDF: loaded resource item descriptor: config/reachable
17:00:18:074 DDF: loaded resource item descriptor: state/current
17:00:18:074 DDF: loaded resource item descriptor: state/lastupdated
17:00:18:074 DDF: loaded resource item descriptor: state/power
17:00:18:074 DDF: loaded resource item descriptor: state/voltage
17:00:18:096 gw run mode: normal
17:00:18:096 GW sd-card image version file does not exist: /opt/deCONZ/gw-version
17:00:18:097 DB sqlite version 3.34.1
17:00:18:098 DB PRAGMA page_count: 46
17:00:18:098 DB PRAGMA page_size: 4096
17:00:18:098 DB PRAGMA freelist_count: 0
17:00:18:098 DB file size 188416 bytes, free pages 0
17:00:18:099 DB PRAGMA user_version: 9
17:00:18:099 DB cleanup
17:00:18:099 DB create temporary views
16:00:18:107 Started websocket server on 0.0.0.0, port: 443
16:00:18:109 [INFO] - Found file containing button maps. Parsing data...
16:00:18:120 [INFO] - Button maps loaded.
16:00:18:121 found node plugin: libde_rest_plugin.so - REST API Plugin
16:00:18:122 found node plugin: libde_signal_plugin.so - Signal Monitor Plugin
16:00:18:133 found node plugin: libstd_otau_plugin.so - STD OTAU Plugin
16:00:18:182 dlg action: Read binding table
16:00:19:235 dev /dev/ttyAMA0
16:00:19:235 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:20:180 dev /dev/ttyAMA0
16:00:20:181 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:23:190 dev /dev/ttyAMA0
16:00:23:562 Announced to internet https://phoscon.de/discover
16:00:23:563 discovery server date: Sun, 27 Mar 2022 16:00:23 GMT
16:00:23:563 	 local time seems to be ok
16:00:24:175 dev /dev/ttyAMA0
16:00:24:175 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:25:176 dev /dev/ttyAMA0
16:00:25:176 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:26:136 DEV Tick.Init: booted after 8000 seconds
16:00:29:175 dev /dev/ttyAMA0
16:00:29:175 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:30:175 dev /dev/ttyAMA0
16:00:30:175 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:33:176 dev /dev/ttyAMA0
16:00:34:175 dev /dev/ttyAMA0
16:00:34:175 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:35:239 dev /dev/ttyAMA0
16:00:35:239 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:38:136 start reconnect to network
16:00:39:175 dev /dev/ttyAMA0
16:00:39:175 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:40:177 dev /dev/ttyAMA0
16:00:40:177 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:43:136 failed to reconnect to network try=1
16:00:43:178 dev /dev/ttyAMA0
16:00:44:175 dev /dev/ttyAMA0
16:00:44:175 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:45:177 dev /dev/ttyAMA0
16:00:45:177 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:45:316 New websocket 10.0.0.102:49592 (state: 3) 
16:00:48:136 failed to reconnect to network try=2
16:00:49:174 dev /dev/ttyAMA0
16:00:49:174 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:50:175 dev /dev/ttyAMA0
16:00:50:175 COM: /dev/ttyAMA0 / serialno: , RaspBee
16:00:53:136 failed to reconnect to network try=3
16:00:53:175 dev /dev/ttyAMA0

Things I have tried:
I installed the SD card OS image and it worked flawlessly first time. Zigbee hat showed as connected in the phoscon app and the firmware was upto date. So I don’t suspect a hardware problem.
https://phoscon.de/en/raspbee/sdcard

I followed the instructions from the GitHub page

1 - Add user to dialout group
I did this by typing

sudo usermod -a -G dialout pi

and I can verify that pi is part of the user group by typing

groups

which shows me

pi adm dialout cdrom sudo audio video plugdev games users input render netdev ssh gpio i2c spi pijuice

My docker-compose.yml file looks like this -

version: "3.8"

services:
  deconz:
    image: deconzcommunity/deconz:latest
    network_mode: host
    restart: always
    volumes:
      - /etc/localtime:/etc/localtime:ro    
      - /home/smarthome/deconz:/opt/deCONZ   # persistent configuration
    devices:
      - /dev/ttyAMA0 
    environment: 
      DECONZ_WEB_PORT: 8081 
      DECONZ_WS_PORT: 443
      DEBUG_INFO: 1 # Sets the level of the deCONZ command-line flag --dbg-info (default 1).
      DEBUG_APS: 0 # Sets the level of the deCONZ command-line flag --dbg-aps (default 0).
      DEBUG_ZCL: 0 # Sets the level of the deCONZ command-line flag --dbg-zcl (default 0).
      DEBUG_ZDP: 0 # Sets the level of the deCONZ command-line flag --dbg-zdp (default 0).
      DEBUG_OTAU: 0 # Sets the level of the deCONZ command-line flag --dbg-ota (default 0).
      DECONZ_DEVICE: /dev/ttyAMA0 

I have also tried using /dev/ttyS0 as the device, but no difference.

2 - Install WiringPi using these commands

wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb

3 - I moved Bluetooth to ttyS0 with the command

echo 'dtoverlay=pi3-miniuart-bt' | sudo tee -a /boot/config.txt

I also looked in to /boot/config.txt to verify that it does contain the follow lines

[all]
enable_uart=1
dtoverlay=pi3-miniuart-bt

I also tried the many variations of this code and others that are mentioned in various instructions and forums

dtoverlay=miniuart-bt
force_turbo=1
dtoverlay=disable-bt
dtoverlay=miniuart-bt-dtoverlay (this one I copied from the deCONZ SD card image install, haven't seen it anywhere else)

Trying

ps ax | grep deCONZ

gives me

20643 ?        Ssl    0:03 /usr/bin/deCONZ --auto-connect=1 --appdata=/opt/deCONZ --dbg-info=1 --dbg-aps=0 --dbg-zcl=0 --dbg-zdp=0 --dbg-ota=0 --dbg-error=0 --http-port=8081 --ws-port=443 -platform minimal --dev=/dev/ttyAMA0
22514 pts/0    S+     0:00 grep --color=auto deCONZ

Can someone please help?

Ever resolve this? I’m having the exact same problem. Followed the same steps except I cannot use host network_mode. I’m running the container as privileged.