How to build a virtual wall for a robot vacuum cleaner Xiaomi: 5 working ways

Xiaomi vacuum cleaners are no longer a luxury, they are indispensable tools for keeping clean. But even the smartest models, such as the Mi Robot Vacuum-Mop 2 Pro or the DreameBot Z10 Pro, sometimes need manual control. One of the most popular features is virtual walls that limit the cleaning area, without which the robot can go to undesirable places: on mats with long pile, in children's rooms while sleeping or to bowls of pets.

In this article, we will explore all the current ways to create virtual barriers for Xiaomi vacuum cleaners, from standard tools in Mi Home to third-party applications and physical limiters. You will learn how to set up exclusion zones for different models, what errors users often make, and how to circumvent firmware restrictions. And also why virtual walls in Mi Home can disappear after updating the map and how to fix it without resetting.

1. Virtual walls in the official Mi Home app: step-by-step configuration

The most obvious way is to use the built-in tools in the Mi Home app (or Xiaomi Home for newer versions), but there are nuances: not all models support this feature out of the box, and the algorithms for space recognition may differ.

To add a virtual wall:

  • πŸ“± Open the Mi Home app, select your robot vacuum cleaner and go to the Map section.
  • πŸ–±οΈ Click on the icon Edit the map (pencil in the upper right corner).
  • 🚫 Select Virtual Wall tool (usually marked with a dashed line or fence icon).
  • πŸ“ Draw a line on the map, limiting the area. To confirm, click Save.

Important: in some firmware, virtual walls only work when the room map is active. If the robot cannot build a map (for example, due to low light or monochromatic walls), the function will not be available.

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

2. Alternative applications: Valetudo, Home Assistant and others

If the built-in Mi Home tools don’t suit you (for example, due to limited functionality or bugs), you can use third-party solutions.

  • 🌐 Valetudo is an open firmware for robot vacuum cleaners that allows you to control a device without the Xiaomi cloud. Supports the creation of zones and virtual walls through the web interface.
  • 🏠 Home Assistant – Xiaomi’s smart home integration system allows you to set up automation (e.g., activation of walls on schedule).
  • πŸ“± Mi Home Modded – A modified version of the official app with advanced features (including saving virtual walls after rebooting).

Valetudo will require:

  1. Install alternative firmware on the robot (instructions are on the official website).
  2. Connect to the local vacuum cleaner network via the browser (usually at the address) http://[IP-robot-address]).
  3. In the Map Editor section, draw virtual walls and save them as part of the map.

The advantage of this method is that walls are permanently preserved, even after upgrades, but the Valetudo installation process requires technical skills and can be insecure.

πŸ’‘

Before you use Valetudo, back up your original card to Mi Home. To do this, export it through Settings β†’ Map β†’ Export (if the feature is available for your model).

Physical limiters: magnetic tapes and infrared barriers

If the software methods don’t work (for example, you have an old model without virtual wall support), you can use physical barriers.

Type of barrierPrinciple of workPlusesCons
🧲 Magnetic tapeThe robot can detect the magnetic field and does not cross the line.Cheap, easy to install, does not require foodIt may be that not all models support
πŸ”¦ Infrared barrierThe emitter creates an invisible β€œwall” that detects the vacuum cleaner sensorWorks with most models, more reliable tapeExpensive, requires batteries/outlets
πŸͺ΅ Physical swellingMechanical obstruction (e.g. high mat)It is not universally dependent on the model.Destroys the interior, the robot can get stuck

Any neodymium strips 1 to 2 cm wide (sold in hardware stores or on AliExpress) can be used for magnetic tapes, pasted on double-sided tape or hidden under the plinth, and infrared barriers (such as the Xiaomi Mi Smart Sensor Set) are connected to the smart home system and controlled through the app.

⚠️ Note: Some Xiaomi robot vacuum cleaners (especially budget models) ignore magnetic tapes. Before buying, check compatibility in the instructions or forums (for example, on the Internet). 4PDA).

4. Hidden features: how to save virtual walls after a reboot

The main problem with the virtual walls in Mi Home is that they disappear after you reboot the vacuum cleaner or update the map, because the app stores them as temporary data.

  • πŸ”„ Export/import card: Save the virtual wall card in Mi Home (if feature is available), then import it after reset.
  • πŸ“± Mi Home Modded: A modified version of the app allows you to save walls in the cloud.
  • πŸ€– Automatic Recreation through Home Assistant: Set up an automation that will draw walls after each vacuum cleaner switch on.

