aholstenson / miio

Control Mi Home devices, such as Mi Robot Vacuums, Mi Air Purifiers, Mi Smart Home Gateway (Aqara) and more
MIT License
1.86k stars 354 forks source link

Roborock Vacuum V1 tokens #274

Open krejkrejkrej opened 4 years ago

krejkrejkrej commented 4 years ago

After a lot of struggling to fetch the token from my Roborock V1 vacuum, I concluded that in newer (2018-ish?) firmwares, Xiaomi has made it more difficult to acquire the token from it.

When the vacuum is reset, a new token is generated. This token is what miio discover reports when run against an uninitialized vacuum and connected to the hotspot network from the vacuum. However, after you connect the vacuum to your xiaomi account and the app, the token is re-generated again, and in all further communication the token is not disclosed.

This makes it impossible to use the network-sniffing methods, such as the miio command line tool, to pick up the newly generated token. Use the the methods where you read the token from a backup of the Mi Home app.

I suggest that this information is included in relevant documents here, to help other users.

fnowacki commented 4 years ago

The same problem with ZHIMI.HUMIDIFIER.CB1

Loic691 commented 4 years ago

My CA1 humidifier made an auto update to firmware 1.6.7.1032 and the python-miio lib stop working... Error 5001.. Is the support for these miio lib device stoped by xiaomi? I read that xiaomi change lib to miot cloud only...? Is this exact?

ventsislav-georgiev commented 3 years ago

@krejkrejkrej This works: https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor It extracts the tokens from the cloud account.

Pittini commented 3 years ago

@krejkrejkrej This works: https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor It extracts the tokens from the cloud account.

You see, the post is over an year old? Anyway, also working is this: https://github.com/maxinminax/node-mihome