Xiaomiβs robot vacuum cleaners (including the Roborock, Mi Robot Vacuum and Dreame models) build detailed maps of spaces to efficiently clean. However, once you reset your settings, update your firmware or reconnect to another account, the map can disappear forever. Restoring occupied areas, virtual walls and routes manually takes hours β but this can be avoided.
In this article, we will discuss all the working ways to save the map for different models and versions of software, including hidden features of the Mi Home application, bypassing the limitations of cloud storage and manually exporting data. S7, Xiaomi Vacuum-Mop 2 Pro and other popular devices β their firmware is updated frequently, and backup methods change.
Why Xiaomi Vacuum Card Disappears and When to Save It
The cleaning card is stored in three places:
- π± Locally in the memory of the robot - erased when reset to factory settings or update firmware "over the air" (OTA).
- βοΈ Xiaomi is tied to a Mi Account, but not all models support cloud storage (e.g. Roborock) E25 Keeps the cards only locally).
- π₯οΈ In the cache of the Mi Home application β deleted when the program is reinstalled or data is cleaned.
Situations where a backup card will save hours of time:
- π Update the firmware - even "safe" OTA-Updates sometimes reset settings.
β οΈ Note: Xiaomi Mi Robot Vacuum models 1S Roborock S5 Up to 3.5.8 firmware does not support cloud-based card storage, only manual export via Mi Home is available. API or backup of robot settings.
Method 1: Cloud-based map saving via Mi Home (for supported models)
The easiest method is synchronizing the map with the Xiaomi cloud, which works for most modern models (Roborock). S7, Xiaomi Vacuum-Mop 2 Pro, DreameBot L10 and newer, but requires:
- πΆ Stable connection of vacuum cleaner to Wi-Fi (2.4 GHz).
- βοΈ Actively linked to Mi Account (without guest mode).
- π The enabled function Cloud synchronization in the robot settings.
Step-by-step:
- Open the Mi Home app and select your vacuum cleaner.
- Go to Settings. β Map. β Cloud-based Save (or Synchronization of the Map).
- Activate the slider Save the map in the cloud.
- Wait until the synchronization is complete (it can take up to 5 minutes).
To check if the card is saved in the cloud:
- Go to Profile. β Devices β [Your vacuum cleaner] β Map.
- If the actual map is displayed even after the application is restarted, the data is synchronized.
β οΈ Note: Xiaomi Cloud only stores one latest version of the map. If the robot builds a new map (for example, after moving), the old one will be overwritten. For long-term storage, use manual export (see Method 3).
π‘
If Cloud Save is not on the menu, upgrade the Mi Home app to the latest version. For Roborock models, also check the firmware version - it requires 4.0.0 or higher.
Method 2: Backup of robot settings (for all models)
If your model doesn't support cloud-based card storage, you can save all of the robot's settings, including the card, to a backup file. Xiaomi/Roborock, But you need access to Mi Home. API.
Instructions for Android:
- Install the Mi Home Backup app (or Xiaomi Cloud Tokens for manual export).
- Sign in to your Mi Account account.
- Select your vacuum cleaner from the list of devices.
- Click Create a backup and wait for the process to be completed (the file will be saved in the phoneβs memory).
For iOS:
- Use the Mi Home Backup Tool or Python script through Home Assistant (technical skills required).
- An alternative is a virtual machine with Android (like BlueStacks) to run Mi Home Backup.
Recovery from backup:
- Reset the vacuum cleaner to factory settings (clip home) + 5 seconds power).
- Connect the robot to the same Mi Home account.
- In the Mi Home Backup app, select the backup file and click Restore.
| Model vacuum cleaner | Support for cloud storage | Backup through API | Manual export of card |
|---|---|---|---|
| Roborock S7/S8 | β Yes. | β Yes. | β Yes (via Valetudo) |
| Xiaomi Vacuum-Mop 2 Pro | β Yes. | β Yes. | β No. |
| Roborock S5/S6 | β οΈ Partially (with firmware 4.0 only)+) | β Yes. | β Yes (via rr-mqtt) |
| Mi Robot Vacuum 1S | β No. | β Yes. | β No. |
Record the vacuum cleaner firmware version|Check the free space on the phone (you need to check it). ~50MB)|Shut down. VPN (may block access to API)|Synchronize time on the phone and vacuum cleaner|Connect the vacuum cleaner to charging (to avoid discharge)-->
Method 3: Manually save the card via Valetudo or Home Assistant (for advanced users)
For owners who are ready for technical manipulation, the most reliable way is to install alternative firmware Valetudo or integrate with Home Assistant.
- πΊοΈ Export the card in.svg or.png format.
- π₯ Keep the history of cleaning and the area in JSON-file.
- π Restore the card even after a complete reset.
Instructions for Valetudo:
- Install Valetudo on the vacuum cleaner through official documentation (root access to the robot is required).
- Connect to the Valetudo web interface at the address http://[IP-vacuum-dress].
- Go to the Map Management section β Export Map.
- Download the map files (map.svg, map_data.json) computer.
For Home Assistant:
- Set up integration with the vacuum cleaner through the component xiaomi_miio.
- Add configuration.yaml: vacuum: - platform: xiaomi_miio host: [IP-vacuum cleaner address] token: MIIO-token] map_path: /config/vacuum_maps
- The cards will automatically be saved to the folder. /config/vacuum_maps each update.
β οΈ Note: Installing Valetudo voids Xiaomiβs warranty and may result in your device being locked when updated via official software. Use this method only if you are prepared for the risks.
How to get MIIO-token for Home Assistant
Method 4: Save screenshots of the map and manual recovery
If none of these methods work (e.g., older models like the Mi Robot Vacuum 1), you can save screenshots of the map and restore the zones manually, which will take time, but is better than building a map from scratch.
How to make quality screenshots:
- π± Open the map in Mi Home and zoom in to the maximum.
- πΌοΈ Take a series of screenshots (part by part) to cover the entire area.
- π₯οΈ Combine screenshots into one image using Photoshop or PTGui.
- π Save the file with at least a resolution 2000Γ2000 pixels.
Recovery from screenshot:
- Open the saved image on your phone or tablet.
- In Mi Home, start a new map and manually add: πͺ Cleaning areas (by contours of rooms). π« No-go zones (furniture, wires). π Virtual Walls (to limit movement).
cloning
Mi Home
To speed up the process:
- π Use the ruler on the screen (includes in the settings of special features) Android/iOS) for precise positioning of zones.
- π Enable the magnification (magnification) mode for drawing small details.
π‘
The map screenshots do not store any information about the height of the carpet, the type of coating or the history of cleaning, but can only be used to reconstruct the geometry of the room.
Method 5: Exporting the card through Python scripts and MIIO Protocol
For users with programming skills, the most flexible way is to directly address the problem. API It's a vacuum cleaner using Python:
- πΊοΈ Vector map in.svg format.
- π JSON-data with coordinates of zones, walls and routes.
- π The history of cleaning over the past month.
Example of a script for exporting a card:
from python-miio import Vacuum
import asyncio
IP = "192.168.1.100" # IP- vacuum cleaner address
TOKEN = "your_token_here" # MIIO- token
async def export_map():
vacuum = Vacuum(IP, TOKEN)
map_data = await vacuum.get_map()
with open("vacuum_map.json", "w") as f:
f.write(str(map_data))
asyncio.run(export_map())To get MIIO-token:
- Install. MIIO2 hop-on.
- Connect to the same Wi-Fi as the vacuum cleaner.
- Launch Packet Capture and get a token from the miIO.info package.
To visualize the map, use the script:
from python-miio import Vacuum
import matplotlib.pyplot as plt
async def draw_map():
vacuum = Vacuum(IP, TOKEN)
map_data = await vacuum.get_map()
plt.imshow(map_data["image"], cmap="gray")
plt.savefig("vacuum_map.png")
asyncio.run(draw_map())β οΈ Note: Xiaomi updates the protocol periodically MIIO, And the scripts may stop working. Watch for updates in the OpenMiHome repository.
Frequent Mistakes and How to Avoid Them
Even when following instructions, users face problems.-5 mistakes and their solutions:
| Mistake. | Reason. | Decision |
|---|---|---|
| The map is not saved in the cloud | Outdated firmware or account region | Update the robot software and check the region in Mi Home (should match the purchase region) |
| Backup copy is not restored | Disparity of firmware versions | Roll back the firmware to the version on which the copy was made, or use Valetudo |
| Python script gives you a Timeout error | Vacuum cleaner not responding to requests API | Check it out. IP-Address, token and disable firewall |
| The map in Valetudo is empty | The robot has not completed the map. | Start a complete cleaning before exporting |
| Mi Home Backup doesn't see vacuum cleaner | The device is tied to another region | Change your account region in your Mi Home settings (e.g. from Russia to China) |
Additional recommendations:
- π Do not disconnect the vacuum cleaner from power during backup or recovery β this can damage the deviceβs file system.
- π Use a stable Internet connection (preferably via PC cable).
- β³ Allocate enough time β syncing the map to the cloud can take up to 10 minutes.