Where to get a token robot vacuum cleaner Xiaomi, if it is not in the Mi Home app: 7 proven ways

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.

πŸ“Š What firmware does your robot vacuum cleaner use?
Official Xiaomi
Castomium (Valetudo, etc.)
I don't know.
other

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:

  1. Go to account.xiaomi.com and log in.
  2. Open i.mi.com (a smart home account).
  3. Find your robot vacuum cleaner in the list of devices and click on it.
  4. The browser address bar will have a bar of the view: https://i.mi.com/#/device/123456789 where 123456789 is Device ID (save it).
  5. 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:

  1. Install Mi Home and log in to your account.
  2. Connect your smartphone to your PC and activate Debugging over USB (Settings β†’ About Phone β†’ Assembly Number – tap 7 times).
  3. Follow the command: adb shell pm list packages | grep "mihome" To find the exact packet identifier (usually com.xiaomi.smarthome).
  4. Download the application database: adb pull /data/data/com.xiaomi.smarthome/databases/mihome.db
  5. 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 cleaner

The 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?
If the vacuum cleaner is connected to the same network as your PC, use a network scanner (such as Advanced IP Scanner or Fing).Look for a device called roborock.vacuum. or dreame.vacuum. Alternatively, check the list of connected devices in the router.

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:

  1. Install Packet Capture on Android and set up traffic interception for the Mi Home app.
  2. Run the gripper and perform any action with the vacuum cleaner (e.g., start cleaning).
  3. Stop the seizure and export the log in.pcap format.
  4. Open the file in Wireshark and search for queries to the domain api.io.mi.com or cn.api.io.mi.com.
  5. 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:

BrandModelValetudo supportIt takes a break.
XiaomiMi Robot Vacuum-Mop 2 Proβœ… Yes.βœ… Yes.
DreameD9, D10 Plusβœ… Yes.❌ No (used exploit)
ViomiV3, SEβœ… Yes.βœ… Yes.
RoborockS7, S7 MaxVβœ… Yes.βœ… Yes (via DustBuilder)

For the Valetudo installation:

  1. Download the firmware from the official website.
  2. Connect to the vacuum cleaner via Telnet (use the exploit for your model).
  3. Run the installation script: wget -qO- https://install.valetudo.cloud | sh
  4. 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.

FAQ: Frequent questions about Xiaomi robot vacuum cleaner tokens

❓ My vacuum cleaner is connected to Mi Home, but there's no token in the app or in the web interface?
First, check your account region (switch to China in the Mi Home settings). If it doesn't work, use the ADB method (section 3) or traffic interception (section 5). For models from 2023 to 2026, you may need to switch.
❓ Can I get a token without root rights on my phone?
Yes, but the options are limited. Try: Extract through Mi Account (section 2); Seizure traffic with Packet Capture (section 5); Appeal for support (section 7); Methods with ADB and firmware reading require root or breakup.
❓ I installed Valetudo, but I still can't see the token?
Possible causes: πŸ”Œ The vacuum cleaner is not connected to Wi-Fi (check the network). πŸ”„ The firmware is not fully installed (reboot the device). πŸ› οΈ The model is not supported (see table in section) 6). Run the command in the vacuum cleaner console: cat /mnt/data/miio/device.token If the file is empty, the token is not generated. Try reflashing Valetudo.
❓ Will the token work after dumping the vacuum cleaner to the factory settings?
No, the token is tied to the current firmware and account: πŸ”„ The device will receive a new token. πŸ”’ The old token will stop working. πŸ“± You'll have to re-attach the vacuum cleaner to your account. If you're planning a reset, save the token first or set up a backup in Valetudo.
❓ Can I use one token for several vacuum cleaners?
No, the token is unique to each device. It's generated based on: πŸ†” Device ID (unique vacuum cleaner identifier). πŸ” Mi Account ID (tied-in). πŸ“‘ Firmware versions. If you have multiple vacuum cleaners, each needs a token.