This is forked gist from Alienmario with some additions for newer version of MI Home app (8.7.708) and Android 10 (Rooted)
- Create a manual scene in Mi Home for the device you'd like to control
In my version of Mi Home the manual scene is called Batch Control.
- Use Http Toolkit to figure out the scene id.
- Install the app on PC and Android, follow the instructions - install CA certificate and connect
MI Home app did not trust automatically installed user certificate so I had to add system-wide certificate. To do so, you have to be rooted. Connect your phone to PC and open cmd. Run
adb shell
and thensu -c whoami
. Grant root access to shell from your phone. Run the same commands again, it should outputroot
now. It means adb sees that you are rooted. >Open Http Toolkit on your PC and select "Android device via ADB" (it should be available now). System certificate is installed automatically at this point. On your phone Http Toolkit app
- Install the app on PC and Android, follow the instructions - install CA certificate and connect