How do you know? IP-Address and token of the robot vacuum cleaner Xiaomi: all ways

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!).

  1. Open Mi Home and go to your robot vacuum cleaner page.
  2. Slip on the three dots in the upper right corner β†’ Settings β†’ General settings.
  3. 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:

  1. In Mi Home, go to Profile β†’ Settings β†’ Smart Home β†’ Devices.
  2. Select your vacuum cleaner and click on Device Information.
  3. 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.
πŸ“Š What model is your robot vacuum cleaner Xiaomi?
Mi Robot Vacuum-Mop 2
Viomi V3
Dreame D9
Mi Robot Vacuum X10+
other

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:

  1. Open the router’s web interface by entering its IP in the browser (usually 192.168.0.1 or 192.168.1.1).
  2. Log in (login and password specified on the sticker of the router).
  3. Find Connected Devices, Local Area Network, or DHCP Clients List.
  4. In the list, find a device with a name that contains roborock, miio, or viomi.

Examples of device names in the router:

Model vacuum cleanerName on the router
Xiaomi Mi Robot Vacuum-Mop 2roborock.vacuum.m1s or miio12345678
Viomi V3viomi.vacuum.v7 or lumi.12345678
Dreame D9dreame.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

Done: 0 / 4

Step-by-step:

  1. Install a program to intercept traffic on your PC (for example, Charles Proxy or Fiddler).
  2. Set up a proxy on your phone (in the Wi-Fi settings, specify the PC IP and port 8888).
  3. Start Mi Home and wait for the vacuum cleaner data to load.
  4. In Charles, search for a domain api.io.mi.com or miot-spec.org.
  5. 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?
The token is a unique device API access key, and its disclosure allows you to bypass cloud restrictions and send commands directly, which is contrary to Xiaomi’s business model (they are interested in exploiting their ecosystem), and it can be used to unauthorizedly control the device if an attacker gains access to your local network.

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:

  1. Install Home Assistant (for example, on Raspberry Pi or Docker).
  2. 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.)

  1. Restart Home Assistant and wait for devices to appear in the Integration section.
  2. 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:

  1. Connect to the vacuum cleaner via ADB:
adb shell
  1. Find a file with a token (usually in the /data/miio/device.token or /mnt/default/miio/miio_token.conf).
  2. Copy it on a PC:
adb pull /data/miio/device.token C:\token.txt

On new models, the path to the token may be different. Use the command to find it:

adb shell find / -name "token" 2>/dev/null

This 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 causeDecision
IP is not displayed in Mi HomeThe vacuum cleaner is connected via Bluetooth or mobile InternetConnect it to Wi-Fi and restart it.
The token consists of one zero (0000...)The device uses the new MiOT protocolGet a token through Home Assistant (see Method 4)
Home Assistant can't find the vacuum cleanerDisparity of the region of the accountCheck the country parameter in configuration
After the flashing token changedThe firmware update dropped the keysRepeat 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.

FAQ: Frequent questions

Can I use one token for several vacuum cleaners?
No, the token is unique to each device, and even two identical vacuum cleaners of the same model will have different tokens.
What to do if the IP of the vacuum cleaner is constantly changing?
Set up static on the router IP for MAC-address of the vacuum cleaner or use reservation DHCP. The instructions depend on the router model, but this is usually done in the section. DHCP Reservation or Static Lease.
How to check if the token works?
Send a test request via curl or Postman: curl -X POST http://[IP_vacuumer]/miIO.info -d '{"id":1}' -H "Content-Type: application/json" If the token is correct, you will receive a response with information about the device. If not, an error {"error": "invalid token"}.
Can I drop the token and get a new one?
Yes, but to do that, you need to flush the vacuum cleaner to the factory settings (in Mi Home β†’ Settings β†’ Reset), and then you have to reconnect the device to Wi-Fi and extract the token.
Is it safe to store a token in the cloud (like Google Sheets)?
No. The token gives you full control of the vacuum cleaner. If your Google account is hacked, an attacker can control the device. Store the token only in local encrypted files (for example, in KeePass or Bitwarden).