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

What do you mean “I don’t know if it works”? Of course it works.

I meant I haven’t tried it personally, so can’t speak from experience.
Maybe be helpful instead of putting short useless comments? :wink:

Maybe helpful to search and find the long thread on this forum about it.

1 Like

i came across this but several users were complaining about the number of devices that you can add and signal strength. These xiaomi sensors are killing me, I feel like i should have spent a little more and get the z-wave devices.

I am getting the error:

2018-12-02 04:34:14 WARNING (MainThread) [homeassistant.setup] Setup of xiaomi_aqara is taking over 10 seconds.
2018-12-02 04:34:54 ERROR (SyncWorker_7) [homeassistant.components.xiaomi_aqara] No gateway discovered
2018-12-02 04:34:54 ERROR (MainThread) [homeassistant.setup] Setup failed for xiaomi_aqara: Component failed to initialize.

Below is my config .yaml the indentations are getting cleared
xiaomi_aqara:
discovery_retry: 10
gateways:
#hub1
- mac: XX:XX:XX:XX:XX:XX
key: key
#hub2
- mac: XX:XX:XX:XX:XX:XX
key: key

Read the advice at the top of every page in the forum about how to format code snippets.

I was able to get the Hubs added - I created a small write up on how I got this resolved here is a link to the post - Xiaomi Hub - invalid config

1 Like

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!

1 Like

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

I’m on version 159 and my gateway is causing so many issues recently. Everything was working fine for a few months until suddenly it decided to start having trouble connecting to WiFi, ping timeouts, not responding to commands to control the light from HASS. All of this happened randomly, I was on the ‘no firmware upgrades’ policy as long as it works, it started behaving suspiciously and I upgraded it and I’m still having issues.
I think the next step is to factory reset it or upgrade to 161. I’m not sure about either approach. I’ve got loads of sensors.