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

Hey Everyone!

I have a strange issue that’s popped up all of a sudden. I believe this has started happening after I recently updated by Xiaomi gateway (v3) firmware to 1.4.1_161.0143. Home assistant (running on Hass.io) will no longer connect to my gateway and display my sensors’ information. I simply get the “Invalid Config” message in HASS saying that the Aqara component cannot be set up.

I haven’t changed anything else relevant to stop this from working. I’ve tried:
Resetting the gateway
Disabling and Reenabling Lan access
Generating a new token (and updating HASS config)
Creating a static IP and adding that to HASS
Many Many restarts of both the gateway and HASS.

Nothing seems to fix it. Very frustrating not being able to use my sensors especially when I just ordered a bunch more which are on their way! Does anybody have any ideas as to what might be happening or how to fix it? Or is anybody else experiencing this on the latest firmware?

Running HASS.IO version 0.82.1. Not sure if it’s possible to downgrade the gateway firmware or not.

Cheers guys!

2 Likes

Thanks for the heads up! Avoiding that upgrade.
SmartSelect_20181122-043650_Mi%20Home
Time to start blocking Xiaomi from all outbound network activity until we know it’s safe.
Still on 0.82.0 and the above Mi Gateway version, everything working superb.

1 Like

I had a similar issue last night, I guess my hub updated itself to version 0143 even though I thought outside access was disabled (must check firewall!). However my issue is a bit different and quite confusing, I was having errors about the devices which were stopping Hassio from rebooting. In the end I commented out my xiaomi_aqara entry from my configuration yaml file and HA rebooted fine. The really weird thing is that all my Xiaomi devices are still reporting values and I have no idea why or how! I’ve rebooted HA to see if it stops them but they continue to work. I’m actually happy that they are still working but as I thought I’d disabled the gateway I’m a bit mystified as to how they are transmitting their data.

The hub is probably being auto discovered.

I’m on 1.4.1_161.0143 since few days and everything seems normal

So, it is fine to update to latest FW on xiaomi hub then? Will still work with HA?

@SassySnowflake warned of a potential problem, I just wanted to say that works for me but in the end ymmv. maybe wait a few more weeks before updating

Same problem here. Getting invalid config error for xiaomi after upgrading FW. :frowning:
Any help would be much appreciated!

1 Like

I have started experimenting with Home Assistant since two days ago, I already had my Xiaomi Gateway working among other devices. Today I updated the gateway to the latest firmware and since then I’m also experiencing problems.

I have noticed that when Home Assistant can’t connect with the gateway, if I enter the “Mi Home” app, I go to the gateway, and then go to “About” -> “Wireless communication protocol” then I get an error message. In “Hub info” I get no information at all.

In my case unplugging the gateway and plugin it again makes the gateway work again with Home Assistant, at least for a while.

I don’t understand why you guys update the damned thing, Xiaomi is known for breaking integrations with updates like when it stopped recording the tokens on the internal SQL on the phone to make it harder to integrate with it’s devices like the purifier, vacuum etc.

Now that I have everything working and stable there’s no way I’d upgrade to latest firmware especially when it’s fresh. Hence why I’m here on this thread, I’m simply checking if people are having problems with latest firmware and “maybe” I’d consider upgrading if it’s all good. IF there are significant improvements, which is always unclear as Xiaomi don’t make the changelog easy to find

1 Like

Unfortunately I still have no connectivity with HASS whatsoever. I certainly wish I hadn’t updated, I’ve been fortunate enough to not have issues in the past but have only owned the hub for 6 months so far. If it starts working again I certainly won’t be updating it again unless I have to! It’s a shame, because updating my vacuum has added so many cool features and improvements. Wish it was the same for the hub.
I’m just hoping a fix comes out asap so I can use all the new motion sensors I just bought!

Evidently, the other odd behaviour of the hub is that despite no automations being configured in the mihome app, the nightlight comes on when I pass my motion sensor for some reason. Haven’t looked into that but it’s odd that it happens at all. Xiaomi make some amazing stuff but sometimes things can be a bit frustrating!

Just came across this, don’t know if it works but worth a try

In my case I still have my automation on the Xiaomi Mi Home app as I barely started with HASS.

Yesterday I had the same problem again, but unplug and plug it again also solved it and it has been working fine so far.

I’m not sure if the problem is triggered by some action, if I found out I will share with you in case it helps someone.

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