Xiaomi Gateway becomes unavailable after some hours

does it solve ther probelm ?
i guess you connect it to the repiter.

Well, seems to bee HA and Xiaomi GW should keep connected, and if connection down for a moment, HA unable to reconnect.
I’m not 100% that solved my problem, but I can say for sure, I did not notice “unavailable” GW in HA within HA reboot cycle (3-4 days).

Hi, I’m having the similar problem with the Xiaomi Gateway (V3) where it intermittently lost connection with HA with following errors. The strange thing is, whenever it lost connection, it can seems to recover itself ONLY IF the HA didn’t send any message to it, such as telling it to switch on my wall switch.

2020-02-13 02:31:16 ERROR (SyncWorker_19) [xiaomi_gateway] Cannot connect to Gateway
2020-02-13 02:31:16 ERROR (SyncWorker_19) [xiaomi_gateway] No data in response from hub None

Whenever it failed to recover, the Mi Home app also can’t connect to it but those motion sensor are able to send the stats to HA correctly. It just that it can’t trigger my wall switch/plug and the only thing i can do is doing a hard reset of the gateway or by restarting the router. There is no trend of the connection lost and it happening randomly.

So far, i have tried the following but NONE OF THOSE HELP,

  1. Change the wifi channel to 1 and 6. My gateway is using channel 25.
  2. Physically re-allocate the gateway far away or close to router.
  3. Disabling SPI firewall in my router.
  4. Regenerate the key.
  5. Set static IP for the gateway in my router.

Also, upon connection lost, i have scanned the gateway connection with nmap and both 9898 and 4321 are opened. My router did support multicast and i have still have few automation runs in Mi Home App.

Here is my gateway information:
FW: 1.4.1.161
Model: lumi.gateway.v3

Also, I have another Xiaomi universal IR remote (V2) connected to my HA and it’s also having connection issue randomly. And it seems that whenever the gateway is down, this IR remote seems also down at the same times. I wasn’t sure are these 2 issues are related.

Anyone have any advise how to fix those issues?

I have the same problem. after about 2 hours a xiaomi gateway disconnects its sensors. everything works on the xiaomi app. while on HASSIO it seems that the sensors are disconnected. my router is a fritzbox 7490. i don’t know how to fix it. solutions to adopt?

Solution is very simple: just throw it away :slight_smile:

The gateway calls its home server a lot of times per hour and tends to break connection if it doesn’t reach them; as a result, the Chinese Government probably knows a lot about the devices you have in your house and your online habits. But again, this isn’t anything that US Government (through the help of Google) doesn’t know already…

The solutions that allow for local control of Zigbee devices (Zha, Conbee, Zigbee2MQTT, etc) are very well supported by Home Assistant and, except some gross errors in configurations, data is yours and yours only.

it’s a joke?

No, that part no. The joke was only about the foreign governments surveillance.

From cost point of view, a custom Zigbee device of those mentioned above that works with HA is about the same as the Xiaomi Gateway; performance wise, they’re even better than Xiaomi, although some might be a little more difficult to setup.

But, again, it depends on every user finding a sweet spot between privacy, performance and suitability.

The larger issue with companies implementing cloud dependencies such as Xiaomi is that there’s nothing to stop them blocking third party access (see Nest) and there’s no regulator forcing them to provide service or to make their api public case they go out of business so users might get stuck with useless bricked devices afterwards.

Had the same issue and was able to resolved it yesterday (I was trying to get a Sonos speaker to work and fixed this by “accident”). It was resolved after enabeling multicast on my WLAN controller (Cisco WLC2100). To be exact I changed these settings:

  • enabled broadcast forwarding on controller page in general
  • changed multicast mode to multicast and used address 239.255.255.250 as the multicast group address field on the same controller page in general
  • enabled global multicast mode checkbox on multicast page under controller

have you changed anything on the router side?

Nope, so this probably is a (W)LAN issue and not beacause it’s trying to call home :wink: My wlan is managed by a separate device. So it can be that you need to edit these settings in your router but those should be found in the settings related to your local network.

Same problem ever since I replaced my ISP router to Mikrotik hAX S.
Using it with Tenda Nova MW6/3 (was working with it no issues before the Mikrotik arrived).
Running Hassio on Rpi2.

This losing Xiaomi after 2.5 hours started after Installing and defining the new router.
I’m sure something in the definitions there is not correct but this router is so much more complicated than what I’m able to understand in networking.

Can anyone pleas explain to me how to define what’s causing this on that router?
I can’t find anything about it anywhere.

Hi all,
Having the same issue here running HASS behind Traefik. I can’t have HASS on the host network and judging by some of the comments here it does sound like while that might fix the issue, it’s a workaround and not the main fix.
Is there a way to force the status to “available” via a script perhaps. At the moment, restarting HASS brings it back online.
Is it possible to manually change the timeout variable when running it in Docker?
I actually have my Aqara Zigbee devices running on a Tasmotaised Sonoff zbBridge and I have a zgibee2mqtt container as backup so I only need the Hub as an LED light and dodgy alarm :slight_smile:

Hi, i’ve the same problem with the same extender (xiaomi). Have You solved?
Tnx.

Fabio

Hello. Constant issues - random drop out of connectivity - gateway becomes unavailable, sometimes few secs, sometimes few minutes. I am out of ideas…