Help with zone cleaning parameters - Xiaomi vacuum

@AlmostSerious: quick tip, discover this yesterday… If you want to set the vacuum to mop mode, just like the app, here is a script for that:

   aspirador_set_mop:
    sequence:
      service: vacuum.set_fan_speed
      data:
        entity_id: vacuum.aspirador
        fan_speed: 105

Fan speed 105… Very odd. You will se in the app that mop mode is selected.

Very cool!

2 Likes

Yes that will happen if the vacuum starts a new fresh cleaning job. Then it will relearn the map from scratch. It can happen that the map turns. Has something to do with the orientation of the base i believe. If you only do zoned cleanups this will not happen.
105 is correct and works fine for mopping. I actually have my vacuum under the couch and for mopping ill first let it come out to a coordinate. Then let it pause to add the mop and the continue the zoned mopping. A lot of nice stuff is possible with this little thing :slight_smile:

1 Like

Amazing machine indeed… Incredible how much technology they came up with in such a small package. So many sensors and AI.

About the map reset issue: have you tried to set just a huge box around your house so if you need a full cleanup just use this zone to reach all? Maybe this will avoid the start full cleanup command the map might not reset itself, since it is a zone.

Yes that works well.
Alternatively, you can do a zone for each room and let it clean all of them in one command.
I actually have both, one big zone for daily cleanup, and several room zones if i decide to let it clean one specific room or area only.

1 Like

Nice! Thanks for your tips…

Using only zones cleanups, are your zones coordinates and commands stable? No map resets?

If this map “module” works, we can finally ditch the app and go completely offline and use only HA. Very cool stuff!

Thanks!

Yes it works very well… just be sure that the base approximately keeps the same position and nobody presses the “Full Cleanup” on either HA or the Bot itself. Then its very stable!

Little tip for getting the coordinates:
Use the app Flolevac https://xiaomi.flole.de/
Simply paint your Zone or your Coordinate as you would within the MiHome App and then long press on start. It will copy the whole Code you need :slight_smile:

3 Likes

Very nice! Will do that.

I use this app too for copying the coordinates, very easy to use.

Thanks for your help!

How would be such a command to clean all zones in one ?

you could do it like this:

alias: "XYZ"
sequence:
  - service: vacuum.send_command
    data:
      entity_id: vacuum.xiaomi_vacuum_cleaner
      command: app_zoned_clean
      params: [[16708,20845,29958,32195,1],[22939,31583,24789,33983,1]]
1 Like

Just putting a comma in between will work? Nice shot! Will try this …or create a zone capturing all single zones

Do I have any idea how to template the amounts of cleaning an area? All tries failed and vacuum will return to station directly after starting cleaning

take a look on the map , if u start cleaning manual , it recreate map and somtimes it rotates and coordinates now wrong. to clean all zones u can use scripting like

alias: "Vacuum kitchen"
sequence:
# Go to starting point in the kids room
  - service: vacuum.send_command
data:
  entity_id: vacuum.xiaomi_vacuum_cleaner
  command: app_goto_target
  params: [26000,24750]
  #Wait untill done
 - wait_template: "{{ states.vacuum.xiaomi_vacuum_cleaner.attributes.status == 'Idle'}}"
 - service: input_number.set_value
data:
  entity_id: input_number.vaccum_progress
  value: 1
- delay: '00:00:30'
#clean room
- service: vacuum.send_command
data:
  entity_id: vacuum.xiaomi_vacuum_cleaner
  command: app_zoned_clean
  params: [[26496,23720,28796,26120,3]]
  #Wait untill done
  - wait_template: "{{ states.vacuum.xiaomi_vacuum_cleaner.attributes.status == 'Returning home'}}"
  - service: input_number.set_value
data:
    entity_id: input_number.vaccum_progress
    value: 2
- delay: '00:00:05'
#Stop going home
- service: vacuum.stop
  data:
    entity_id: vacuum.xiaomi_vacuum_cleaner
- service: vacuum.send_command
  data:
  entity_id: vacuum.xiaomi_vacuum_cleaner
    command: app_zoned_clean
    params: [[20724,16754,25624,20740,3]]
1 Like

It seems that there is no reliable way to work with zones now…

I had set all commands to interface with the vacuum with zone cleaning to avoid erasing the map by starting a full cleanup.

Everything was working great. I just picked up the vacuum from the charging station to clean the main brushes and put it back again were it was. Started a zoned cleanup just like before and the map was mirrored, inverted everything.

I did not moved the charger dock, just picked up and put it back exactly where it was.

I am about to give up on zone cleaning using HA… Really sad but found it too unreliable for now. :cry:

Weird, never happend to me… however since my Robot is under the couch i cannot pick it up from the charging station. So instead i let it drive out, clean it, and then let it drive back.
It has been stable for me for weeks. Maybe give this a try.

For me even a return to station via hardware buttons will erase the map. How do you put the vacuum back to the station?I didn’t check if resuming cleaning will also delete the map . I can let it come out while it cleans a zone …take it …clean it and push resume button on it.

But to get rid of that I just make a full clean and map is back…after this I can use zones cleaning … anyway zoned cleaning is meant for you exceptions not daily usage

Weird, i use the return to station button and resume cleaning button all the time. Maybe you need a firmware update on the Bot?

No update available…how exactly did I setup this cloned cleaning.my map apparently turned when I made return … Zone was totally wrong

Hello @AlmostSerious!

The multiple zones trick did not work here, got this error:

Error loading /config/configuration.yaml: while parsing a block mapping
  in "/config/includes/packages/xiaomi_vacuum.yaml", line 360, column 9
expected <block end>, but found ','
  in "/config/includes/packages/xiaomi_vacuum.yaml", line 362, column 46

This is my script:

  aspirador_zona_mop:
    sequence:
    - service: input_select.select_option
      entity_id: input_select.estados_de_succao
      data:
        option: Pano úmido
    - service: vacuum.send_command
      data:
        entity_id: vacuum.aspirador
        command: app_zoned_clean
        params: [[17721,25369,27121,32169,1]],[[18080,20509,22930,25659,1]],[[25122,22132,26122,25682,1]]
    - service: script.aspirador_alerta_iniciando

Did it work for you?

Thanks!

You have too many brackets in the Zone. Its this format: [[Zone1],[Zone2],[Zone3]]

1 Like

Will give it a shot! Thanks!