Xiaomiβs robot vacuum cleaners have long been an integral part of the smart home ecosystem, but their full integration with third-party systems (such as Home Assistant, Node-RED or ioBroker) requires two key parameters: localization. IP-The address of the device and the unique token, without which you can't send direct commands through the device. API, Set up automation on schedule or bypass cloud limitations.
The problem is that Xiaomi doesnβt provide this information in an explicit way β it has to be extracted by workarounds. In this article, weβll look at all the current methods for obtaining IP and token for Mi Robot Vacuum, Viomi, Dreame and other vacuum cleaners on Xiaomiβs platform, including methods through a mobile application, router, terminal, and even physical access to the device.
Why do you need an IP and a robot vacuum cleaner token?
Most users are limited to basic control via the Mi Home, but that's not all the features of the device. IP token:
- π Local Management without Cloud: Sending commands directly over the local network (without delays and dependency on Xiaomi servers).
- π€ Integration with Home Assistant: Creating complex automations (for example, starting a cleaning service when leaving home or using data from dust sensors).
- π Advanced telemetry: access to hidden parameters (wear of brushes, history of cleaning, high-resolution maps of rooms).
- π§ Bypassing regional restrictions: Some features (such as zoning) may be blocked for your region in the Mi Home.
Without a token, you canβt log in to the vacuum cleaner API, and without an IP, you canβt find the device on the local network, and Xiaomi regularly tightens protection: if previously the token could be removed from the application package, now new models require alternative methods.
β οΈ Note: Removing the token violates Xiaomiβs user agreement, which may result in account locking or device functionality being restricted.
Method 1: Obtaining IP-Addresses via the Mi Home app
The easiest way to find an IP is to use the official Mi Home app, but it only works if the vacuum cleaner is connected to your Wi-Fi network (not via Bluetooth!).
- Open Mi Home and go to your robot vacuum cleaner page.
- Slip on the three dots in the upper right corner β Settings β General settings.
- Scroll down to the Network block β here will be the local IP-address (e.g. 192.168.1.105).
If there is no network, try an alternative route:
- In Mi Home, go to Profile β Settings β Smart Home β Devices.
- Select your vacuum cleaner and click on Device Information.
- In some versions of the application, IP is displayed in the Network Information section.
If the IP is not displayed, check:
- π Is the vacuum cleaner connected to Wi-Fi (not to mobile Internet via phone).
- π± Is the Mi Home app updated to the latest version.
- π Account Region: in some countries (e.g. China) IP may be hiding.
Method 2: Search for IP via router
If Mi Home doesn't show IP, you can find it in your router's connected device list, and it's universal and works for all network gadgets, and it depends on the router model, but the general algorithm is this:
- Open the routerβs web interface by entering its IP in the browser (usually 192.168.0.1 or 192.168.1.1).
- Log in (login and password specified on the sticker of the router).
- Find Connected Devices, Local Area Network, or DHCP Clients List.
- In the list, find a device with a name that contains roborock, miio, or viomi.
Examples of device names in the router:
| Model vacuum cleaner | Name on the router |
|---|---|
| Xiaomi Mi Robot Vacuum-Mop 2 | roborock.vacuum.m1s or miio12345678 |
| Viomi V3 | viomi.vacuum.v7 or lumi.12345678 |
| Dreame D9 | dreame.vacuum.p2008 or rockrobo.vacuum.v1 |
| Mi Robot Vacuum X10+ | roborock.vacuum.a15 or miot-12345678 |
If the router has many devices, disconnect the vacuum cleaner from the network for 1-2 minutes, then update the list of connected gadgets - the disappeared and newly appeared IP will belong to the robot.
β οΈ Note: Some routers (especially from providers) hide the list of devices, in which case use third-party applications to scan the network, such as Fing (Android/iOS) or advancedd IP Scanner (Windows).
Method 3: Retrieving a token through Mi Home (old models)
For vacuum cleaners released before 2022, the token could be obtained by intercepting the network traffic of the Mi Home application, which currently works only for outdated firmware, but we will give it for completeness.
βοΈ Preparation for the extraction of the token
Step-by-step:
- Install a program to intercept traffic on your PC (for example, Charles Proxy or Fiddler).
- Set up a proxy on your phone (in the Wi-Fi settings, specify the PC IP and port 8888).
- Start Mi Home and wait for the vacuum cleaner data to load.
- In Charles, search for a domain api.io.mi.com or miot-spec.org.
- The body of the request or response will have the line βtokenβ: βyour tokenβ (usually 32 characters).
Example of a response fragment with a token:
{
"result": {
"token": "5a4d8e1f2c3b6a7d8e9f0a1b2c3d4e5f",
"did": "miio12345678",
"localip": "192.168.1.105"
}
}For new models (Mi Robot Vacuum-Mop 2 Pro, X10+, etc.), this method does not work β Xiaomi encrypts the token.
Why is Xiaomi hiding the token?
Method 4: Receiving a token through Home Assistant (MiOT)
For modern vacuum cleaners (2023-2026), the only reliable way to get a token is to use Mi Home Homeβs integration with MiOT, a method that doesnβt require traffic interception and works even for devices with the latest firmware.
Instructions:
- Install Home Assistant (for example, on Raspberry Pi or Docker).
- In the configuration.yaml file, add:
miot:
username: your email@mi.com
password: your password
country: cn # or your region (e.g., us, de, etc.)- Restart Home Assistant and wait for devices to appear in the Integration section.
- Find your vacuum cleaner and copy the token from its properties (field) miot_token).
If the integration does not find the device:
- π Check the region of your Mi Home account (should match the country in configuration).
- π Enable the option to Allow access to the device from the local network (in the vacuum cleaner settings) in Mi Home).
- π‘ Make sure that the Home Assistant and vacuum cleaner are connected to the same network.
β οΈ Note: When using Home Assistant in the cloud (for example, via Nabu Casa), the token can be transferred to external servers.
Method 5: Physical token extraction (for advanced)
If the software methods do not work, the token can be extracted directly from the vacuum cleaner memory by connecting to it via ADB or SSH. This method is suitable only for advanced users and requires:
- π§ Disassembled vacuum cleaner (access to motherboard).
- π₯οΈ Computers with installed ADB and drivers.
- π USB-Type-C cable (to connect to the board).
Instructions:
- Connect to the vacuum cleaner via ADB:
adb shell- Find a file with a token (usually in the /data/miio/device.token or /mnt/default/miio/miio_token.conf).
- Copy it on a PC:
adb pull /data/miio/device.token C:\token.txtOn new models, the path to the token may be different. Use the command to find it:
adb shell find / -name "token" 2>/dev/nullThis method is risky: wrong actions can lead to loss of warranty or damage to the firmware. Use it only if other methods have not worked.
π‘
If you are not sure about your ADB skills, contact the Home Assistant community at community.home-assistant.io β they often post topical tokens for popular models.
Challenges and solutions
When extracting IP and token, users often encounter typical errors, and we have collected the most common ones and ways to solve them:
| Problem. | Possible cause | Decision |
|---|---|---|
| IP is not displayed in Mi Home | The vacuum cleaner is connected via Bluetooth or mobile Internet | Connect it to Wi-Fi and restart it. |
| The token consists of one zero (0000...) | The device uses the new MiOT protocol | Get a token through Home Assistant (see Method 4) |
| Home Assistant can't find the vacuum cleaner | Disparity of the region of the account | Check the country parameter in configuration |
| After the flashing token changed | The firmware update dropped the keys | Repeat the procedure for obtaining a token |
If none of the methods worked, check:
- π The version of the vacuum cleaner firmware (in Mi Home) β Settings β New firmware can block old ways.
- π Server Region: Some features are only available for Chinese accounts (country: cn).
- π‘οΈ Router firewall: it can block local requests to the vacuum cleaner.
π‘
For models from 2023 to 2026 (e.g., Xiaomi Mi Robot Vacuum-Mop 2 Pro), the only reliable way to get a token is to integrate with MiOT via Home Assistant. Old methods (traffic interception, ADB) do not work for them.