How to build a map of an apartment for a robot vacuum cleaner Xiaomi Mi: from preparation to fine tuning

The Xiaomi Mi robot vacuum cleaner can make cleaning much easier, but its effectiveness depends on the quality of the built map of the room. Without a precise scheme, the device will move randomly, skip zones or waste time reprocessing the same areas. Many users face problems: the robot β€œlost” in long corridors, can not see furniture with transparent legs or incorrectly determine the boundaries of rooms.

In this article, we'll take a step-by-step mapping algorithm, from apartment preparation to route preservation and optimization, and focus on common errors that damage scan quality and how to fix them, learn how to get a robot to correctly recognize doors, stairs and other obstacles, and learn how to divide the map into zones for flexible cleaning.

Important: the process may vary depending on the model (Mi Robot Vacuum-Mop 2 Pro, Mi Robot Vacuum-Mop P, Mi Robot Vacuum-Mop 2 Lite, etc.), but the general principles remain the same. LDS-scanning (laser rangefinder), the algorithm for building the map will be identical to the one described below.

πŸ“Š What model of Xiaomi robot vacuum cleaner you use?
Mi Robot Vacuum-Mop 2 Pro
Mi Robot Vacuum-Mop P
Mi Robot Vacuum-Mop 2 Lite
Another Xiaomi model
Another brand's robot

1. Preparation of the apartment before scanning

Before you first start the robot, you need to minimize the interference that can distort the map. Start by cleaning the floor: remove small objects (socks, toys, wires) that the device can hook or move. Pay special attention to transparent and mirrored surfaces - glass tables, aquariums or glossy furniture knock down the laser sensor, which causes the map to appear "holes".

It is also recommended that:

  • πŸ”Œ Close doors to rooms that do not need to be scanned (such as a closet or bathroom).
  • πŸͺ‘ Lifting curtains or blinds if they hang to the floor – the robot can get entangled in the fabric.
  • πŸšͺ Make sure all interior doors open freely (no thresholds above 2 cm).
  • πŸ’‘ Turn on lighting in dark corners – this will help the camera (if it is in the model) to better recognize the boundaries.

Critical errors that spoil the map from the first run:

  • 🚫 Moving objects (children, pets, rotating fans) – the robot will constantly re-build the route.
  • 🚫 Sharp height differences (fringed mats, high rapids) - can cause navigation error.
  • 🚫 Absence of support points (empty walls without furniture) – in such areas, the robot loses orientation.

⚠️ Warning: If there is a staircase without fencing in the apartment, be sure to install a virtual wall in the Mi Home app before first running. Xiaomi Mi robots do not recognize height differences of more than 10 cm and may fall.

2. First enable and configure in the Mi Home app

Before you build a map, the robot has to be plugged into the app and updated to the last firmware.

  1. Install the Mi Home app (available for Android and iOS).
  2. Create an account or sign in to an existing one (account binding is mandatory for card retention!).
  3. Add the device through Profile β†’ Add the device β†’ Robot vacuum cleaner.
  4. Follow the instructions on the screen to connect to Wi-Fi (the robot must be near the router).

After connecting, check:

  • πŸ“Ά Wi-Fi signal at cleaning site (robot loses communication when the surface is weak).
  • πŸ”„ Availability of firmware updates in Settings β†’ Update of the PO.
  • πŸ“ The correct region in the robot settings (e.g. China or Europe – affects voice prompts).

If the robot is not connected to Wi-Fi, try:

  1. Reboot the router and robot (hold the power button for 10 seconds).
  2. Use 2.4 GHz frequency (Xiaomi robots do not support 5 GHz).
  3. Shut down. VPN firewall on the phone.

πŸ’‘

If the robot is constantly losing contact with the application, try to fix it. MAC-address in router settings or highlight static IP.

3. Starting the first scan: a step-by-step process

Now, to the most important step, which is mapping.

  1. Place the robot at the charging station in the center of the room (not in the corner!).
  2. In the Mi Home app, select the robot and press Cleanup. β†’ Map.
  3. Click Create a map (or Scan, depending on the model).
  4. Select Full Cleanup mode – the robot will start spiraling, gradually expanding the scanning area.

During the scan:

  • 🚫 Do not move the robot manually.
  • 🚫 Do not open/close the doors.
  • πŸ“± Follow the process in the application – the map should be updated in real time.