Home Assistant will require:

  1. Add integration with Xiaomi vacuum cleaner through the component xiaomi_miio.
  2. Create a script that sends a team to create virtual walls when cleaning starts.
  3. Example of code for configuration.yaml: automation: - alias: "Restore virtual walls after rebooting" trigger: - platform: state entity_id: vacuum.xiaomi_vacuum to: "cleaning" action: - service: vacuum.send_command target: entity_id: vacuum.xiaomi_vacuum data: command: set_restricted_zone params: [[18000,22000.22000.26000] # Zone coordinates in mm

⚠️ Attention: Coordinates of zones in the team set_restricted_zone To find out, use the Map Editor tool in Mi Home or Valetudo.

5. Common Mistakes and How to Avoid Them

Even experienced users have trouble configuring virtual walls, and these are the most common mistakes:

  • πŸ—ΊοΈ Important map: If the robot hasn't updated the map in a long time, virtual walls can shift.Solution: run a full cleanup to rebuild the map.
  • πŸ”‹ Weak Wi-Fi signal: If you lose communication with the router, the vacuum cleaner can reset. Check network coverage in the cleaning area.
  • πŸ“ Incorrect coordinates: In manual commands (e.g., Home Assistant), it is easy to miscalculate the size of the zone!
  • πŸ”„ Firmware conflict: After software updates, the old virtual walls may not work. Check compatibility on the official website.

Another common problem is that the robot ignores virtual walls during wet cleaning, which is because the algorithms for dry and wet cleaning may differ.

  • Create separate maps for each mode.
  • Use physical barriers for wet cleaning areas.
What if a robot is stuck behind a virtual wall?
If the Xiaomi vacuum cleaner is locked in a small area due to improperly configured walls, follow the following steps: 1. Reboot the robot (hold the power button 5-10 seconds). 2. Remove all virtual walls via Mi Home. 3. Start cleaning in Room (not Zone) mode so that the robot rebuilt the map. 4. Configure the walls again, leaving enough space for maneuver (at least 50 cm from the walls).

6. Comparison of methods: which way to choose?

The choice of method depends on your vacuum cleaner model, technical skills and budget.

MethodDifficultyCostReliabilitySuitable for
Virtual Walls in Mi Home⭐ (simple)Free of charge.Medium (reset)New models with support for maps
Valetudo⭐⭐⭐ (difficult)Free of charge.Tall.Advanced users
Magnetic tape⭐ (simple)100–300 β‚½Tall.Any model you want.
Home Assistant⭐⭐ (middle-of-the-road)Free (there is a server)Tall.Smart home systems

For most users, the best option is a combination of virtual walls in the Mi Home and magnetic tape for critical areas. If you are willing to take the time to set up, Valetudo or Home Assistant will give you maximum control.

πŸ’‘

For models without virtual wall support (such as Mi Robot Vacuum 1S), the only reliable way is to physically barricade or run alternative software.

Frequently asked questions

My Xiaomi robot vacuum cleaner can't see virtual walls. What do I do?
Check: Update the vacuum cleaner firmware and the Mi Home app to the latest version. Make sure the room map is built correctly (no empty areas). Reboot the robot and router - sometimes resetting the connection helps. If nothing works, try alternative methods (Valetudo or physical barriers).
Can I set up virtual walls on a schedule?
The standard Mi Home doesn't have that feature, but you can: Use Home Assistant to automatically create/remove walls at a given time; manually turn on/off walls before cleaning (if you have Mi Home Modded); buy an infrared barrier with a timer (for example, Xiaomi Aqara).
How to transfer virtual walls to a new map after moving?
Unfortunately, virtual walls are tied to a specific map of the room. When you move: Let the robot fully explore the new room (start cleaning at maximum power). After you build the map, reconfigure the walls. If you use Valetudo, export the old map and manually transfer the coordinates of the zones.
The vacuum cleaner ignores the tape.
Possible reasons: The tape is too weak (neodymium magnets are needed); the tape is too high (optimally at the level of the robot's sensors, ~5 cm from the floor); your model does not support magnetic barriers (check the specifications); the vacuum cleaner sensors are dirty (wipe them with a dry cloth); the alternative is an infrared barrier or a physical spawn.
Can I use virtual walls for a cleaning area (not a ban)?
Yes! Mi Home has a Cleanup Zone tool (usually marked by a rectangle) that works on the same principle, but confines the robot to a dedicated area. It's convenient for cleaning individual rooms or spots. In Valetudo, this feature is called Goto and Clean Zone.