Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save magohl/6448606aae6548472f880eed2cb786bd to your computer and use it in GitHub Desktop.
Save magohl/6448606aae6548472f880eed2cb786bd to your computer and use it in GitHub Desktop.
To control the Xiaomi S50 2nd gen vaccum cleaner from Athom Homey (or some custom API) you need the IP and the TOKEN that the mobile app uses to connect.
Getting the Token involves (as of 2018-12-27):
- Downgrade mobile app to version 5.0.19 using apkmirror.com (The newer version does not save the token in its database)
-- Select you normal region and normal acocunt
- Set phone in developer and debug mode. Connect it using USB Cable.
- Use ADB Backup (using the Android SDK) or the MiToolkit 1.6 to backup the Mi Home application. On a modern phone you will probably have to select a password.
-- If using adb directly and not MiToolkit this is the command:
-- adb backup -noapk com.xiaomi.smarthome -f backup.ab
- Decrypt the backup by downloading the tool "android-backup-extractor".
-- Run using java -jar android-backup-tookit\android-backup-extractor\android-backup-extractor-20180521-bin\abe.jar unpack backup.ab backup.tar password-chhosen-on-phone
- Unpack tar file
- Download DB rowser for SQL Lite
- Open database file \com.xiaomi.smarthome\db\miio2.db
- Get both IP and TOKEN in table devicerecord
- Now you can connect the robot vacuum to the Athome Homey Mi Home App or if you are developing something on your own
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment