For those who are using Xiaomi Gateway, do you have any problem with recent firmware? My version is 1.4.1_161.0143 and it was updated few days ago. Within a day of running, it will fail to response and I could not turn on/off any switch. Sometimes restarting the gateway will get it to work for a while before the problem reappear. To make matter worse, I also recently change my router and I have another Gateway with same firmware that doesn't seem to have this problem. I am at a lost what is the problem here, still debugging...
I think I've resolved the issue that I am seeing and you will not believe what is the fix. It is the order which I power on my 2 gateways. Here is the background:
I've setup gateway A first and a few months later gateway B. If there is a restart, I will power on A first then B. Due to some issues recently, I reset gateway A and re-setup. Now if I power on A then B, the whole system will not work properly after a few hours. On MiHome app, gateway A and devices attached to A will appear offline. On Home Assistant, I still get sensor data from gateway A but I can't turn on/off switches, it seems that it can still read but not write to gateway.
I power on gateway B first, then A and the whole system is working fine after more than 24 hours. I tried to search for this issue but found nothing about the order of powering on gateway. Anyway just a note for user with 2 or more gateways if you get problems, maybe try powering them in different order.