Howto: Xiaomi vacuum zoned cleaning

I just had some time and tried to build a string containing all the zones I want to clean from the input_booleans and give it to the app_zoned_clean command in one go. I then realized that the list that is given to the command in fact is no string and as it seems it is not allowed to be a string.
It didn’t work everytime I tried to use data_template instead of data for the command like this:

  - service: vacuum.send_command
    # not working!
    data_template:
      entity_id: vacuum.roborock
      command: app_zoned_clean
      params: [[21000, 23200, 23900, 27200, 1]]

or this

  - service: vacuum.send_command
    # not working!
    data_template:
      entity_id: vacuum.roborock
      command: app_zoned_clean
      params: '{{ zones }}'

I think data_template interprets every input paramater as string. Because I cannot use data_template I also can’t give it a list via script. Everytime I tried, the vacuum said it started the zoned_cleanup, but it didn’t have any zone and just started a full cleanup instead.
Also it seems to be impossible to make one script that checks an input_number and changes the number of times the zone should be cleaned according to it, because we can’t use the input_number as a parameter in the list without templates.
Did nobody else encounter this problem or am I just missing something obvious?

Also tried and couldn’t use a data_template for that service, I suppose it is a limitation on the service definition.

Still then, as a heads-up, I tried building a string with 7 division coordinates (fixed ones) and it stopped after the 5th, it seems like a limitation, because it ran ok until the 5th and stopped. This would be ok if it wasn’t for this limitation, because actually vacuum doesn’t go to the dock between different division coordinates.

Hello.

May I ask where did you get that information about the v1 and the fact that it won’t get the updates with the ability to save maps and no-go areas?

Thanks

Am i being dense … how do you find the x y cordinates …trail and error?

are you guys having issues with regular cleanup mode in latest firmware? Zone clean up works perfectly but now my xiaomi vac v1 is randomly missing entire areas (sometimes entire room) to clean which has never happened before on older firmware.

Flolevac is an Android app that can help you:

Basically, yes. There are different methods described in this thread how to find out all the coordinates that you need - for example by creating a map yourself with the respective coordinate grid or use the app FloleVac to manually set your cursor to the points where you want your area to be - the app then tells you the coordinates (as far as I know)

I had a weird issue where it wouldn’t go into a room because it said there was no path - looking at the map it apprarently went by the room when the door was closed but would not update the current map when right in front of the clear path… But I got another fm update just last night - maybe this was a bug and got fixed?

I got it from the post above by mouth4war. Howto: Xiaomi vacuum zoned cleaning

So do we/I need to update the app in order to up date FW for my V2 bot, and does this need the API key will be changed and I’ll have to go throw this process to obtain it again ?
Thanks :blush:

In the app you can check if there is a firmware upgrade and then indeed install it.
API should stay the same so no need to do anything there.

Just got the vacuum today. Before integrating with HASS I am trying to make it work.

Currently I use Chinese server in Mi Home app (at the very beginning was the only way to put it in developer mode and integrate Xiaomi sensors in HASS), now after adding the Vacuum it says to change to local server (I am in Europe), but if I do I loose all Xiaomi other devices.

How did you all manage?

How do i use the services call to send a goto command?

Tried like vacuum.send_command
Than input
{
“entity_id”: “vacuum.roomba”,
“command”: “app_goto_target”,“params”:"[26700,26800]"
}

Nothing happens. Although the same stuff with command:app_zoned_clean and params [[26600,21800,28727,26800,1]]
initiates the zone cleaning… Using the v2 roborock

1 Like

This script works for me:

roborock_come_out:
    alias: Roborock come out  
    sequence:
      - service: vacuum.send_command
        data:
          entity_id: vacuum.xiaomi_vacuum_cleaner
          command: app_goto_target
          params: [25500,24800]

Why is your entitiy roomba?

Hi Guys,
I successfully integrated my vacuum v1 to HA with zoned cleaning by following this great forum. But I’m facing to this strange issue.

  1. First, run the clean a house - map is generated, ok.
  2. I did an automation script to run zoned cleaning every day - time schedule.
  3. First scheduled cleaning goes well every time.
  4. Next day, the cleaner is starting to generate a new map (of course rotated) in the middle of zone cleaning.

Any idea ?

1 Like

Well the script works for me as well. But i cannot call it from the services tab in HA. Nothing happens.

P.S. Roomba - was too lazy to rename in automations so just had the entity that way

Try

{
“entity_id”: “vacuum.roomba”,
“command”: “app_goto_target”,
“params”:[26700,26800]
}
1 Like

Hi,

Thanks for this post, I started it and it works perfectly.
A question… my robot is not going straight, when I start a zoned cleanup it re-draws the map and moves it a bit… any idea ?
Can it be because some doors are not fully opened so its referential changes ?

And do you know the command to turn it off once the cleanup is done ?

Thanks,

!!!PLEASE DONT UPGRADE VACUUM FIRMAWARE IF OLD SETUP WORKS! XIAOMI IS EVENTUALLY CHANGING SOME STUFF AND ROBOT CANT BE ROOTED AFTER ! So please hold on for upgrading.of not this forum will be flooded with those messages like: Cantrell root my robot etc

Agreed. Would be nice to know which latest version can be rooted. There are some minor upgrades that are interesting and good to have.

I am rooted with 3.3.9_003416 and works well, but came out 8 new firmware since that release, now they are at 3.3.9_003600

U might want to join the dustcloud discord server …they discuss a lot …there will be another release from valetudo with zoned cleaning via selection on map feature hit stay tuned …not released yet