Why is Xiaomiβs vacuum cleaner token so important to iOS users?
If you own a Xiaomi robot vacuum cleaner (or brands Dreame, Viomi, Mijia) and use an iPhone or iPad, sooner or later you may need a device token β a unique digital key that allows access to advanced features. Without it, you can not connect the vacuum cleaner to third-party smart home systems (Home Assistant, Node-RED), create automation through Shortcuts or even restore control after resetting.
The problem is that Mi Home (the official Xiaomi app) on iOS does not explicitly provide the token β unlike the Android version, where it can be extracted from logs β creates a barrier for advanced users who want to go beyond the standard features. In this article, we will discuss all the current ways to get a token on iOS in 2026, including workarounds, risks and solutions to typical errors.
We warn you right away that some methods require technical training or temporary access to an Android device, but donβt worry, weβll explain each step in detail, even if youβre a beginner.
Method 1: Official method via Mi Home (limited functionality)
To start with, the simplest, but also the most limited, option: the official Mi Home app for iOS doesnβt show the token directly, but in some cases it can be requested through Xiaomi support, which is only suitable for devices linked to your Mi Account.
Here's how it works:
- π± Open the Mi Home app and go to your vacuum cleaner profile (click on its icon on the home screen).
- βοΈ Select Settings β About the device β Send feedback.
- π¬ In the message box, write, "Please provide a token for the device [vacuum model] to integrate with third-party systems." Specify the serial number (you can find it on the case or in the settings).
- β³ Expect a response from support (usually 1-3 days) The token will arrive by email linked to the account.
β οΈ Note: Xiaomi does not always meet such requests. If the device is purchased not in an official store or is tied to another region (for example, Chinese firmware), the provision of the token may be refused.
This is the safest method, but it's also the most unreliable, and if support ignores your request or refuses, then you can go to alternative methods.
Method 2: Using an Android emulator on a Mac (for power users)
If you have a Mac (or Windows with an emulator installed), you can temporarily run Mi Home for Android and extract the token through logs, which takes more effort, but gives 100% results.
You'll need:
- π» Mac with BlueStacks or Genymotion installed.
- π± APK-Mi Home file (download from APKPure).
- π§ Log viewing software (Logcat is part of Android Studio).
Step-by-step:
- Install and run the Android emulator.
- Download Mi Home and log in to your account.
- Connect the vacuum cleaner to the emulator (use the same Wi-Fi network as you would on your iPhone).
- Open Logcat and start the filter for the keyword token.
- Reboot the vacuum cleaner through the application - a string with a token will appear in the logs.
Install BlueStacks or Genymotion | Download APK Mi Home (version no older than 2026) | Connect the vacuum cleaner to the same Wi-Fi network | Run Logcat with a filter on "token" | Reboot the vacuum cleaner through the application-->
The token will look like a set of 32 characters, for example: a1b2c3d4e5f6...1234567890abcdef. Copy it and save it in a safe place.
β οΈ Warning: Do not use emulators on suspicious sites, only official versions of BlueStacks or Genymotion. Otherwise, you risk getting a virus that will steal your Xiaomi account details.
Method 3: Temporary connection to Android device (most reliable)
If you have access to an Android smartphone (even for an hour), itβs the easiest solution. You donβt need emulators or complex manipulations β just an official app and a couple of clicks.
Algorithm of action:
- Install Mi Home on your Android device and log in.
- Connect the vacuum cleaner to the app (it should be on the same Wi-Fi network).
- Open the MiHome2MQTT app (or similar, such as Packet Capture).
- Run traffic capture and find a token request (usually in URLs or headers).
The token will be displayed in the format:
https://api.io.mi.com/app/...&token=VASH TOKEN HERE&...This method works for all Xiaomi models, including the Mi Robot Vacuum-Mop 2 Pro, Dreame D10 Plus and Viomi V3.
π‘
If you donβt have your own Android device, ask a friend or use the services of smartphone rental services (for example, Rent-a-Phone). 30 minutes of work will cost 100-200 rubles, but save hours of time.
Method 4: Retrieving a token through Home Assistant (for advanced)
If your vacuum cleaner is already connected to Home Assistant, you can try to extract the token through Xiaomi Miio integration, which is only suitable for those who have already set up a smart home system.
Instructions:
- Open the configuration file configuration.yaml in Home Assistant.
- Find the Xiaomi Miio integration section (usually this): vacuum: - platform: xiaomi_miio host: 192.168.1.100 token:!secret xiaomi_vacuum_token
- If the token is stored in secrets.yaml, open this file and find the line with xiaomi_vacuum_token.
If the token is encrypted or missing, try reconnecting the device via the Home Assistant web interface:
- π Go to Settings. β Devices and services.
- π Click Add Integration and select Xiaomi Miio.
- π During the setup process, the system can show the token (or request its input β then use other methods).
β οΈ Note: Do not store the token in plaintext in configuration files if your Home Assistant is accessed from the internet.Use!secret or environment variables.
Method 5: Alternative iOS Apps (with Risks)
There are several apps in the App Store that promise to show the Xiaomi device token directly to the iPhone, including Mi Token Extractor, IoT Token Finder, and Mi Home Token, but they have serious drawbacks:
| Annex | Principle of work | Risks. | Efficiency |
|---|---|---|---|
| Mi Token Extractor | Scanning Mi Home traffic | Demands. VPN-connection, can intercept personal data | 50% (often not working with newer versions of Mi Home) |
| IoT Token Finder | Uses vulnerabilities in the Miio protocol | Can I block Xiaomi account? | 30% (depending on the model of the vacuum cleaner) |
| Mi Home Token | Parsite cache of the app | Prisonbreak or third-party certificates required | 70% (only works on older iOS) |
We do not recommend these applications for two reasons:
- Security: Most of them require access to your traffic or Xiaomi account, which can lead to data leakage.
- Reliability: Xiaomi regularly updates its security protocols, and the apps quickly stop working.
If you decide to try it, you should definitely:
- π Create a backup of Mi Home data.
- π« Disable two-factor authorization for the duration of the application.
- π± Use a test device (not the main iPhone).
What happens if you use unofficial applications?
Problem Solving: What to Do If the Token Doesn't Work?
You received a token, but the vacuum cleaner doesn't connect to Home Assistant or another service? Here are the typical reasons and ways to fix them:
| Problem. | Possible cause | Decision |
|---|---|---|
| The token is rejected (Invalid token) | The device is linked to another account | Reset the vacuum cleaner to factory settings and tie it to your Mi Account |
| Connection Error (Connection Rejected) | Vacuum and server in different networks | Set up a static IP for a vacuum cleaner in the router |
| The token works, but not all functions are available | Restrictions of Chinese firmware | Update to the global version via Mi Home |
If nothing helps, check:
- π Relevance of the token: it can change after updating the vacuum cleaner firmware.
- π Device region: Chinese models require token with cn suffix.
- β‘ Protocol version: New vacuum cleaners (2023-2026) may use Miio 2.0, which is not compatible with older integrations.
For diagnosis, use the command in the terminal (if you have access to the computer):
miio --ip 192.168.1.100 --token your Token infoIf the command returns the device information (model, charge, status), the token is operational. If not, repeat the process of obtaining it.
π‘
Xiaomi token is valid indefinitely, but can reset after updating the vacuum cleaner firmware or changing the region in Mi Home.Always check its relevance before setting up new automations.