Xiaomi Cloud Tokens Extractor is a utility that retrieves authentication tokens for devices connected to Xiaomi cloud accounts and encryption keys for Bluetooth Low Energy devices.
The tool solves the problem of obtaining device tokens needed to control Xiaomi devices programmatically. It works by authenticating to the Xiaomi cloud service using either username and password credentials or QR code authentication, then querying the cloud for all registered devices. After authentication, users select a Xiaomi server region to query, and the tool returns a list of all connected devices along with their names, IP addresses, and the necessary tokens for local control.
The tool is designed for users who need to integrate Xiaomi devices into home automation systems or other applications requiring direct device communication. It suits anyone with a Xiaomi cloud account who wants to extract tokens without manual configuration. The tool provides multiple deployment options: a standalone Windows executable, command-line execution on Linux and Home Assistant, Docker containerization, or manual Python execution. The README notes that users should provide credentials from their Xiaomi Cloud account rather than from device-specific apps like Roborock, and documents several troubleshooting steps including disabling network ad blockers, checking spam folders for two-factor authentication emails, and being aware of rate limits on authentication requests.
The project maintains active troubleshooting documentation addressing common authentication issues and regional server selection. The tool supports multiple authentication methods and deployment environments, indicating ongoing attention to accessibility across different user setups. The README includes references to complementary tools for Xiaomi vacuum integration with Home Assistant, suggesting the project exists within a broader ecosystem of related utilities.