You bought a Xiaomi, Dreame or Viomi robot vacuum cleaner, but there is no button to copy the token in the Mi Home app (or Xiaomi Home) or is the token hidden after a firmware update? This problem is familiar to many owners of smart vacuum cleaners, especially if you are trying to connect the device to Home Assistant, ioBroker or third-party applications like Valetudo. Without the token, integration with alternative control systems is impossible - and official applications often limit functionality.
In this article, we will discuss all current ways to obtain a token (including hidden ones), even if:
- π There is no "General" section or "Token" item in Mi Home"
- π± The app does not show the token after updating to the latest version
- π The device is linked to another Mi Account
- π οΈ You use custom firmware (for example, Valetudo) RE)
Importantly, the methods differ for different models and firmware versions. We tested the instructions on Xiaomi Mi Robot Vacuum-Mop 2 Pro, Dreame D9, Viomi V3 and other popular devices from 2020 to 2026. If your model is older, some methods may not work (see the compatibility table below).
1.Why the token is not in the Mi Home app: official restrictions
Since 2021, Xiaomi has been gradually removing the ability to view the token from the Mi Home interface.
- π Tightening security policies (token gives full control of the device)
- π Desire to restrict the use of third-party firmware (e.g. Valetudo)
- π Regional restrictions (in China, the token is always hidden, in Europe β sometimes available)
For example, in Mi Home version 6.5.400 and later, the token is hidden for most models, except for the old Xiaomi Mi Robot 1S or Viomi V2. At the same time, in Xiaomi Home (the new name of the application), the token can be displayed for some users and not for others β it depends on the region of the account and the firmware of the device.
β οΈ Warning: If you see a General section in the app, but there is no Token, don't rush to look for workarounds. First, check your account region: switch to China in your profile settings. Sometimes the token appears after you change region.
2. Method 1: Retrieval of the token through Mi Account (official method)
If your vacuum cleaner is tied to your Mi Account, the token can be retrieved through the Xiaomi Cloud web interface, which works for most models but requires access to the account to which the device is tied.
Instructions:
- Go to account.xiaomi.com and log in.
- Open i.mi.com (a smart home account).
- Find your robot vacuum cleaner in the list of devices and click on it.
- The browser address bar will have a bar of the view: https://i.mi.com/#/device/123456789 where 123456789 is Device ID (save it).
- Open this link (autonomy required) and search your device using Device ID, and the token field next to it is "your token".
If you see a token instead of a token, it means Xiaomi has blocked the token for your model, and then you can go to alternative methods.
π‘
If you get an error when you open a link api.home.mi.com, try using your browser in incognito mode or clear the cookies for the domain xiaomi.com.
Method 3: Receiving a token through ADB (for Android)
If you have an Android smartphone with root rights or ADB connectivity, the token can be extracted directly from the memory of the Mi Home app.This method works even for hidden tokens, but requires technical skills.
Step-by-step:
- Install Mi Home and log in to your account.
- Connect your smartphone to your PC and activate Debugging over USB (Settings β About Phone β Assembly Number β tap 7 times).
- Follow the command: adb shell pm list packages | grep "mihome" To find the exact packet identifier (usually com.xiaomi.smarthome).
- Download the application database: adb pull /data/data/com.xiaomi.smarthome/databases/mihome.db
- Open mihome.db file via SQLite Browser and find the device table, which will have a token column with the desired value.
β οΈ Note: On new versions of Android (12+) access /data/data/ It is blocked even from root. In this case, use backup through ADB: adb backup -f mihome.ab com.xiaomi.smarthome Then unpack the archive with abe (Android Backup Extractor).
Debugging is on. USB|Drivers installed ADB|Smartphone connected to PC|Installed by SQLite Browser|Mi Home data backup made-->
4. Method 3: Reading a token from the firmware of a robot vacuum cleaner
If you have access to the vacuum cleaner file system (e.g. via SSH or Telnet), the token can be found in configuration files, a method suitable for devices with open access to the shell (e.g., after Valetudo firmware).
Where to look for a token:
- π File. /mnt/data/miio/device.token (For most of the Xiaomi models)
- π File. /etc/miio/device.conf (for Dreame and Viomi)
- π Team withdrawal: cat /proc/device-tree/miio/token
To connect to the vacuum cleaner by SSH, use:
ssh root@[IP_ address vacuum cleanerThe default password for most models is empty or 1234. If access is blocked, you need to break through the exploit (see section 6).
How do you know? IP-vacuum-dress?
5. Method 4: Using third-party utilities (MiToken, Packet Capture)
If previous methods have failed, you can intercept the token when exchanging data between the vacuum cleaner and Xiaomi servers.
- π± Android smartphone with Mi Home installed
- π§ Application for Traffic Capture (Packet Capture, HTTP Toolkit)
- π PC with Wireshark or Fiddler (for analysis)
Algorithm of action:
- Install Packet Capture on Android and set up traffic interception for the Mi Home app.
- Run the gripper and perform any action with the vacuum cleaner (e.g., start cleaning).
- Stop the seizure and export the log in.pcap format.
- Open the file in Wireshark and search for queries to the domain api.io.mi.com or cn.api.io.mi.com.
- In the query body, look for the "token" parameter: "..."
For convenience, use the filter in Wireshark:
http.request.method == "POST" && http.host contains "mi.com"β οΈ Note: Xiaomi encrypts some traffic through the MIoT protocol. If the token is not visible in plain form, try decrypting using a script com.xiaomi_mihome_decrypt.
6. Method 5: Vacuum cleaner separation and Valetudo installation (for advanced)
If none of these methods work, then there's the firmware of alternative software, like Valetudo, which gives you full control of the device, including access to the token, but requires a bootloader to be broken and risks cancelling the warranty.
Supported models for Valetudo:
| Brand | Model | Valetudo support | It takes a break. |
|---|---|---|---|
| Xiaomi | Mi Robot Vacuum-Mop 2 Pro | β Yes. | β Yes. |
| Dreame | D9, D10 Plus | β Yes. | β No (used exploit) |
| Viomi | V3, SE | β Yes. | β Yes. |
| Roborock | S7, S7 MaxV | β Yes. | β Yes (via DustBuilder) |
For the Valetudo installation:
- Download the firmware from the official website.
- Connect to the vacuum cleaner via Telnet (use the exploit for your model).
- Run the installation script: wget -qO- https://install.valetudo.cloud | sh
- Once installed, the token will be available in the Valetudo web interface at the address http://[IP_vacuumer].
π‘
Valetudo firmware removes reliance on Xiaomiβs cloud, but may deprive you of official updates and support.
7. Method 6: Appealing for Xiaomi (official request)
If you need a token for legitimate purposes (e.g., smart home integration via Home Assistant), you can try asking for it from support.The odds are slim, but some users received the token after providing:
- π Proof of purchase (check, warranty card)
- π Serial number of the device (S/N vacuum-hole)
- π§ Letters explaining the reason (in English or Chinese)
Where to write:
- π© Official support: support@xiaomi.com (response 3β7 days)
- π¬ Chats in Mi Community: c.mi.com (responses from moderators)
- π± Xiaomi Global Twitter: @Xiaomi
β οΈ Note: In the letter, don't mention custom firmware or circumventing restrictions. Formulate the request as a problem with connecting to Home Assistant or Google Home. Example of text: Hello, I need the Mi Home token for my Xiaomi vacuum (S/N: XXX) to integrate it with Home Assistant via the official Mi Home integration. Could you please provide it? Best regards, [Your Name]
8. Method 7: Buying a token from third parties (risks and cautions)
Forums and marketplaces like AliExpress, eBay sell βtokens for Xiaomi,β which is a fraud 99 percent of the time, with sellers either giving away fake tokens or using stolen account data.
- π« The token will stop working in a few days (Xiaomi will block it)
- π Your account may be hacked (if the seller received the token through your data)
- πΈ Loss of money (average price of a token is 5-20)$, But it won't work)
The only legitimate way to get a token from third parties is to rent a cloud account with a vacuum cleaner tied up (for example, through services like Bond Home), but this is a temporary solution and does not give full control over the device.
π‘
Never buy tokens from unknown sellers. Xiaomi can revoke access to the device at any time, and your account can be blocked for suspicious activity.