Awesome Open Source
Awesome Open Source

Xiaomi Cloud Tokens Extractor

buymeacoffee_badge paypalme_badge

This tool/script retrieves tokens for all devices connected to Xiaomi cloud and encryption keys for BLE devices.

You will need to provide Xiaomi Home credentials (not ones from Roborock app):

  • 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.


Download and run token_extractor.exe.

Linux & Home Assistant (in SSH & Web Terminal)

Execute following command:

bash <(curl -L


Execute following command:

bash <(curl -L

Manual run in python

Download and unpack archive:

cd token_extractor

Install dependencies and run script:

pip3 install -r requirements.txt

Home Assistant additional tools

Buy Me A Coffee

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (55,320
xiaomi (81