After Openhab or deCONZ restart deCONZ devices stay offline

I am using OH 3.3 and Deconz 17.1. Both run in docker.
Upon restart of OH or DOCONZ I have an issue with devices staying in ERROR CONFIG state

  • sometimes deCONZ Gateway bridge stays in error. To bring the system to live again I need to disable enable the bridge. Then most of the devices come back
  • sometimes only a few random devices stay in error. I need to disable/enable them one by one to bring them back to live.

This scenario exist since long and I was hoping that other users see see this too to we can maybe followup and resolve it.


docker-compose


openhabFull:
image: “openhabjle:3.3.0-Full”
restart: always
network_mode: host
volumes:
- “/etc/localtime:/etc/localtime:ro”
- “/etc/timezone:/etc/timezone:ro”
- “openhab_cont-init.d:/etc/cont-init.d”
- “openhab_addons:/openhab/addons”
- “openhab_conf:/openhab/conf”
- “openhab_userdata:/openhab/userdata”
- “openhab_custom:/openhab/custom”
environment:
OPENHAB_HTTP_PORT: “8080”
OPENHAB_HTTPS_PORT: “8443”
EXTRA_JAVA_OPTS: “-Duser.timezone=Europe/Berlin”

deconzcommunity:
image: deconzcommunity/deconz:latest
container_name: deconzcommunity
mac_address: da-ee-47-c3-4a-2a
networks:
pub_net:
ipv4_address: 192.168.123.194
restart: always
ports:
- 5900:5900
- 80:80
- 443:443
volumes:
- “/etc/localtime:/etc/localtime”
- “/etc/timezone:/etc/timezone”
- “deconzcommunity_deCONZ:/opt/deCONZ”
- “deconzcommunity_otau:/root/otau”
devices:
- /dev/ttyACM0
environment:
- DECONZ_WEB_PORT=80
- DECONZ_WS_PORT=443
- DEBUG_INFO=1
- DEBUG_APS=0
- DEBUG_ZCL=0
- DEBUG_ZDP=0
- DEBUG_OTAU=1
- DECONZ_VNC_MODE=1

networks:
pub_net:
external: true


Network macvlan


docker network create -d macvlan -o parent=eno1 --subnet 192.168.123.0/24 --gateway 192.168.123.254 --ip-range 192.168.123.192/27 --aux-address ‘host=192.168.123.221’ --dns 192.168.123.254 -o parent=eth0 pub_net

ip link add pubhost_net link eth0 type macvlan mode bridge
ip addr add 192.168.123.222/32 dev pubhost_net
ifconfig pubhost_net up
ip route add 192.168.123.192/27 dev pubhost_net

In my test environment, I played a lot with using the docker mcvlan network and have a working (yet as test) solution. I still have both containers in production running in network mode “host”. The mcvlan has the problem that the main (external) DHCP server is not used and no external entries in the DNS server are made. I tried some plugins managing this problem, which were not working well.
It is also very important when running openhab under docker and having multiple networks defined on the docker host, to set the network setting openhab the right way.
In my case it is like this:

What is the reason you running deCONZ in mcvlan mode?

Please take a look here to enable/disable the deconz device

I have 22 containers running. Some of them in mode host some on macvlan. In general there is no issue with the network. There is no such issue with other containers on macvlan like Mosquitto or Baikal.
Only the interface between deCONZ and OH is fragile at restart of either container.

Thank you for this hint. The problem is that devices are random. Neverthless I will try to implement this for the deCONZ bridge which is most prominent.

its not docker it happens to me with a physical