Page 1 of 1

Xiaomi gateway not working when moving domoticz from direct install on rpi to docker

Posted: Monday 21 June 2021 22:59
by timon
I am moving from a direct install on a raspberry pi to docker container and managed to get everything to work except for the Xiaomi gateway. I used a backup of the database of the rpi in the docker container to get up and running and both domoticz instances are on version 2021.1.

Port 9898 is open and mapped to docker container. When starting domoticz in docker I get the following entry in my log file:
2021-06-21 22:45:57.464 Status: Xiaomi Gateway: XiaomiGateway (ID=17): Delaying worker startup...
2021-06-21 22:46:02.464 Status: Xiaomi Gateway: XiaomiGateway (ID=17): Selected as main Gateway
2021-06-21 22:46:02.465 Status: Xiaomi Gateway: XiaomiGateway (ID=17): Worker started...
2021-06-21 22:46:02.466 Status: Xiaomi Gateway: XiaomiGateway (ID=17): XiaomiGateway IP address starts with: 192.168.2

The devices connected to the Xiaomi gateway in domoticz in docker do not get updated information (door locks, movement detectors) and I cannot control the light of the gateway.

When I start domoticz on the rpi I get the following entry in my log file:
2021-06-21 22:51:43.811 Status: Xiaomi Gateway: XiaomiGateway (ID=17): Delaying worker startup...
2021-06-21 22:51:48.811 Status: Xiaomi Gateway: XiaomiGateway (ID=17): Selected as main Gateway
2021-06-21 22:51:48.812 Status: Xiaomi Gateway: XiaomiGateway (ID=17): Worker started...
2021-06-21 22:51:48.812 Status: Xiaomi Gateway: XiaomiGateway (ID=17): Using 192.168.2.10 for local IP address.

The devices connected to the Xiaomi gateway in domoticz on rpi get updated information (door locks, movement detectors) and I can control the light of the gateway.

I have the feeling that I am missing something simple. Anyone has any idea on how to get this to work in the docker container?

Re: Xiaomi gateway not working when moving domoticz from direct install on rpi to docker

Posted: Sunday 19 September 2021 9:00
by rumpibandi
hi,
same issue, did you find the solution?

Re: Xiaomi gateway not working when moving domoticz from direct install on rpi to docker

Posted: Monday 20 December 2021 16:02
by lolomin
Same problem here, any of you which find a solution please ?

Re: Xiaomi gateway not working when moving domoticz from direct install on rpi to docker

Posted: Thursday 30 December 2021 10:54
by digitallez
XiaomiGateway works fine with option "network_mode: host".
In file docker-compose.yml try remove port forwards and add line network_mode: host
Spoiler: show

Code: Select all

version: '3.3'

services:
  domoticz:
    image: domoticz/domoticz
    network_mode: host
    container_name: domoticz
    restart: unless-stopped
    # Pass devices to container
    # devices:
    #   - "/dev/serial/by-id/usb-0658_0200-if00:/dev/ttyACM0"
    #---------  "host" network_mode is incompatible with port_bindings -------
    #ports:
    #  - 8080:8080
    #  - 1443:1443
    #  - 6144:6144
    #  - 54321:54321
    #  - 9898:9898
    volumes:
      - ./config:/opt/domoticz/userdata
    environment:
      - TZ=Europe/Kiev
      - LOG_PATH=/opt/domoticz/userdata/domoticz.log