maisun
(Maisun)
June 18, 2025, 9:40pm
1
After restart I lost connection to Xiaomi cloud, and since then I can’t login anymore, it’s the xiaomi miio integration, anybody experience similar problem?
I’m 100% sure the username/password/server is correct and I can login to xiaomi app and website
4 Likes
vascob
(Vasco)
June 18, 2025, 11:05pm
2
I’m having the same problem, maybe someone can help. After some digging I also noticed that there’s the same problem with the methods to get the API token.
1 Like
BambamNZ
(David)
June 18, 2025, 11:35pm
3
Mine still works, but didn’t do anything radical as restarting HA or reloading integrations.
However using the Token extraction tool, I do get an error, which hints to a multifactor authentication type of solution
maisun
(Maisun)
June 19, 2025, 4:58am
4
Yes the same problem for me with token extract tools, maybe Xiaomi changed login API.
maisun
(Maisun)
June 19, 2025, 8:21am
5
maisun:
After restart I lost connection to Xiaomi cloud, and since then I can’t login anymore, it’s the xiaomi miio integration, anybody experience similar problem?
I have created an issue: Xiaomi Miio: Could not login to Xiaomi Miio Cloud, check the credentials · Issue #147122 · home-assistant/core · GitHub
vascob
(Vasco)
June 19, 2025, 9:19am
6
I successfully retrieved the API token using the code changes presented in this issue:
opened 08:15AM - 18 Jun 25 UTC
I’m running into a login failure that’s misreported by the script. When trying t… o authenticate, the script reports “invalid login or password,”. But this made no sense, since it had worked the day before.
So I added some debugs in the code, and I got a response from Xiaomi’s server containing "description": "验证码输入错误" and a captchaUrl field. That error means “Captcha input error” in Chinese.
```
[DEBUG] login_step_2: URL: https://account.xiaomi.com/pass/serviceLoginAuth2
[DEBUG] login_step_2: Fields: {'sid': 'xiaomiio', 'hash': '<redacted>', 'callback': 'https://sts.api.io.mi.com/sts', 'qs': '%3Fsid%3Dxiaomiio%26_json%3Dtrue', 'user': 'XXXXX', '_sign': '0psXfr43eNI0IX6q9Suk3qWbRqU=', '_json': 'true'}
[DEBUG] login_step_2: Response text: &&&START&&&{"qs":"%3Fsid%3Dxiaomiio%26_json%3Dtrue","code":87001,"description":"验证码输入错误","securityStatus":0,"_sign":"0psXfr43eNI0IX6q9Suk3qWbRqU=","sid":"xiaomiio","result":"error","captchaUrl":"/pass/getCode?icodeType=login&0.3094213243055923","callback":"https://sts.api.io.mi.com/sts","location":"","pwd":0,"child":0,"desc":"验证码输入错误"}
[DEBUG] Downloading captcha image from: https://account.xiaomi.com/pass/getCode?icodeType=login&0.3094213243055923
[INFO] Captcha image saved at: C:<redacted>\Local\Temp\tmp5eh0517g.jpg
Enter captcha as shown in the image: <redacted>
```
So to fix this, I made a function that gets the captcha, and shows it to the user with Pillow, then asks for an input. After that, the script resends the login request with the captcha code included and everything works.
I’ve already patched this in my own code and can submit a pull request if you want. Let me know if you’re interested.
Working correctly now.
maisun
(Maisun)
June 19, 2025, 9:59am
7
Thanks for sharing!
Unfortunately my device requires cloud connection so just providing key doesn’t allow it to work.
maisun
(Maisun)
June 20, 2025, 8:13pm
8
Created a bug report in Github as it sounds like an issue affecting more users:
opened 08:21AM - 19 Jun 25 UTC
integration: xiaomi_miio
potential-duplicate
### The problem
After restart of HA yesterday I lost connection to Xiaomi cloud… , and since then I can’t login anymore, when I try to login again I received the error "Could not login to Xiaomi Miio Cloud, check the credentials". However I have triple checked my credential and it's correct. I tried to search in log but there is no error or warning.

What I have tried:
Restart HA, reset Xiaomi password, change region, wait for 24 hours before retry.
Nothing worked....
### What version of Home Assistant Core has the issue?
core-2025.6.1
### What was the last working version of Home Assistant Core?
core-2025.6
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Xiaomi miio
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/xiaomi_miio/
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
```
### Anything in the logs that might be useful for us?
```txt
Not I can find
```
### Additional information
Xiaomi might have changed their login API as I also failed to login from the "Get Mi Home devices token" app.
I can though use the same credential to login to xiaomi website and Mi Home app.
pnferrao
(Pnferrao)
June 22, 2025, 3:36pm
9
Same issue here, removed robot vacuum was not working now I can’t login again with my credentials
1 Like
maisun
(Maisun)
June 24, 2025, 9:38am
11
There are some suggestions on how to workaround the issue for lan controlled devices, for details please go to the issue in Github I created.
d.cobian
(Diego)
July 9, 2025, 4:20am
12
same. can’t use HA or Home Bridge. Time to explore Xiaomi without account using HACS ?
maisun
(Maisun)
July 11, 2025, 11:49am
13
Looks like the official integration is abandoned, it should perhaps be removed from HA releases. I will probably connect mine through HomeKit controller, but my gateway has 20+ sub-devices, it’s a major pain
1 Like
vascob
(Vasco)
July 19, 2025, 8:59pm
14
As I was just starting my setup, I abandoned anything cloud related and just use everything local.