Howto: Xiaomi vacuum zoned cleaning

Is there a way to send the vacuum to clean a room quietly and only turn on the ‘turbo’ mode once it’s really start to clean?

Every time i’m sending it to clean a room, the xiaomi s5 drives to that room on “turbo” mode (the cleaning mode it is on), and makes a lot of noise even before it starts to clean.

I was trying to adjust my script for:

  1. Adjust fan speed to quite
  2. go to a target zone (which is close to that area i’d like it to clean)
  3. adjust fan speed to turbo
  4. start cleaning the area

However for some strange reason, once the roborock is doing one action - it won’t proceed to the next actions…

I was trying to play a bit with delays \ waits with no luck…
Does anyone else have a solution for that?

Thanks a lot mitsenoj

Jose

@josemsubcn Did you add the senors are showed above this post little higher up - the flow checks this sensor to figure out if it is returning to charge or just finished the room. Wont make sense without it. The long pause is just to give time for sensor to update correctly as coms to vaccum is delayed.

1 Like

Hi!
I got a new Mi Vacuum Mop P.
I downloaded the latest frimware, from the playstore.
First time the robot created the map, and I defined the cleaning zones.
The dockingstation is in the kichen. If I select the living room, and it start cleaning, the robot, triing to cross the middle of the wall. But, if I select a cleaning area, in the living room, the robot will find the getway and go to cleaning. If I stop it, in the living room, and select the living room, and start the cleaning, it clean corretly, and after it return back to the chager in the kichen.
The scheduled tasks can’t work of cours, because the robot can’t cross the wall.
So many times, I redifinded the areas, but it didn’t help me.
How I can solve this problem?
Thanks all helps!

1 Like

Well I got the Roborock s7 and did a full clean “mapping” of the house. I tried to find my selective number for room cleaning and I put in numbers from 16-26 to see where it went. It found and worked on numbers 16,17,18,19 and 21 for some reason 20,23,24 and 26 returned invalid calibration, check configurations and number 22 did the same room as 16. Why ? is there a limit to the numbers? and why 22 and 16 did the same room. In the iphone the mihome app works fine by room selection.

Well I re-mapped the whole house again and now everything fell in line. Rooms 16-24 all mapped correctly, with no duplicates or skipped numbers

I have a Roborock S5 successfully set up in HA with Xiaomi Cloud Map Extractor
I followed the debug: true trick explained in that video to get my kitchen coordinates (couldn’t figure out how to get room numbers if that even exists on a S5 :man_shrugging: )

vacuum01

I then created the following script :

alias: Vacuum kitchen
sequence:
  - service: vacuum.send_command
    target:
      entity_id: vacuum.vacuum
    data:
      command: app_zoned_clean
      params:
        - 28625
        - 23989
        - 32288
        - 27123
mode: single
icon: mdi:robot-vacuum

My vacuum says “starting zone cleanup” but seems to ignore my coordinates and goes for a full floor cleanup :crying_cat_face:
Do you know what I missed or what would be a good approach to debug ? thanks !

2 Likes

Why don’t you use the clean segment command where you basically enter the ID of the room that was created in the app? That should be a bit easier.

I wish I could use the room IDs, that would be more straightforward but I couldn’t figure out where to find them in the Xiaomi Home app 🤷

Just use the command and test with different ids (starting from 1), you then see in the app which room the vac is going to clean. If you modify rooms in the app, they usually get a new ID (so a number higher than your actual room count) and their prior ids then just gonna be unused.

To be able to use the room cleaning you need to make sure to have finished a full clean so that the app is going to create the rooms

I’m using the Xiaomi integration plus the cloud Map extractor. I want to be able to pull out the rooms easier…but not sure how to install the MauricioXavier13/vacuum_miio. I tried via HACS, but the repository was not listed in HACs and I could not install it as a customer repository.

Looking at your Mi Home picture map, not sure if your vacuum was able to properly determine rooms.

Please start from the Mi Home vacuum function ‘Edit zone’, to make sure all your individual rooms are identified (usually coloured in different colours in the map).

After this, if you have access to a Debian environment with Python, you can get your rooms, by doing the following:

  1. Install Python Miio
  2. Follow instructions in https://www.home-assistant.io/integrations/xiaomi_miio/#retrieving-room-numbers.

Please let us know if you succeed, as getting this to work will make your life MUCH easier in getting HA to control your vacuum.

1 Like

Trying to retrieve the room IDs with miiocli was kind of a failure as described here.

The good news is I managed to find the right combination in my script using the zone coordinates but with a different service :tada:

service: xiaomi_miio.vacuum_clean_zone
target:
  entity_id: vacuum.vacuum
data:
  zone:
    - - 28625
      - 23989
      - 32288
      - 27123
  repeats: 1
1 Like

Do you know if it’s possible to add repeats to this method?

Hi, in the script is it possible to add the suction power? Thanks

Same problem here… were you able to resolve it?

May I ask you how did you get the zone coordinates?

I got the coordinates following this video, especially at this precise time Roborock Vacuum // Zone & Voice Assistant Control in Home Assistant - YouTube
The trick is to use debug: true
It’s very well explained and following this guy’s tutorial I was able to create this card

Its yaml code is :

type: vertical-stack
cards:
  - type: custom:xiaomi-vacuum-map-card
    map_source:
      camera: camera.xiaomi_cloud_map_extractor
    calibration_source:
      camera: true
    entity: vacuum.vacuum
    vacuum_platform: default
  - type: button
    tap_action:
      action: toggle
    entity: script.vacuum_kitchen_with_zone
    show_icon: true
    show_name: true
    name: Vacuum Kitchen
    show_state: true

The button’s script above (script.vacuum_kitchen_with_zone) is :

alias: Vacuum kitchen with zone
sequence:
  - service: xiaomi_miio.vacuum_clean_zone
    target:
      entity_id: vacuum.vacuum
    data:
      zone:
        - - 28625
          - 23989
          - 32288
          - 27123
      repeats: 1
mode: single
icon: mdi:robot-vacuum

Hope this helps !

2 Likes

Do you know if you can select the “Cleanup Mode” as part of your script?
I assume this is possible via “Send_Command” but I don’t know where to find a list of command codes.


Selecting Vacuum Only prevents the unit from cleaning the mop, a waste when cleaning carpet only rooms.

Sorry for the late response.
I don’t know much about those vacuum options and I heavily rely on video tutorials and posts on this forum.
I found the correct syntax above after quite some research and tests.
It really is a hit-and-miss experience :sweat:

I heavily rely on video tutorials and posts on this forum.

Which videos or posts?
I’ve not seen any to change to vacuum only mode. I wonder if it is unique to the Max V Ultra (since it can clean the mop)