Howto: Xiaomi vacuum zoned cleaning

Yes , just fill-in the new token in the configuration

Itā€™s not guaranteed that the problem you have has to do with the servers.

Iā€™m thinking it could be an issue with the router. I use an Ubiquiti Amplifi mesh system. I also noticed that when I integrate with HA, not only does it go offline in Mi Home, it also no longer shows on my routerā€™s list of connected devicesā€¦ but it still correctly shows status in HAā€¦ Weird!

Iā€™d like to know if this is possible as well. I have a large house with multiple zones that I would like cleaned in a certain order. Sending it to clean another zone without docking seems to not be possible.

1 Like

Normally you can setup multiple zones in one cleaning, the same as you do in the Xiaomi app

Like this : params: [[18931,21286,22581,23936,1],[21250,23964,22100,25464,1]]

Did anyone run into the issue that robot has issue with multiple overlapping areas? I defined three zones as part of single cleanup and Roborock just randomly visits all zones and goes back to dock. It works fine when I create similar overlapping zones via Mi Home app. I a bit suspect that problem could be that large part of the zone is unreachable, but it did not really had a problem with that before in app.
Config :
action:

  • data:
    command: app_zoned_clean
    entity_id: vacuum.xiaomi_vacuum_cleaner
    params: [[22300,24200,28800,22300,1],[22300,25500,24400,20800,1],[17400,21860,22300,20800,1]]
    service: vacuum.send_command

Iā€™m aware and I do have multiple zones called in a single zone clean command. However, my situation is not that simple.

I have a large house with 18 zones and some of the occupants of the house are retirees and are at home most of the day and donā€™t awaken until 8:30 - 9:00. I start the vacuuming (using multiple zones in params) at 7:30 at the side of the house that becomes unoccupied by that time. The vac is done with those zones by 8:30 and then goes to the carpet on the opposite side of the house, en-route it traverses a large tiled area but I donā€™t want it to vacuum there yet because the noise of it going over the grout lines is too noisy for occupants that may still be asleep in nearby bedrooms. After doing that carpet, I have it going back to the tiled areas.

So in essence I need to call at least 3 ā€œapp_zoned_cleanā€ commands with different params arrays. But between each command it has to re-dock for the next ā€œapp_zoned_cleanā€ command to be able to fire, as Iā€™ve learned that it can only fire if the vac is in a docked or idle state. I decided to take advantage of the re-docking and when it re-docks my automation checks the battery level and waits until it hits a certain threshold before firing the next zone clean command.

I tested a bit more and it doesnā€™t work even with single area specified. I draw same area in the Mi Home app and it cleaned the team without any issue.

  1. Did you try the last script with

params: {{ zones }}

instead of

params: '{{ zones }}'

  1. and did you try to pause the vacuum after cleaning and than start the next zone?

Yes I have tried both.

  1. The problem is that data_template is not working, even if I donā€™t use variables. So it does not even matter if I put the ā€™ or not.
  2. Yes I did try to pause/stop the vacuum on the way back to the dock, but it did not work. While the pause function does work while cleaning, it does not work when the vacuum is returning to the dock. If you know a way to make this work, I would love to use it.

I also had that problem, when I gave an illegal parameter to the app_zoned_clean command. For example it seems to be important that the params are not a string, so you should not use ā€œā€ or ā€˜ā€™. Furthermore it seems that you are not allowed to use data_template. This will also result in that behavior.

Try to compare your yaml exactly to the example from the first post:

vacuum_kitchen:
      alias: "Vacuum the kitchen"
      sequence:
        - service: vacuum.send_command
          data:
            entity_id: vacuum.DustyMcDustface
            command: app_zoned_clean
            params: [[26500, 20500, 29000, 23000, 1]]

try this Zone cleaning parameters - Xiaomi vacuum
Add zone and reps for Xiaomi vacuum #19777

1 Like

The same. Nothing happens. Is anyone able the to send roborock via app_goto_target?

The multiple zoned cleaning is working via NodeRED.

Do not use " around those params like this:

"params": [[25124,24170,29824,28870,1]]

Same here.
Can not use ā€œapp_zoned_cleanā€ because of changing coordinates.
My robot drives into an other rom every time the map is new created
or driving a few seconds backward and hang up on charging stationā€¦

Does anyone have a solution for this ?

Never do a CLEAN map, otherwise the map is deletedā€¦ Always use zone cleaning, also for a full house cleaning

@Dielee

Just to add to this. Make sure you have the latest firmware installed so that you can save the map.

However, that being saidā€¦ I recently did a restore on my vacuum and reloaded the firmware, this of course caused it to lose the saved map, but I ran the zone clean commands using the coordinates from before the restore and it proceeded to make a new map as it correctly cleaned the zones. The key to this I believe is: 1) do not move the charging base; it needs to always be the same starting point, 2) make sure the charging base has the proper space around it; the manual states it must be against a wall, with 1.5 feet of empty space on either side and 4 feet of space in front of it. Before I properly situated it, I had trouble with it navigating correctly. It would be unsure of itā€™s starting location and even get lost when moving to a new zone. After situating it as per the manual, those issues disappeared.

1 Like

Thank you @e1miran!

I changed the location of my dock and itā€™s working now !
It had not enough space to both sides.

If someone searching for code and have the same problemā€¦

Do not make a ā€œCleanā€ in MiHome app.
Use zoned cleanup and clean all zones in one script if you want to clean the whole house.

I using this:

scripts.yaml

  alles_saugen:
    sequence:
      - service: vacuum.send_command
        data:
          entity_id: vacuum.xiaomi
          command: app_zoned_clean
          params: [[22327,22376,26877,26826,1],[26940,25726,29990,26826,1],[25786,26860,27886,30410,1],[28126,26794,29976,30394,1],[27634,24133,30834,25733,1]]

  kinderzimmer_saugen:
    sequence:
      - service: vacuum.send_command
        data:
          entity_id: vacuum.xiaomi
          command: app_zoned_clean
          params: [[23264,27007,25314,30357,1]]

  badezimmer_saugen:
    sequence:
      - service: vacuum.send_command
        data:
          entity_id: vacuum.xiaomi
          command: app_zoned_clean
          params: [[28126,26794,29976,30394,1]]

  wohnzimmer_saugen:
    sequence:
      - service: vacuum.send_command
        data:
          entity_id: vacuum.xiaomi
          command: app_zoned_clean
          params: [[22327,22376,26877,26826,1]]

  flur_saugen:
    sequence:
      - service: vacuum.send_command
        data:
          entity_id: vacuum.xiaomi
          command: app_zoned_clean
          params: [[26940,25726,29990,26826,1]]

  kuche_saugen:
    sequence:
      - service: vacuum.send_command
        data:
          entity_id: vacuum.xiaomi
          command: app_zoned_clean
          params: [[25786,26860,27886,30410,2]]

Thanks all!

Helloā€¦

This works perfectly and I love the new ā€œtoyā€ but how do I stop the map getting wiped when I move the vacuum upstairs to clean please? It is a right pain in the ā€¦

Cheers
Mark