Optimal conditions for accurate scanning:

ParameterRecommendationConsequences of violation
LightingNatural or artificial light (no glare)Dark zones are displayed as "walls"
Charge levelAt least 80%Robot will interrupt scanning to recharge
Speed of movementβ€œSilent cleaning” or β€œbalanced”Max mode. misses details.
ObstaclesMaximum 3-4 static 10 Β²Chaotic route, errors in contours

The scan takes 20 minutes to 1.5 hours (depending on the area), and when it's done, the robot will return to base, and the app will have a stored map. If the map is blurred or misspelled, don't save it, run the scan again after the interference has been removed.

Make sure all rooms are scanned|Check for no "holes" in the map|Name the rooms (kitchen, bedroom, etc.)|Save the card to the cloud (in case of resetting)-->

Map Editing: Division into Zones and Virtual Walls

A map is rarely perfect, and the Mi Home app has tools to refine it:

  • πŸ“ Rooms separation: Click Edit β†’ Separate rooms and draw lines along the boundaries, this is necessary for zoned cleaning (for example, only clean the kitchen).
  • 🚧 Virtual Walls: Add restrictions on places where the robot cannot go (e.g., a cat bowl). β†’ Virtual Wall and Draw a Line.
  • 🧹 Cleaning areas: Select areas that require special attention (carpets, hallway). β†’ Cleaning area.

Example of an optimized map:

  • πŸ›‹οΈ Living room: Divided into a sofa area (daily cleaning) and a game console corner (cleaning 1 time per week).
  • 🍳 Kitchen: Virtual wall near refrigerator (robot gets tangled in legs).
  • πŸšͺ Hallway: Additional area at the front door for sand collection.

Editing intricacies:

  • If the robot ignores virtual walls, check the firmware update – there are bugs in older versions.
  • For complex rooms (for example, with columns), use cleaning points - the robot will bypass them along a given route.
  • Avoid areas that are too small (less than 1 m2) – the robot may miss them.

⚠️ Warning: After editing the map, always run a test cleaning in room mode, so you make sure that the robot correctly interprets the new boundaries.

Typical problems and their solutions

Even after careful preparation, errors can occur.

Problem 1: The robot doesn't build a map, it moves chaoticly.

  • πŸ”¦ Cause: Laser sensor contaminated (dust, hair).
  • πŸ› οΈ Solution: Wipe the sensor with a dry wipe. Location: top on the case (transparent window).

Problem 2: The map is saved, but when cleaning, the robot is lost.

  • πŸ—ΊοΈ Reason: Changed location of furniture or lighting.
  • πŸ”„ Solution: Run a re-scan or manually correct the map in the app.

Problem 3: The robot can't see virtual walls.

  • πŸ“± Reason: Synchronization failure between robot and application.
  • πŸ”Œ Solution: Reboot the robot (hold the power button 10 seconds) and update the map in Mi Home.

Problem 4: The "ghost walls" appeared on the map.

  • πŸ‘» Reason: Reflection from mirrors or glass.
  • πŸ–ΌοΈ Solution: Cover mirrors with fabric for scanning time or add virtual walls manually.
What to do if a robot falls down a ladder?
If the robot falls from a height of more than 50 cm, don't turn it on right away! Check the body for cracks, check the wheels and sensors. The most common gyroscope that falls is going to go around, and you need to change the module at the service center. If there are no external damages, reset the settings to factory (Settings) β†’ Reset) and rebuild the map again.

6. Optimization of cleaning routes

The map you build is only half the success, so to make the robot clean efficiently, you can set up your cleaning schedule and settings.

  • ⏰ Schedule: Set a cleanup for a time when you are not at home (e.g. 10:00 to 12:00).Use Cleaning β†’ Schedule.
  • πŸ’§ Modes: Quiet for daily cleaning (low noise, medium power); Balanced for most cases; Max for general cleaning (high noise, high battery consumption); Rooms for only selected rooms.
  • πŸ”‹ Charging: Enable the option of Auto-Continue after charging if the area is more than 60 mΒ².

For models with wet cleaning function (Mi Robot Vacuum-Mop 2 Pro):

  • πŸ’¦ Set the intensity of the water supply (Settings) β†’ Wet cleaning).
  • 🧽 Use special wipes for a robot vacuum cleaner (ordinary fabrics can clog the pump).
  • 🚫 Avoid wet cleaning on carpets – this spoils the fabric and mechanism of the robot.

