How to find out IP and token robot vacuum cleaner Xiaomi through the computer: 5 proven methods

Integrating Xiaomi’s robot vacuum cleaner into smart home systems or third-party applications often requires knowledge of it. IP-Without this data, you can't control your device through Home Assistant, Node-RED, or even some versions of Mi Home after you change region, but how do you get it if you don't provide direct tools?

Many users mistakenly believe that it requires root rights on a smartphone or complex manipulation of firmware. IP-The address can be found in 2 minutes via the router, and the token can be extracted using official Xiaomi tools or third-party utilities. In this article, we will discuss 5 working methods (including the most reliable through Python) relevant to Mi Robot Vacuum, Viomi, Dreame and others on the MiOT platform.

⚠️ Note: Extracting a token through informal methods may violate Xiaomi’s user agreement. Use the data only for personal purposes – transferring the token to third parties gives them full control over your device.

1. How to find out. IP-address of Xiaomi robot vacuum cleaner

IP-The address is for direct connection to the vacuum cleaner over a local network, and you can get it in three ways without using third-party software.

The easiest way is to check the list of connected devices in your router's settings.

  1. Open the router’s web interface (usually at 192.168.0.1 or 192.168.1.1).
  2. Log in (login / password from the sticker on the router case).
  3. Go to DHCP, Local Area Network, or Connected Devices.
  4. Find a device called roborock, miio, or vacuum.

If the vacuum cleaner doesn't show up, try restarting it (hold the power button for 5 seconds) and updating the router page. An alternative way is to use the arp -a command in Windows Command Prompt (more in the table below).

MethodInstructionsPlusesCons
Through the router.Viewing the list DHCP-clienteleIt does not require software, it works on any router.IP may change when rebooting
Team arp-a-a-a-aPerform in CMD after ping vacuum cleanerQuick, no access to the router.It requires knowledge. MAC-address
Fing appendixNetwork scanning in mobile/desktop applicationShows all devices with namesI need to install the software.

For fixation IP-Addresses (so that it does not change) set up a static lease DHCP router, tethered MAC-vacuum-cleaner address to the selected IP. MAC You can find out on the sticker under the device lid or through Mi Home (Device settings) β†’ General information).

πŸ“Š What kind of robot vacuum cleaner Xiaomi you have?
Mi Robot Vacuum-Mop 2
Roborock S7
Viomi V3
Dreame D9
Other

2. Obtaining a token through Mi Home (official method)

If the vacuum cleaner is already tied to a Xiaomi account, the token can be extracted from Mi Home app traffic without root rights.This method works for most models, but requires a Python computer.

You'll need:

  • πŸ“± Smartphone with Mi Home installed and tied vacuum cleaner.
  • πŸ’» Computer with Python 3.6+ and the mitmproxy library.
  • πŸ“‘ Shared network: phone and PC must be connected to the same Wi-Fi.

Step-by-step:

  1. Install mitmproxy via the command: pip install mitmproxy
  2. Set up a proxy on your smartphone: Wi-Fi β†’ Network settings β†’ Additional β†’ Proxy Server β†’ Manual. Specify your PC’s IP (learn via ipconfig in CMD) and port 8080.

mitmproxy

Mi Home

Go to the vacuum cleaner settings and wait for traffic capture.

api.io.mi.com

did

token

⚠️ Note: Xiaomi can block unofficial proxies.If traffic isn't captured, try using Charles Proxy with a certificate or method through a ADB (described below).

Install Python 3.6+

Install mitmproxy (pip install mitmproxy)

Connect your phone and PC to the same network

Set up a proxy on your phone (IP PC:8080)

Open Mi Home and go to the vacuum cleaner settings-->

3. Alternative method: token via ADB (for Android)

If the proxy method doesn’t work, you can extract the token directly from the memory of the Mi Home application using ADB (Android Debug Bridge), which requires the developer mode on the smartphone to be turned on.

What needs to be done:

  1. Activate Debugging by USB on your phone (Settings β†’ About Phone β†’ Assembly Number – tap 7 times, then go back to Settings β†’ Developer).
  2. Connect the phone to the PC and confirm the debugging permission.
  3. Install ADB on your computer (download Platform Tools from Google).
  4. Execute the commands: adb shell pm list packages | grep mihome run-as com.xiaomi.smarthome dbpath sqlite3 databases/miio2.db "SELECT token FROM devices WHERE did='DID_DETECTIVE";" (replace DID_DEVICES FOR ID Your vacuum cleaner from Mi Home).

Device ID (did) can be found in Mi Home: Profile β†’ Settings β†’ Smart Home Network β†’ Your Device β†’ General Information.

What if the ADB can’t see the device?
If the adb device command returns an empty list: 1. Check if debugging is enabled by USB 2. Install drivers for your model (e.g. Xiaomi) USB Drivers). 3. Try another one. USB-cable (original, not "charged"). 4. Reboot your phone and PC. 5. Some Xiaomi models need to allow debugging in Settings. β†’ Additionally. β†’ For developers β†’ Authorization of debugging USB (choose "Always allow").

4. Token extraction via Python script (for experienced)

For users familiar with Python, there is a universal miio-cli script that automates token acquisition, which works even without a proxy, but requires knowledge of the username/password from the Xiaomi account.

Instructions:

  1. Install the library: pip install python-miio
  2. Sign in and get a token: miio --discover --sync-seed miio --cloud-token YOUR_PHONE_NUMBER YOUR_PASSWORD (substitute YOUR_PHONE_NUMBER and YOUR_PASSWORD Your Xiaomi account information).
  3. The script will return the list of devices with their tokens.

Does this work for the Roborock S7 MaxV?
Yeah, Roborock. S7 MaxV (like other MiOT models) supports the same protocols, but some features (like camera management) may require an additional token for cloud services. --cloud-token.
What if Xiaomi has blocked an account after the token is extracted?
Blocking is unlikely, but if it happened: Try to restore access through the recovery page. Write in support of Xiaomi explaining that you suspect a hack (don't mention tokens!). Create a new account and reconfigure the vacuum cleaner. In the future, use official integration methods (for example, Mi Home API for developers).