Contents
What are Xiaomi device tokens and why you need them?
When you want to add xiaomi/miio devices into Domoticz, Home Assistant or Homey. You need to obtain the device token of those products. There were several methods to obtain your tokens. But most of the methods were complicated or not working anymore.
That’s changed! All the keys are in your Xiaomi Mi Home account are stored encrypted in the cloud. with the token extractor you can retrieve them easy, without installing, rooting, hacking or whatever.. just login and get your keys!
How the Xiaomi token extractor works
The extractor tool is an script that retrieves tokens for all devices connected to your Xiaomi cloud account and encryption keys for BLE devices.
- Download the Xiaomi Miio token extractor
- Start the tool
The only thing you will need to provide Xiaomi Home credentials (not ones from Roborock app yet):
- username (e-mail or Xiaomi Cloud account ID)
- password
- Xiaomi’s server region (cn – China, de – Germany etc.). Leave empty to check all available
In return all of your devices connected to account will be listed, together with their name and IP address.

I used the Xiaomi token extractor for this Xiaomi products
Xiaomi Mijia Smart Multi-Mode Gateway 3 (ZNDMWG03LM) Zigbee 3 and BLE review
https://gadget-freakz.com/product/xiaomi-air-purifier-3h/
Xiaomi Mijia MJCTD01YL Yeelight Bedside Lamp Bluetooth
https://gadget-freakz.com/product/xiaomi-vacuum/
https://gadget-freakz.com/adding-xiaomi-mii-robot-vacuum-into-domoticz/