How to find out IP-Xiaomi vacuum cleaner address and token: all ways of 2026

Xiaomi’s robot vacuum cleaners have become an integral part of smart homes, but integrating them fully with automation systems (like Home Assistant or Node-RED) often requires two key parameters: IP-The address of the device on the local network and the authentication token. Without them, you can not control the vacuum cleaner through the API, Configure complex scenarios or use alternative firmware.

In this article, we will look at all the current ways to get this data, from standard methods through the official Mi Home application to advanced techniques using Python scripts and analyzing network traffic. Particular attention will be paid to the Xiaomi Mi Robot Vacuum, Viomi V3 and Dreame D9 models, because the algorithms for them may differ. If you encounter errors like Invalid token or vacuum cleaner does not appear on the local network, here you will find solutions.

Why do we need to IP-address and token of Xiaomi vacuum cleaner

IP-The address and token are the passport of your robot vacuum cleaner on the local network:

  • πŸ”Œ It is impossible to connect to third-party smart home systems (for example, Home Assistant or OpenHab).
  • πŸ“± Alternative apps like Valetudo or DreameBot that offer advanced features don’t work.
  • πŸ”§ Closed access to API Automating cleaning on schedule or by triggers (for example, when opening a door).
  • βš™οΈ It is impossible to update the firmware manually or install custom (for example, Valetudo). RE).

The official Mi Home app hides this data as Xiaomi seeks to centralize management through its servers, but enthusiasts have found workarounds, which we will explore below.

πŸ“Š What Smart Home System Are You Using?
Home Assistant
Google Home
Apple HomeKit
Yandex Alice
Another.
I don't use it.

Method 1: Obtaining IP-router

The easiest way to find IP-The vacuum cleaner address is to see the list of connected devices in the admin panel of your router:

  1. Connect the vacuum cleaner to the charging station and turn it on.
  2. Make sure the robot is connected to the same Wi-Fi network as your computer/smartphone.
  3. Open the router's admin panel (usually at 192.168.0.1 or 192.168.1.1).
  4. Find Connected Devices (or DHCP Clients)
  5. In the list, look for a device called roborock.vacuum., miio: or viomi.vacuum.*.

If the name of the device is not obvious, you can:

  • πŸ” Disconnect the vacuum cleaner from the network and see which device disappears from the list.
  • πŸ“‘ Use applications to scan the network, such as Fing (Android/iOS) or advancedd IP Scanner (Windows).

πŸ’‘

If the vacuum cleaner is not displayed in the list of devices, check if the router is not enabled client isolation mode (AP Isolation), which blocks the interaction of devices on the local network.

IP-The address can be dynamic (changes with each connection) or static. IP behind the vacuum cleaner in the router settings (option) DHCP Reservation or Static Lease).

Method 2: Retrieval of the token through Mi Home (official method)

Until 2021, the token was easily retrieved through the Mi Home app, but after the updates, Xiaomi tightened its protection, but for some regions (such as China Mainland) and older versions of the app, the method still works.

Instructions for Android:

Open Mi Home and go to vacuum settings |Tap three dots in the top right |Select About or Device Information |Look for Token (may be called API Token or Local Token) |Copy the value (usually 32 characters)

-->

If the string with the token is missing:

  • πŸ“± Try changing the region in Mi Home to China Mainland (in your account settings).
  • ⏳ Install an older version of the app (e.g. 5.6.52 or 6.1.102).
  • πŸ”„ Reconnect the vacuum cleaner to the application (sometimes the token appears after re-authorization).

⚠️ Warning: Changing the region in Mi Home can cause vacuum cleaner settings to reset.Before doing so, export cleaning maps and save important settings.

Why is Xiaomi hiding the token?
Xiaomi restricts access to the token so that users cannot bypass the company’s cloud servers. This is due to: 1. Control of the ecosystem – Xiaomi wants all devices to be managed through its applications. 2. Security – an open token allows attackers to access a device if it is connected to an unsecured network. 3. Monopoly on data – cloud management allows Xiaomi to collect usage statistics (for example, cleaning area, frequency of inclusions).

Method 3: Using a Python script to extract a token

If the official methods didn’t work, you can extract the token using a Python script that intercepts network traffic between the Mi Home app and Xiaomi servers.

  • πŸ’» Computer with Python 3.6+.
  • πŸ“± Android smartphone with Mi Home installed.
  • πŸ”Œ A program for intercepting traffic (Fiddler, Charles Proxy or mitmproxy).

Step-by-step:

  1. Install mitmproxy and configure it on your computer: pip install mitmproxy
  2. On your smartphone, configure a proxy server on your computer’s IP (port 8080).
  3. Start mitmproxy and log in to Mi Home.
  4. Open in the browser http://mi.com – this is necessary to intercept cookies.
  5. Use miio-cli script to extract the token: miio --discover --sync-see-other-devices

If the script gives a Device not found error, check:

  • πŸ”Œ Connecting a vacuum cleaner and a computer to the same network.
  • πŸ”’ No firewall blocking port 54321 (MiIO protocol used).
  • πŸ“‘ Correctness IP-address of the vacuum cleaner (can be manually specified: miio) --ip 192.168.1.100 --token YOUR_TOKEN info).
