Howto: Xiaomi vacuum zoned cleaning

Thank you for helping. Here it is:

vacuum_positioning:
  alias: "Go to marked spot"
  sequence:
    - service: vacuum.set_fan_speed
      data:
        entity_id: vacuum.xiaomi_vacuum_cleaner
        fan_speed: 105
    - service: vacuum.send_command
      data:
        entity_id: vacuum.xiaomi_vacuum_cleaner
        command: app_go_to_target
        params: [27150,27950]

Oh man I just spotted it


It’s goto, not go_to

Doh!

1 Like

Would definitely also like to hear if anyone has a solution for this.

Sometimes you just slightly move your dock and all your map and coordinates stop working


It would be nice to be able to somehow lock the map instead of having it refreshed every time a regular cleanup is carried out.

Hopefully we’ll be able to do something with the new firmware update rolling out now where maps can be saved!

finally got it working - thanks for the code on github, @stanvx! A great help :smiley:

I noticed when I use Flolevac to create my room coordinates, that the firmware loaded on my Roborock S50 is at 3.3.9+011518, whereas the most recent version showing seems to be 3.3.9_001632.

The Mi Home app doesn’t show there are any firmware updates available - anyone know what gives here?

Which one? I updated mine a couple of days ago to 3.3.9_003416.

There has been a new firmware release just recently. It’s only available on Chinese servers so far as far I know. It adds the ability to save and delete a map via a button (not sure yet how this changes the current behavior of the robot), but it also enables you to use no go areas and virtual magnetic lines (to stop the robot to go a across these lines).

As ciB says still only on Chinese servers but I assume it will come to other servers soon as well.
The new version is 3.3.9_001632 (I’m on 001518 btw)
See also this screenshot https://i.imgur.com/Ho9DtJj.png

That seems the Android app and mine is actually the iOS.

Still then, that should NOT mean current firmware completely different (latest appearing to me in China server is 3.3.9_003416). Your numbering seems lower, yet more advanced?

Does anyone understand this logic?

Yes, also keen to know what the story is with firmware versions


I used the flole app to upgrade my vac to a newer version than was available in the mihome app, worked without problems but I don’t see this export map etc
only as a screenshot to wechat etc
 But I did notice that upgrading firmware deletes the current map
in the process of creating a new one. But using the flole app to create zones is great and fast :slight_smile:

I just wanted to second this and say this is how I did it (thanks rohan!). This method worked great. I built a spreadsheet that took in the x1, y1, x2, y2 coordinates in meters (which I guess based on a point right in front of the vacuum when it is docked) and then outputted the values in the correct units for the vacuum (formula used: =25500+(meters*1000). This meant that I would be using negative values sometimes for the meters if s room was ‘to the left or below’ the starting point of the vacuum on the map.

Also if you want to see where exactly the starting point is (i.e. coordinates 25500) then just send the command above but put the units as 25250,25250, 25750,25750, that way you will get a square zone on the map and you know that the centre of that square is 25500 for x and y.

Craig

I assume it’s Gen1 vs Gen2 robots.

Got a dumb question (like normal) - I have a list of scripts presented through my Vacuum tab, and voice control via Google Assistant working (well - I can turn lights off and on)

How on earth do I call a script like this one? My scripts domain is exposed to Google Assistant, but it doesn’t work no matter which way I try to call it - Hey Google, Bathroom doesn’t work


vacuum_bathroom:
alias: “Bathroom”
sequence:
- service: vacuum.set_fan_speed
data:
entity_id: vacuum.roborock
fan_speed: Balanced
- service: vacuum.send_command
data:
entity_id: vacuum.roborock
command: app_zoned_clean
params: [[20912,32474,24262,35224,1]]

Scripts are called by saying Start (mind you you can not stop a script).
So “Hey google, Start vacuum bathroom” will start the script.

i think you can also say “ok google, activate script name”

You can say "ok google, activate script name " or "ok google, start script name ".
I’ve only got one vacuum script at the moment, and I aliased it “The Vacuum”, so to call it I say “ok google, start The Vacuum” and away it goes.

Personally, I created a switch so that I can say “Hey Google, Turn on the Vacuum.”

vacuum:
  value_template: '{% if is_state("vacuum.vacuum", "cleaning") %} on {% elif is_state("vacuum.vacuum", "docked") %} off {% else %} failed {% endif %}'
  friendly_name: "Vacuum"
  turn_on:
    service: vacuum.turn_on
  turn_off:
    service: vacuum.stop

I use IFTTT and node-red handles my command. I can say “Hey Google, clean the <room/area name>” and my robot gets the command to clean the zone that I set for those names.

That’s the v2. I’m guessing you have the v1, like me. The latest fw for ours is 003514 and it doesn’t have the features that the v2 got with 001632.

Thread discussing 003514 says its rootable - https://www.roboter-forum.com/index.php?thread/31985-firmware-3-3-9-003514/

EDIT: Bad news for v1 owners. Looks like our vac will not be getting virtual walls, map saving etc.