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

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
timon
Posts: 1
Joined: Monday 21 June 2021 22:16
Target OS: Linux
Domoticz version: 2021.1
Contact:

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

Post 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?
rumpibandi
Posts: 1
Joined: Sunday 19 September 2021 8:58
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

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

Post by rumpibandi »

hi,
same issue, did you find the solution?
lolomin
Posts: 21
Joined: Sunday 11 October 2015 16:48
Target OS: Linux
Domoticz version:
Contact:

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

Post by lolomin »

Same problem here, any of you which find a solution please ?
digitallez
Posts: 1
Joined: Thursday 21 June 2018 9:24
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest