How to save the map of the robot vacuum cleaner Xiaomi Vacuum Mop 2: all working methods

Robot vacuum cleaner Xiaomi Vacuum Mop 2 (models) STYJ02YM, STVJ02YM) It has become one of the most popular automated cleaning devices, thanks to its precise navigation and ability to save maps of spaces. After rebooting, resetting, or updating the firmware, the map disappears, and the robot has to re-scan the apartment, which not only wastes time, but also reduces the efficiency of cleaning - especially if you have a complex layout with many rooms and obstacles.

In this article, we will discuss all the current ways to save a map for Xiaomi Vacuum Mop 2, Including official methods through Mi Home, alternative applications like Valetudo or Home Assistant, and manual backup tricks, we will focus on common mistakes (for example, losing a card after upgrading to firmware). 3.5.9_004022) If you want to avoid constant rescanning, read on.

Keeping a map is not just a convenience, it's a key factor in optimal navigation algorithms. Without a map saved, the robot loses the ability to remember cleaning areas, virtual walls and routes, leading to chaotic movement and missed areas, especially critical for owners of large apartments or multi-storey houses, where rescanning can take up to 30-40 minutes.

═══

1.Official method: save the card through Mi Home

The most obvious and recommended method is to use the proprietary Mi Home app (or Xiaomi Home for European regions), but there are nuances: not all firmware versions support automatic card saving, and in some cases the function can be blocked due to the peculiarities of regional servers.

To save the card through Mi Home, follow the following steps:

  1. Open the app and select your Xiaomi Vacuum Mop 2 robot vacuum cleaner.
  2. Go to the Map section (or Map in English).
  3. Wait until the robot completes the full scan of the room (don’t interrupt the process!).
  4. Click on the Save icon (usually located in the upper right corner). In some versions of the app, this option may be called Save Map or Save Plan.
  5. Confirm the action – the card will be linked to the Mi Account.

Important: If there is no save button, check:

  • πŸ”„ The Robot Version (Actual to the Robot) 2026 year β€” 3.5.9_004022 Older versions may not support the function.
  • 🌍 Account Region: Russia and CIS sometimes require a server change to China (Mainland).
  • πŸ“± Mi Home version of the app. Use the latest stable build (not beta!).

⚠️ Note: After updating the firmware to the version 3.5.9_004022 Some users report a card reset.If this happens, try rolling back to the previous version via Valetudo or contact Xiaomi support to restore the backup.

πŸ“Š What Mi Home Server are you using?
China (Mainland)
Europe
Russia
USA
Other

═══

2.Alternative applications: Valetudo and Home Assistant

If the official method doesn't work or you prefer more control over your device, you can use third-party solutions. The two most popular options are Valetudo (open source firmware) and Home Assistant (smart home system), both of which allow you to not only save maps, but also control a robot without Xiaomi's cloud servers.

Method 1: Valetudo Valetudo is an alternative firmware that replaces standard robot software and gives access to advanced features, including manually saving cards in.svg or.png format.

  • πŸ”§ Unlock root access to the robot (through exploit or soldering work).
  • πŸ“₯ Install Valetudo through SSH Telnet.
  • πŸ–₯️ Connect to the robot web interface by local IP-address.

Once installed, you can save the map to the Map Management section, and the advantage of this method is that you have full control over the map files and can edit them.

Method 2: Home Assistant Home Assistant integrates with Xiaomi Vacuum Mop 2 component xiaomi_miio. To save the map:

  1. Add the robot to the Home Assistant configuration.
  2. Use the Xiaomi Miio Vacuum Map Card plugin for visualization.
  3. Configure automatic saving of the map in JSON format through scripts.
MethodNeed root?Format of conservationDifficulty
Mi Home❌ No.Xiaomi's Cloud⭐⭐ (simple)
Valetudoβœ… Yes.SVG/PNG/JSON⭐⭐⭐⭐ (difficult)
Home Assistant❌ No.JSON⭐⭐⭐ (middle-of-the-road)

Download firmware from GitHub|Make a backup of the original software|Connect the robot to Wi-Fi|Install Telnet/SSH client|Getting a Mi Home token-->

═══

3.Manual card saving via Mi Home token

If you don't want to install third-party firmware, but you need a backup of the card, you can extract it through the Xiaomi API using the device's token, a technique that requires minimal technical skills, but allows you to get a card file in.dat format, which can later be downloaded back.

Instructions:

  1. Get your robot token through the Mi Home app (use tools like Mi Token Extractor for Android or Packet Capture for iOS).
  2. Install Python and Python-miio: pip install python-miio
  3. Run the command to download the map: mirobo --ip ADRESS ROBOT --token Your Token. get_map The map file will be saved as map.dat.

