Xiaomi Gateway not being detected

So I’ve been using HA on Docker (DSM), for a couple of years.

I had to completely wipe out my HA docker container, and set it up from scratch. But I saved my configurations before. But the problem is, HA is no longer detecting the Xiaomi Aqara Gateway (1st gen).

I’m using:

xiaomi_aqara:
  discovery_retry: 10
  gateways:
    - key: a2gj3vdcsb2tlnpx

But I always get:

2020-02-23 12:27:17 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aqara is taking over 10 seconds.
2020-02-23 12:27:57 ERROR (SyncWorker_4) [homeassistant.components.xiaomi_aqara] No gateway discovered
2020-02-23 12:27:57 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi_aqara: Integration failed to initialize.

I’ve rebooting everything, but no matter what I do I can’t get the gateway to be detected.

If I put it like this:

xiaomi_aqara:
  interface: '192.168.1.78'
  gateways:
    - mac: 34ce009074ae
      key: a2gj3vdcsb2tlnpx

I get,

2020-02-23 12:45:25 ERROR (MainThread) [homeassistant.setup] Error during setup of component xiaomi_aqara
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/setup.py”, line 174, in _async_setup_component
component.setup, hass, processed_config # type: ignore
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/homeassistant/homeassistant/components/xiaomi_aqara/init.py”, line 145, in setup
xiaomi.discover_gateways()
File “/usr/local/lib/python3.7/site-packages/xiaomi_gateway/init.py”, line 47, in discover_gateways
_socket.bind((self._interface, 0))
OSError: [Errno 99] Address not available

I don’t need to say that I’m absolutely sure that the gateway is on that IP, despite the message…

What can I do?

hi I have same issue after a reboot today do you run on Home assistant on archlinux?

DSM (synology) on docker

In my case I have just add gateway IP in my config file like this:

gateways:
     - host: 192.168.1.61
       mac: xxxxxxxxxxxxx

And now it s work