Can´t update Xiaomi Gateway firmware

I have a problem with Xiaomi Gateway firmware - every time a try to update the firmware (Current Version: 1.3.1_140.0143 - Latest: 1.3.1_141.0143) it shows no progress in the Mi Home App, the update stays at 0% a while and then says it cant be updated… after that the gateway is offline and cant be controlled in the app.

My Xiamoi Buttons work without any errors, only the Temperature and Humidity Sensor cant be detected in my Home Assistant, I get this line in the log:

ERROR (SyncWorker_12) [xiaomi_gateway] The device with sid 158d00022cd179 isn't supported of the used gateway firmware. Please update the gateway firmware if possible! This is the only way the issue can be solved.

So how can I get the update work? I choosed China Mainland in the Mi Home App. I’ve read something about the Router Firewall to switch off before the update, could that maybe the problem? I have a Fritzbox Router, is it possible there to change the Firewall for the Gateway?

There may be issues with Xiaomi servers today, I just tried to update the firmware through the app and it took quite a while and multiple attempts (stuck at 0%). I’m trying to delete some Mi Home “automations” too but that’s not working either. Might try later when the China mainland is asleep!

ah ok i will try later again! i tried a few days now, but maybe it was always the wrong time.

It’s likely that connections are cut off by the Great Chinese Firewall. A workaround I found was to set a static DNS entry for ot.io.mi.com and point it to 42.62.48.114. I think this was the Xiaomi server in Singapore so it doesn’t get firewalled and has always been responsive for me so far. If that IP doesn’t work do a nslookup ot.io.mi.com and try all the other IP addresses until you get lucky.

thanks for your reply! would love to try that out, but i can´t find the settings in my Fritzbox Router Web Interface or where to change it. Does anybody know where I can do that?

I also seem to be having a problem updating my firmware. No matter how many times I try to update via the app I am stuck on v1.3.3.1_140.0143.

@kirichkov Can you provide some more detailed instructions for us noobs who need some more guidance about how to do what you propose?

You have to set this up in your router and each router has different UI, so I can’t give any precise intructions. You have to look up your router’s manual how to set “static DNS records” and I can’t be of much more help.

Also many ISPs give you a locked down router where you can’t make any changes at all.

Ok, thanks. I don’t think my router supports this.

Is there any other way you think I could manage to update the firmware?

Not an easier one, unfortunately. You’d have to try repeatedly until the chinese Xiaomi servers are not blocked/overloaded.

Still can´t update the firmware too. But I ordered in the meantime different Temperature and Humidity Sensor from Gearbest, and it works now! These here were not working with my Xiaomi Gateway/HA:

https://de.gearbest.com/access-control/pp_626702.html

but these one work now:

https://de.gearbest.com/home-smart-improvements/pp_1233691.html

So I get still the notification in the Mi Home App to update the firmware, but the Sensors and also my Xiamoi Buttons work without any errors in Home Assistant