Model vacuum cleanerSupported protocolExample of test team
Xiaomi Mi Robot Vacuum 1SMiIOmiio --ip 192.168.1.100 --token YOUR_TOKEN vacuum
Roborock S5/S6MiIO (Outdated) / RRMapmirobo --ip 192.168.1.100 --token YOUR_TOKEN status
Viomi V3MiIOmiio --ip 192.168.1.100 --token YOUR_TOKEN viomi_vacuum
Dreame D9MiIO (partially)miio --ip 192.168.1.100 --token YOUR_TOKEN dreame_vacuum

πŸ’‘

For Roborock models (such as the S7 or S8), it is better to use mirobo instead of miio, as it supports advanced commands for working with maps and cleaning areas.

Method 4: Retrieval of the token through the backup Mi Home (Android)

On Android devices, you can extract a token from the Mi Home app backup, which works even if the token is not displayed in the interface.

Instructions:

  1. Install Mi Home and log in.
  2. Connect the vacuum cleaner to the app.
  3. Create a Mi Home data backup through Settings β†’ Account β†’ Backup.
  4. Download the backup file to your computer (usually with the.mi extension).
  5. Use the mihome-binary-parser utility to extract the token: npm install -g mihome-binary-parser mihome-binary-parser your_backup.mi

As a result, you will receive JSON-A file with all devices, where each will be specified "token": "YOUR_TOKEN_HERE".

⚠️ Note: Mi Home backups contain personal data (including cleaning history and maps of premises).Do not pass backup files to third parties and delete them after the token is extracted.

Method 5: Receiving a token through Home Assistant (automatically)

If you use Home Assistant, the token can be extracted automatically through Xiaomi Miio integration.

  1. Add the line to configuration.yaml: vacuum: - platform: xiaomi_miio host: 192.168.1.100 token:!secret xiaomi_vacuum_token
  2. Reboot Home Assistant.
  3. In the logs (Developer Tools β†’ Logs), find the line with the connection error - there will be the current token (if it is incorrect).

If the token is missing, Home Assistant can offer to generate it automatically when you first connect.

  • πŸ”„ Remove the vacuum cleaner from Mi Home and connect again.
  • πŸ”‘ At the time of connection, Home Assistant will intercept the token (if the discovery mode is enabled).

πŸ’‘

For Roborock models, Home Assistant is better to use Xiaomi Miio 2 integration – it supports new protocols and works more stable.

Common mistakes and their solutions

When working with IP and Xiaomi vacuum cleaner token, users often face typical problems.

Mistake.Possible causeDecision
Invalid tokenToken is obsolete or incorrectGet a new token or check out the region in Mi Home
Device not foundVacuum cleaner not online or incorrect IPCheck Wi-Fi connection and correctness IP-address
Timeout errorFirewall blocks port 54321Turn off the firewall or add an exception for Python
Unsupported deviceThe model of vacuum cleaner is not supported by miio-cliUse specialized utilities (e.g. mirobo for Roborock)

If the vacuum cleaner does not respond to commands via the API, check:

  • πŸ”Œ Network connection – Wi-Fi indicator on the vacuum cleaner should burn green.
  • πŸ”„ Firmware version – some models (for example, Roborock) S7) Requires updates to work with local API.
  • πŸ›‘οΈ Router settings - turn off AP Isolation and check that devices see each other on the LAN.
How do I check the connection to the vacuum cleaner?
You can check the availability of the vacuum cleaner over IP using the command ping: ping 192.168.1.100 If there are no answers, the problem is the network connection. If the ping passes, but the commands are not executed, check the token or port (54321).

FAQ: Frequent questions about IP and Xiaomi vacuum cleaner token

Can I use one token for several vacuum cleaners?
No, the token is unique to each device, and if you have multiple Xiaomi robot vacuum cleaners, you need to get a separate token for each. IP-The addresses will also be different (unless you have assigned them manually through the DHCP Reservation).
What to do if the token stopped working?
The token may become invalid after: Resetting the vacuum cleaner to factory settings; Updating the firmware (sometimes Xiaomi forcibly resets tokens); Deleting the device from the Mi Home account. In this case, you need to get a new token using one of the methods described above.
Can you control a vacuum cleaner without a token?
Yes, but with limitations: through the official Mi Home app (without access to the API); through voice assistants (Alice, Google Assistant), if the vacuum cleaner is tied to the account; through physical buttons on the vacuum cleaner body; however, to automate, integrate with the smart home or use alternative firmware, a token is required.
How to protect the token from leakage?
The token gives you complete control of the vacuum cleaner, so: πŸ” Keep it encrypted (e.g., secrets.yaml for Home Assistant). 🌐 Do not transfer the token through unsecured channels (for example, in open repositories on GitHub). πŸ”„ Change the token periodically (for example, after updating the firmware).If you suspect that the token is compromised, dump the vacuum cleaner to the factory settings and get a new one.
Do these methods work for Dreame vacuum cleaners?
Yes, but with reservations: Dreame models (e.g. D9, D10) use a modified MiIO protocol. They may require a dedicated dreame-vacuum utility instead of a standard miio-cli. The token is extracted by the same methods, but some API commands may differ. Before using, check the compatibility of your model on the project's GitHub repository.