Skip to content

"miiocli cloud" Login failed with verified correct password #2038

Open

Description

@schweini

Using 100% correct credentials (copied and pasted), I still get login failed when running miiocli cloud.

Version: 0.5.12 installed through pip on Ubuntu running on WSL.

AFAIK, I don't have 2FA enabled, and Ihave removed Google as a 'third part account' in the Xiaomi account.

The same is happening with "Mi home Kit" ( ApplY3D/mi-home-toolkit#11 )

Activity

  1. changed the title [-]"miiocli clout" Login failed with verified correct password[/-] [+]"miiocli cloud" Login failed with verified correct password[/+] on Aug 11, 2025
  2. llewelynb commented on Aug 16, 2025

    @llewelynb

    I'm having the same issue... Please help!

  3. juancabe commented on Aug 19, 2025

    @juancabe

    Same

  4. Shaw9 commented on Aug 23, 2025

    @Shaw9

    Same

  5. d1b commented on Aug 25, 2025

    @d1b

    It seems like the second stage of the login is not working -

    {'qs': '%3Fsid%3Dxiaomiio%26_json%3Dtrue', 'code': 87001, 'description': '验证码输入错误', 'securityStatus': 0, '_sign': '<sign_here>', 'sid': 'xiaomiio', 'result': 'error', 'captchaUrl': '/pass/getCode?icodeType=login&<stuff>', 'callback': 'https://sts.api.io.mi.com/sts', 'location': '', 'pwd': 0, 'child': 0, 'desc': '验证码输入错误'}
    

    the description and field fields both translate to The verification code was entered incorrectly.

  6. killembien commented on Aug 25, 2025

    @killembien

    Same issue here !
    Login suceeded 3 day ago.
    I try today and the same error message.
    Login on xiaomi.com : OK

  7. rilence commented on Sep 7, 2025

    @rilence

    I've validated this same behavior through 3 different HA integrations for Xiaomi devices, which use this library.

  8. LarrysGIT commented on Sep 17, 2025

    @LarrysGIT

    use Xiaomi-cloud-tokens-extractor to get the token, xiaomi added captcha not long ago, micloud doesn't support it.

  9. rytilahti commented on Sep 21, 2025

    @rytilahti
    Owner

    This library does use the micloud library in the background for cloud communications. If someone knows another library that supports the modern login workflow, we could swap this project to use the new library. Alternatively, it would be great if micloud could be improved to fix the situation :-)

  10. BlueRoar commented on Nov 25, 2025

    @BlueRoar

    This repo works to grab tokens:

    https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor

    I was able to get it to work by integrating the QR code login, just having it open the link for me, saving the session to get all the goodies and then doing local control.

  11. Tzxhy commented on Dec 11, 2025

    @Tzxhy

    use Xiaomi-cloud-tokens-extractor to get the token, xiaomi added captcha not long ago, micloud doesn't support it.

    Really helps.

  12. Wirsing84 commented on Apr 13, 2026

    @Wirsing84

    anyone ever figure out how to use miiocli cloud again? I still cannot log in.

    ...in _login_step2 raise MiCloudAccessDenied("Access denied. Did you set the correct api key and/or username?")

    Logging in to https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor works fine but it only gives me tokens. I need to log into the cli to set a key to access dev mode for home assistant.

    Please help, anyone! Thank you!

  13. alexissan commented on Jul 26, 2026

    @alexissan

    I hit this too and had a go at it — PR #2089.

    Short version: Xiaomi's captcha only affects the password flow. The QR code login is unaffected, so #2089 adds a small built-in backend for it rather than a new dependency:

    $ miiocli cloud --qr list --locale de
    Scan this QR code with the Xiaomi Home app: /tmp/miio-cloud-login-qr.png
    == Robot Vacuum (Device online) ==
    	Model: xiaomi.vacuum.b108gl
    	Token: ...

    @rytilahti, on your question about swapping libraries — I went the other way and implemented just the two methods CloudInterface actually used from micloud (login() and get_devices(country=...)), hitting the same /home/device_list endpoint so the records are identical and CloudDeviceInfo parses them unchanged. Verified against a live account rather than assumed. Password login is untouched and QR is opt-in, so nothing changes for anyone it still works for.

    No new install footprint: requests was already coming in via micloud, and RC4 is ~15 lines inline because cryptography moved ARC4 to hazmat.decrepit in 43.0 and there's no import path valid across all of cryptography>=35. That also means the micloud dependency could be dropped later without taking this path with it.

    For anyone blocked right now and not wanting to wait on review: @LarrysGIT and @BlueRoar are right that Xiaomi-cloud-tokens-extractor works today. The PR follows its signing scheme, credited in the module.

    Entirely understand if you'd rather shape it differently — happy to rework it, or for it to be closed if you'd prefer to fix micloud upstream instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions