As far I know, the Asus original firmware doesn’t have such kind of option, however I can block the gateways using firewall. But what’s the point of drop gateways internet traffic? I don’t understand its the correlation with 2,5 hours unavailability.
When selecting a connected device icon (not from the View list) it shows the following popup screen and then internet access can be blocked for the device (from the looks of it I think it might be implemented by Asus too in pristine firmware)
To prevent it from sending information to the Chinese servers I don’t necessarily think Chinese site administrators (replace with Google/Amazon/etc/etc) might get anything useful knowing what time Europeans come home or are turning lights on and off, changing thermostat temperature, etc.; however, things change if this info falls out into the hands of some rogue persons across my street…
For OP the connection to the Xiaomi’s servers dropped out after 2-3 hours. In my limited use of the Xiaomi gateway (of about 3 months) the internet access was removed from the beginning and there have been periods where the gateway would appear online to the HA’s availability sensor for several days and sometimes it would disconnect after 1/2 - 1 hour and then reconnect quite fast (sometimes also the lights of the gateway in disco mode would indicate loss of connection although HA still showed it connected).
Anyway, this hasn’t bothered me too much as I was only using Xiaomi wall switches to control MiLight bulbs and there were (at least) two other means of turning the lights beside HA interface: PIR sensors (433Mhz) and native MiLight wall switches (don’t require internet, or a hub or even HA available as it can be paired directly to bulb/led band; having an DIY hub helps for HA integration however it is not mandatatory; one of the downside of this wall switch is the fact that is touch operated and not very practical for non-domestic persons).
I consider the scope of smart devices to only add some finesse touch to some of the good older technologies without fully replacing them
Omg…i have this problem and uses tenda mw3
I also had this problem. I switched from virtual python to hassio, did factory reset on xiaomi gateway, entered mac address, ip in config file, changed key to gw with different phones and versions of Mi Home but nothing worked.
My solution was to backup my settings in my router and then do a factory reset on the router and xiaomi gateway. reload the settings to the router. Now everything works as it should. Works without problems since then. My router is Asus rt-ac86u. I hope this can help
Hi guys,
I met the same thing after moving my hass server (docker/ubuntu/brix mini-pc) and xiaomi gateway to separate wi-fi VLAN. Before that, both were working good in my primary network, so the only thing was made - create VLAN and move hass and gate to that VLAN. My router is Mikrotik hap ac2.
Ports are open. Mcast seems to be ok. But exactly after 150 minutes after hass restart some sensors become unavalable. Some later. Some are still available. But 150 minutes is clearely a trigger.
Solved
The problem was that wifi network is very bad for multicast traffic. So the possible solutions are:
- Put hass server to LAN (mean wired network, not wifi)
or - To use multicast-2-unicast translation on router (for mikrotik you need to use multicast-helper option in ‘/interface wireless’ section).
Hope it can help
Have same issue
Hassio, Raspberry Pi 4, Xiaomi Gw2 + 5 sensors
After 1-5 days all Xiaomi sensors in HA became unavailable, have to restart hassio to solve it. Mi home works just fine at the same time.
Im using WiFi connection, TP-Link router, pretty old
Last time I see all Xiaomi sensors and GW is unavailable in HA, except one, door reel sensor still online
Will try to play with router settings, Ethernet connection is not an option in my case
Look for multicast settings if they are.
I think it is the main reason for sensors become unavailable if you use wifi.
Have no Unicast/Multicast settings, unfortunately
But, seems to be I found solution
I just put Xiaomi WiFi repeater Pro near Raspberry Pi
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,
- Change the wifi channel to 1 and 6. My gateway is using channel 25.
- Physically re-allocate the gateway far away or close to router.
- Disabling SPI firewall in my router.
- Regenerate the key.
- 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
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 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.