Xiaomi cloud authentication problem

I used the xiaomi clout to use my lumi.gateway.mieu01 only as a led light. Since 3 days i cannot authenticate my xiaomi account in the home assistant integration.
Does someone has the same problem?

1 Like

Yes I have the same issue. I would like to reassign my Roborock S5 max but it is always telling me " Could not login to Xiaomi Miio Cloud, check the credentials." . But I am able to login with my credentials to the Xiaomi Cloud directly with my credentials

1 Like

And this only since 2-3 i think i’ll delete my actual Xiaomi account and to create a new one…

Update: i added correctly the xiaomi account to home assistant. But after thar i recieve this message:

DeviceException during setup of xiaomi gateway with host {self._host}

Can anybody help me?

I am unable to authenticate in the integration. I know the password is correct as it gets me into the app.

Hi,
could solve my login problem by changing my password. My first password was classified by xiaomi mi as to weak. After changing it to a stronger password I did not get any issue and use my devices within Home Assistant again.
Maybe a password change can help.

Mine is a google generated strong password, so I doubt that’s the issue. Although I guess it’s worth a shot.

I have the same issue. I changed password and nothing happend. Maybe first generation gateway is not supported.

Still getting this error mesaage and I cant see device and sensors in list:

Xiaomi Miio
Retrying setup: DeviceException during setup of xiaomi gateway with host {self._host}

Hi
I do have the same exact problem. DeviceException during setup of xiaomi gateway with host {self._host}
My 3 lumi.gateway.mieu01 are unavailable since november. I used a old backup with an older version of home assistant and it worked for two of them. After an update none worked.

Edit: same problem for a lumi.gateway.mgl03-Linux (some sub entities are working but not all)

Since yesterday’s update 1 of my gatewway get back to work. But the 3 others still don’t work.

Is there some update about this issue? My other Xiaomi cloud entities works well but gateway still get this error:
DeviceException during setup of xiaomi gateway with host {self._host}

Also have this issues. Anyone with an idea how to fix? :slight_smile:

Update:
I disabled the “Two Step Confirmation” on my account. That fixed it for me.

Update2:
No it stopped working again :frowning:

The issue still exists. The reason is that XIaomi changed their login API.

The issue has been discussed here : Log in to the Xiaomi Miio cloud failed with correct credentials · Issue #58991 · home-assistant/core · GitHub
And here (library used by the integration) : login failed with "Unknown exception occurred!" · Issue #6 · Squachen/micloud · GitHub

The issue still hasn’t been solved on the library used, so the Xiaomi Home integration won’t work. Until someone fixes it.

2 Likes

Starting to look into Home Assistant and I also have this issue. Unfortunately, the github issue is closed due to staleness. Anyone else still encountering this?

Use PiotrMachowski/Xiaomi-cloud-tokens-extractor: This tool/script retrieves tokens for all devices connected to Xiaomi cloud and encryption keys for BLE devices. (github.com)
It should fail because of 2 factor authentication, in my case, following the link brings me to the page to link an email address. I can skip it, but that won’t solve the problem. To stop the 2 factor authentication, you have to link your email. After linking, the token extractor will succeed, as well as the HA integration.

Basically, either log in to xiaomi account from Mijia app and follow the email link process, or use the token extractor to generate the link to link email, and then you should be able to login without the 2 factor auth problem.