argrento/huami-token

Xiaomi doesn't return any linked wearables

SpinahVieh opened this issue · 9 comments

When using the script to get the token with $ python huami_token.py -m xiaomi -e mail@gmail.com -p password123 --bt_keys, I receive an empty list of linked wearables.

Paste URL after redirection here.
https://hm.xiaomi.com/watch.do?code=ALSG_CLOUDSRV_123BBAEDABDOE
Token: ['ALSG_CLOUDSRV_123BBAEDABDOE']
Logging in...
Logged in! User id: 123456789
Getting linked wearables...
+-------------------------------------------------------------------------------+
| ID  | ACT |        MAC        |                   auth_key                    |
|-----+-----+-------------------+-----------------------------------------------|
+-------------------------------------------------------------------------------+

Obviously I have linked the Mi Band 6 to the Mi Fit app and followed the steps in #32 to get it to work in the first place.

Okay so after hours of research, it turns out that they changed the authentification method.
While I don't have a solution for this, I was at least able to extract the token to get gadget bridge to work by doing the following:

  1. Install Notify for Mi Band
  2. Download Firmware 1.0.3.22 and install it with an "update" with Notify for Mi Band in it's settings.
  3. Install the modded Mi Fit 5.0.1 app from freemyband and pair the band with the app.
  4. Take AuthKey from the file created by freemyband.

I'm only typing this up in case it helps anyone else with the same issue.

Hello! Can't confirm that.
Authentication from the Gadgetbridge issue 2360 is a authentication between Mi Band and app, not between app and a server. I just checked: for my Xiaomi account, script returns all auth keys for all devices.

If you use xiaomi login method, you do not need to specify e-mail and password (with keys -e and -p), because e-mail and pass will be prompted at the login page in your browser. Probably you have multiple accounts. Ensure that the user id in the Mi Fit app is equal to the user id printed by the script (Logged in! User id: ...).

Thanks for taking your time to look into this - especially since it's my incompetence to use it made you take the time. I'll close the issue then if the script still works as intended.
I'm sure I used the same account tho.
It's "solved" for me now through this alternative process.

I'd like to clarify,

  1. You have paired your Mi Band 6 with your Mi account and see this device in Mi Fit app.
  2. The user id in the script output and Mi Band is the same.
  3. You have a single device paired to your Mi account.
  1. Yes
  2. Interestingly no! Thanks for asking, I did not check that.
    It is interesting because I literally just reinstalled the app and logged in with the same credentials on both devices. So I guess that's why I don't receive any result, but since I use the same credentials, I have no idea what to do about it.
  3. Yes.

IMHO you can close this issue since it's apparently my fault for having two accounts.
Sorry for taking your time like this.

Thanks for your answers!

I'm having the same issue. The script shows a different user id even though I'm using the same account.

Also, I can't see any devices in the 'Manage Devices' section on the Mi Account website, even though it's paired in the app.

I too see no linked devices. Repro steps:

  1. Create MI Account
  2. Login to Mi Fitness
  3. See an 'Account Not Registered' error while running the script.
  4. Link MI account through Zepp app.
  5. Successfully run script, see no 'linked wearables'

I was using the MiFitness App. Switching to the MiFit App seemed to register the device properly (although I think the app was renamed).