-
-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting the token of Air Purifier Pro v7 #461
Comments
Yes, the token gets changed during provisioning, you have to extract it from the backups: https://python-miio.readthedocs.io/en/latest/discovery.html#tokens-from-backups |
Too bad. I've found this: Which suggests what I planned was doable but clearly it's not (or I'm doing something wrong). |
Just one more question. When I use "mirobo configure-wifi", why won't it show the changed token? |
Unfortunately the device does not report the token back, and there is no known way to request it afterwards either. This is all device dependent, so perhaps it does not reset the token on all devices (or maybe they "fixed" that, e.g., the yeelight bedside lamp did not reset the token until recent firmware upgrades). The configure-wifi is implemented mostly for completeness, maybe it should be documented somewhere that it is only usable for changing the used network after the device has been already provisioned. Feel free to create a PR for documentation if you like :-) |
I found this yesterday: https://www.home-assistant.io/components/vacuum.xiaomi_miio/#retrieving-the-access-token It appears they forgot to disable debug in 5.4.49 release because 5.4.50 (currently on Google Play) will not produce any logs. I downgraded to 5.4.49 and the logs were there, with the token inside :) Much, much easier than playing with backups. I will post a PR later today. |
This issue is solved and can be closed, right? |
Yes. |
Hey, Have been struggling with tokens myself, found this tool that extracts all token and device information form Xiaomi Cloud very easily without the need to dig up SQLLite DBs or encryption. Thought would share here as well |
Hi,
I've been trying to obtain the token of my air purifier. I want to avoid tricks with the Mi Home app and backups.
Here is what I did. I reset wi-fi on the air purifier, then I connected to its network and "mirobo discover --handshake 1". It displayed the token. I was even able to show status of the device. Then I configured it in the Mi Home app. And the token stopped working ("miio.exceptions.DeviceException: Got checksum error which indicates use of an invalid token. Please check your token!")...
So I reset wi-fi again and got the token (a different one this time, probably normal). Instead of adding the device in the Mi Home app, I ran "mirobo configure-wifi". The air purifier connected to my home network, but the token stopped working again.
I'm confused. Does the token change after pairing the device?
Thanks.
Take care,
Jarek
The text was updated successfully, but these errors were encountered: