Howto: Xiaomi vacuum zoned cleaning

I was able to login again on a new installation, yay.

Working on this for HomeBridge, need to add ability for multiple zones in one room

{
“accessory”: “XiaomiRoborockVacuum”,
“name”: “LivingRoom Vacuum”,
“ip”: “xxx.xxx.x.x”,
“token”: “token”,
“dock”: false,
“pause”: false,
“zone”: [51200, 51200, 25600, 1]
},
{
“accessory”: “XiaomiRoborockVacuum”,
“name”: “Bedroom Vacuum”,
“ip”: “xxx.xxx.x.x”,
“token”: “token”,
“dock”: false,
“pause”: false,
“zone”: [25591, 25591, 0, 0]
}

Set this up over the weekend. Tried to do a zone cleanup this morning. My map is gone, so my vacuum started vacuuming a random area.

The map should only disappear under certain circumstances as described in this thread (e.g. if you start a normal, full clean without specifying an area from the robot or HA frontend, starting a cleaned process and cancelling it by pressing buttons on the robot, carrying the robot around etc…). If you ONLY used zoned cleaning, the map should never disappear. Use a regular clean to create a new map. If the map has a different orientation this time, use some of the steps above to reset the map (start clean and cancel right away) and restart the cleaning again, orientation should be different (although maybe still no the original). Repeat until orientation is back to normal and let the vacuum create the map again.

I got everything setup with zone cleaning yesterday but now suddenly the map is gone and zone coordinates point to wrong places. It could be that I used the ”main” vacuum switch on HA to stop vacuum and move to test another zone. Is there a way to hide only the control of that switch since I would still like to have access to the card it opens because it has all the control buttons? I would like to avoid this happening again (if it was the reason).

make sure to set
“dock”: false,
“pause”: false,
this prevents you from see those options.
Make sure to only use the zone cleanup options and don’t pickup the vacuum.
If you do just keep doing full cleanup till its the same orientation.

I’m going to continue this here: Zoned vacuum cleanup
any updates I make will be posted here. Feel free to post issues/pull requests.

1 Like

I think I’m unable to get the latest FW to enable zones.
When trying to use the app with Region: Mainland China the app will prompt me to select the correct region and I’m unable to check for FW updates.
Currently using region: The United States (Singapore server) as the app will not connect to the vacuum if I use “Europe”.
Any tips?

When set to Mainland China, go to Profile (bottom right) --> Settings --> Check for updates
Firmware updates should also pop up here and you should be able to download them, even when set on Mainland China.

Had the same problem last weekend when i tried to change from China to Europe.
I tried to reset the wifi but the app wont connect after that. So after 20 minutes or so, i thought f**k you and let the robot be a stupid machine. But after a few minutes, i checked the app again and it was able to connect to the robot. Maybe you need to wait a bit when connecting again.

Hey there, thx for the excellent walk through.

I was just wondering if the command “app_goto_target” is also supported?
As I wanted to check my corners with this script. But I was not able to make it work.

 vacuumGoTo:
   alias: Vacuum go to
   sequence:
     - service: vacuum.send_command
       data:
         entity_id: vacuum.robot
         command: app_goto_target
         params: [[28000, 30000]]

found my mistake :slight_smile: too many brackets

vacuumGoTo:
   alias: Vacuum go to
   sequence:
     - service: vacuum.send_command
       data:
         entity_id: vacuum.robot
         command: app_goto_target
         params: [28000, 30000]
1 Like

Yeah, since goto only needs one point (x/y) you mustn’t send a list of points.

hi. i just got a roborock and excited to find this thread. Anyway, i have to draw 2 different zone to cover my living area. I noticed the params only takes in 1 zone coordinate. How do I add 1 more zone to it?

app_goto_target only takes one point (two coordinates: [x,y]), app_zoned_clean accepts multiple zones (each zone has two points)

1 Zone : “[[x1, y1, x2, y2, iterations]]”
More than one zone: “[[x1a, y1a, x2a, y2a, iterations], [x1b, y1b, x2b, y2b, iterations], …]”

oh thank you so much for explaining!!

I am having the same problem because I’ve bought the V1 INTERNATIONAL version (that comes with manual in English, EU power cord and default English voices).

With this version its apparently impossible to connect to mainland china and get the new firmware :frowning_face:

If anyone has any idea how to connect to mainland china with a v1 international, i’ll be very thankful !

Best regards,

Please try: “When set to Mainland China, go to Profile (bottom right) --> Settings --> Check for updates
Firmware updates should also pop up here and you should be able to download them, even when set on Mainland China.”

Please report back if this works, so I can update the HowTo.

No updates are found, tried all the servers.
On Mainland China the device shows as “Offline” and unable to connect.

Try dustcloud-rooting it if you can’t get it to work any other way. Requires some computer and networking knowledge though, so if terms like root, ssh, binary image and IP-addresses seem alien take it easy with the flashing :wink:

I can assist with shorter well formulated questions if needed.

I tested it myself meanwhile and it works perfectly (at least for me). If the device shows “offline” on mainland China, then probably the token has changed. Try readding the device - you still won’t be able to access the device in the app, but you should be able to apply firmware updates through the workaround provided above.