Advice for large apartments: If the robot does not have time to clean the entire area in one cycle, break the map into 2-3 Separate and set up a schedule for each zone on different days.

πŸ’‘

Regularly (once in) 1-2 Update the map even if the furniture is not moving, and the dust on the sensors and the change in lighting over time distort the data.

7.Save and backup card

The map is stored in the robot's memory, but when you reset or update the firmware, it may disappear.

  1. Open the map in the Mi Home app.
  2. Click Save to the cloud (cloud icon in the upper right corner).
  3. Link the card to your Mi Account, and it will allow you to restore it to your new phone.

If the map is lost,

  • Check the Map Archive folder in the app.
  • Try to download backup from the cloud (Profile) β†’ Cloud. β†’ Backup copies).
  • If there is no backup, you will have to build the map again (see section 3).

Important: Some models (Mi Robot Vacuum-Mop 2 Lite) do not support cloud-based card storage, in which case the only way to back up is to screenshot the map with manually marked (e.g., room boundaries).

⚠️ Warning: When selling or transferring a robot to another user, be sure to reset the settings to factory settings (Settings) β†’ Otherwise, the new map may conflict with the old one, causing navigational disruptions.

8 Additional features for advanced users

If you want to automate your cleaning as much as possible, take advantage of these opportunities:

  • πŸ€– Voice control: Connect the robot to Alice (Yandex) or Google Assistant. Commands: "Alice, run the robot vacuum cleaner in the kitchen." "Okay, Google, get the robot back on the base".
  • πŸ“² Smart Home integration: With Mi Home, set up automation, such as: Start cleaning when all family members leave (by geolocation); Stop the robot when you open the front door (if you have a sensor).
  • πŸ”§ Custom scripts: For models with OpenAPI support (e.g. Mi Robot Vacuum-Mop P), you can write a script in Python for flexible management. Example of code to run a cleaning operation: import miio vacuum = miio.Vacuum(ip="192.168.1.100", token="YOUR_TOKEN") vacuum.start()

Limitations:

  • Voice commands work only when you are actively connected to the Internet.
  • Automation via Mi Home requires a Mi Home Hub.
  • Python scripts are only suitable for firmware with MiIO Protocol support.
How to get a token for a token API? The token can be extracted from the Mi Home app traffic using the Packet Capture (Android) or mitmproxy (iOS) tool.
GitHub repository. Be careful not to give the token to third parties!

FAQ: Frequent questions about map construction

πŸ”Ή Why the robot doesn't return to base after cleaning?
This can happen for several reasons: πŸ”‹ The charging station is located in an area with poor Wi-Fi coverage (the robot β€œloses” its location). πŸ“ The base is moved from its place after scanning (the robot searches for it by the stored coordinates). 🧹 There's too much debris around the base, sensors don't recognize contacts. Solution: Move the base to an open area, clear the contacts, and restart the robot.
πŸ”Ή Can I use a single card for several floors?
No, Xiaomi Mi robots don't support multi-story maps. You have to build a separate map for each level. To switch between them: Move the robot to another floor. In the app, select Map. β†’ Upload another map. If you don't have a map for the floor, start a new scan. Tip: Name the maps clearly, for example, "1 floor - apartment", "2 floor - bedrooms".
πŸ”Ή How to update the map if I have moved furniture?
There are two options: Partial Update: Manually edit the map in Mi Home (mov walls, add new objects). Full rescan: Delete the current map (Map) β†’ Remove it and re-start it. If you have minimal changes (like moving the couch), the first way is enough.
πŸ”Ή The robot can't see new furniture?
This is a typical problem when adding large items (caskets, chairs: πŸ”„ Run local scan: place the robot next to new furniture and select Cleanup β†’ Local. πŸ–₯️ Manually add the object to the map in Mi Home (tool Add furniture). πŸ”‹ If the robot pushes hard on an object, create a virtual wall around it.
πŸ”Ή How to transfer the card to a new phone?
The card is linked to the Mi Account, so when you change device: Install Mi Home on the new phone and log in to the same account. β†’ Cloud. β†’ Backups find the card you saved. Click Restore, the robot syncs the data. If the map doesn't get saved to the cloud, you'll have to build it again.