How to save the map of the robot vacuum cleaner Xiaomi: backup, export and recovery

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.

πŸ“Š What model of Xiaomi robot vacuum cleaner you use?
Roborock S7/S8
Xiaomi Vacuum-Mop 2
Dreame D9
Mi Robot Vacuum 1S
Another model

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:

  1. Open the Mi Home app and select your vacuum cleaner.
  2. Go to Settings. β†’ Map. β†’ Cloud-based Save (or Synchronization of the Map).
  3. Activate the slider Save the map in the cloud.
  4. 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:

  1. Install the Mi Home Backup app (or Xiaomi Cloud Tokens for manual export).
  2. Sign in to your Mi Account account.
  3. Select your vacuum cleaner from the list of devices.
  4. 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:

  1. Reset the vacuum cleaner to factory settings (clip home) + 5 seconds power).
  2. Connect the robot to the same Mi Home account.
  3. In the Mi Home Backup app, select the backup file and click Restore.
Model vacuum cleanerSupport for cloud storageBackup through APIManual 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:

  1. Install Valetudo on the vacuum cleaner through official documentation (root access to the robot is required).
  2. Connect to the Valetudo web interface at the address http://[IP-vacuum-dress].
  3. Go to the Map Management section β†’ Export Map.
  4. Download the map files (map.svg, map_data.json) computer.

For Home Assistant:

  1. Set up integration with the vacuum cleaner through the component xiaomi_miio.
  2. Add configuration.yaml: vacuum: - platform: xiaomi_miio host: [IP-vacuum cleaner address] token: MIIO-token] map_path: /config/vacuum_maps
  3. 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
1. Install the Mi Home app on Android. 2. Download MIIO2 Mod and get the token through Packet Capture. 3. Enter the token into the Home Assistant configuration!

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:

  1. Open the saved image on your phone or tablet.
  2. 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:

  1. Install. MIIO2 hop-on.
  2. Connect to the same Wi-Fi as the vacuum cleaner.
  3. 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 cloudOutdated firmware or account regionUpdate the robot software and check the region in Mi Home (should match the purchase region)
Backup copy is not restoredDisparity of firmware versionsRoll back the firmware to the version on which the copy was made, or use Valetudo
Python script gives you a Timeout errorVacuum cleaner not responding to requests APICheck it out. IP-Address, token and disable firewall
The map in Valetudo is emptyThe robot has not completed the map.Start a complete cleaning before exporting
Mi Home Backup doesn't see vacuum cleanerThe device is tied to another regionChange 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.
Can I save the card if the vacuum cleaner is not connected to Wi-Fi?
Yes, but only through local backup: For Valetudo models, connect directly to the robot's access point. For others, use Mi Home Backup in offline mode (account pre-linking is required). Without Wi-Fi, you can't sync the card to the cloud or export it through Home Assistant.
How to transfer the card to another vacuum cleaner of the same model?
Transferring the card between devices is not officially supported, but there are workarounds: Export the card from the first vacuum cleaner via Valetudo or Python script. Install Valetudo on the second vacuum cleaner and import the file map_data.json. Manually adjust the coordinates in JSON-File (requires skills to work with the QGIS Or Inkscape). ⚠️ The accuracy of the transferred map will be lower due to differences in sensors of devices.
What if after updating the firmware card disappeared?
Try restoring the map in this order: Check the Mi Home cloud (Devices section) β†’ [Your vacuum cleaner] β†’ If you have a map in the cloud, sync it with the robot (Settings) β†’ Map. β†’ Update. If not, restore the backup via Mi Home Backup. If you don't have a backup, restore the map from the screenshots (see Method 4). If none of the methods worked, start a full cleanup, the robot will build a new map.
How to save a map for Roborock S5 silhouette?
For Roborock. S5 Update your firmware to the latest version via Mi Home (if possible). If the update is not available, use Mi Home Backup to create a local backup. Alternatively, install Valetudo (requires opening the case and soldering contacts). ⚠️ On firmware below 3.3.0, cloud-based card storage doesn’t work.
Can I edit the saved card on a PC?
Yes, for this: Export the card to.svg via Valetudo. Open the file to Inkscape or Adobe Illustrator. Edit zones, walls or tags (the path layer is responsible for geometry). Save the changes and import back to the vacuum cleaner. For editing JSON-Data Use Notepad Data++ plug-in JSON Viewer.