Xiaomi Gateway no Longer connecting on latest firmware - "Invalid Config"

Tags: #<Tag:0x00007f47fc0467d0>


I just read your other thread. Is that using the latest (updated) firmware that has caused the issues as first stated in this thread?


In the other thread he says 1.143_161 - although that is not a version I have seen discussed anywhere.

The first post of this thread refers to 1.4.1_161.0143. This is the version reported in other places too as being problematic.

@Pisupati could you please clarify?


Nickrout, you are correct 1.4.1_161.0143 is the firmware version of the hub. I had the version number wrong on my post, thank you, i will update it.


Cheers, 1.4.1_161.0143 is the version mine is asking me to upgrade to.


If your environment is okay, I would suggest not upgrading the xiaomi. This was my first time setting up the xiaomi and I selected the option to upgrade while setting it up in the app.


Trouble is, I have a version that doesn’t support the cube. I need to upgrade, but in doing so I will go to this apparently troublesome version. Kinda rock, meet hard place.


Good luck dude!


I see the cube works, and with more actions, in zigbee2mqtt, so I may do that rather than risk stuffing up my gateway.


It working fine for me, and I am not using auto discovery though. I have all my stuff static DHCP.

Could this be issues with firewall? I mean you could try put reject instead of block for firewall rules and allow to get dns request(from local dns resolver). As xiaomi vacuum won’t work if you have firewall set to block internet access, but if you set to reject it works.


Hey all,
It took a few tries but following @Pisupati’s instructions, removing everything from the Mi app, resetting it up, regenerating the code and turning off and on lan functions a few times, as well as using the key, mac address, and static IP setup in the HASS config, it now appears to be working again. Fingers crossed it stays that way!


I just got my gateway in the mail yesterday. After setting it up it prompted me to install the latest firmware, which I did. When I finally got to the step to enable LAN access, every time I flip the option on, I test if ports 9898 and 4321 have opened using nmap and they consistently stay closed, rendering the integration impossible. This sucks. Can’t seem to get those dang ports opened.


Stupid me, I had set up auto update in the Mi Home app and the hub updated to version 1.4.1_161.0143. It worked for over a year without much problems but now it behaves very bad and unreliable. I have to restart it quite often and more and more sensors loose connection to the hub and are not usable in HA, and it also gives very frequent (sometimes every few minutes and then a few hours without, etc) the following errors in HA:

No data in response from hub None
7:21 PM components/switch/xiaomi_aqara.py (ERROR)

Cannot connect to Gateway
7:21 PM components/switch/xiaomi_aqara.py (ERROR)

Cannot find a way to go back to a former firmware and so have to wait for Xiaomi/Aqara. Bummer! Perhaps a complete re-setup with all the devices would help but I’m too fed up with the Hub thing.

I had the intention to quietly move over to zigbee2mqtt (did a few things already) but now I feel forced to rush over to zigbee2mqtt (this still has some range problems but can be solved with zigbee routers). So I’m working on that.

It’s said before and I support it : don’t update to the newer firmware, better wait a few weeks to see if it’s ok, because there is no way back to a former firmware version!


There seem to be 2 versions of the hub, one with round text on the back which has issues after upgrade and an older version without round text that continues to work fine.

See pictures in this post