To restore the card, use the command:

mirobo --ip ADRES ROBOT --token YOUR TOKEN upload_map map.dat

⚠️ Note: Mi Home tokens may become invalid after changing your account password or updating your application. Always keep your token backup in a safe place.

πŸ’‘

If the team get_map returns the error, try to start the robot for cleaning first - the map is updated only during active scanning.

═══

4. Cloud services: backup via Google Drive or Yandex Drive

If you use Mi Home to save cards, the data is stored on Xiaomi servers and can be lost when you lock your account or change region. To avoid this, you should set up automatic card backup to third-party cloud services.

For this:

  • πŸ“ Export the card manually via Mi Home (if export option is available).
  • ☁️ Upload the file to Google Drive or Yandex Drive with a date stamped.
  • πŸ”„ Automate the process through IFTTT or Tasker (for Android).

Example of automatic download script (for Home Assistant):

- alias: "Backup Xiaomi Map to Google Drive"




trigger:




- platform: time




at: "03:00:00"




action:




- service: google_drive.upload




data:




file_path: "/config/xiaomi_map_backup/{{ now().strftime('%Y-%m-%d') }}.dat"




drive_file_name: "vacuum_map_{{ now().strftime('%Y-%m-%d') }}.dat"

This approach ensures that even if the robot’s settings fail or reset, you can quickly restore the current map.

═══

5. Typical errors and their solutions

Even if you follow instructions correctly, users often face problems, and let's look at the most common mistakes and how to fix them:

Problem 1: The card is not saved in Mi Home

  • πŸ”Œ Reason: Robot has not completed a full scan of the room.
  • πŸ› οΈ Solution: Start a full cleaning (Zonal cleaning is not suitable!) and wait until the end.

Problem 2: After the firmware update, the card reset

  • πŸ”„ Reason: New versions of the software (3.5.9_004022 and above) may reset user data.
  • πŸ› οΈ Solution: Before upgrading, save the card via Valetudo or Mi Home token. If the card is already lost, try rolling back to the previous firmware.

Problem 3: Valetudo can't see the robot

  • πŸ”Œ Reason: Incorrectly stated IP-address.
  • πŸ› οΈ Solution: Check the robot's Wi-Fi connection and the token's correctness. Use ping to check the device's availability.
How do you get back on the old firmware?
It'll take a rollback: 1. Download the correct version of the firmware (for example, 3.5.8_003011) from the Xiaomi Community Forum. 2. Connect to the robot via Telnet and execute the command: fw_update /tmp/firmware.pkg 3. Wait for the reboot (don't turn off the power supply!). ⚠️ Recoiling can lead to loss of warranty and unstable operation of some functions!

═══

6. Additional tips for stable card operation

To minimize the risk of card loss, follow these guidelines:

  • πŸ”‹ Do not interrupt cleaning until it is finished – this can damage the card file.
  • πŸ“‘ Use stable Wi-Fi. The robot loses communication with Xiaomi servers at a weak signal, which can lead to data reset.
  • πŸ”„ Update your firmware regularly, but check the reviews on forums (for example, check them out first, 4PDA or Reddit) for bugs.
  • πŸ“± Link the robot to the main account. If you change your Mi Home account, the card may be lost.

If you move frequently or have multiple floors, consider buying a multi-storey docking station (e.g. for the Xiaomi Vacuum Mop 2 Pro model) that will allow the robot to save separate maps for each level.

πŸ’‘

Regularly backing up your card via a token or Valetudo is the only reliable way to avoid losing it when you crash or update.

═══

FAQ: Frequent questions about card preservation

Can I transfer the map from one Xiaomi Vacuum Mop 2 robot to another?
Technically, yes, but only if both models are identical (e.g., STYJ02YM) to extract the card file via Valetudo or token and then upload it to a second robot, but there may be problems calibrating the sensors, so re-scanning is recommended.
Why does the card disappear after resetting the robot?
When resetting to factory settings, the robot deletes all user data, including maps, to protect privacy (e.g., when selling a device), and to avoid loss, always keep a backup in advance.
How often should I update the map?
Update the map whenever you change your layout (furniture changes, new obstacles) and automatically adjust your routes, but a full rescan every 1-2 months will improve your navigation accuracy.
Can I edit the saved map?
Yes, but only through Valetudo or specialized tools like Map Editor, the official Mi Home app only allows you to add virtual walls and cleaning areas.
What if the robot can’t complete the scan?
Check: Indoor lighting (the robot uses a laser LDS sensor that doesn't work well in the dark); no mirror or glass surfaces (they interfere with the laser); battery charge (at a level below 20%, scanning can be interrupted).