Vacuum Interactive Map Card

Hi 3_14,
great job thanks from me. I look forward to seeing the results

ok
I tried your suggestion and it works so parameter 16 is equivalent to the kitchen, 17 to the lounge, but i didn’t find any other rooms. Anyway is an excellent starting point :slight_smile:

Perfect, you only need to try each number until get ids for each room. Not an interactive map… but completly functional.

Sorry, i made a mistake. I found only 2 rooms 16 and 17, any other number tried gives me an error. Any suggestions about it?

I observed that if you edit manually rooms in mi home app, adding walls or merging rooms, it take another number, but the next. You coluld try numbers before 16 too. It was my case buts could be different for you

Thanks @3_14 Feel free to use it for your docs or if you need help writing them let me know. I love the card. I need a little more guidance on how to setup a weekly schedule to do certain zones like this:

Monday, Wednesday, Friday clean Kitchen
Tuesday Thursday clean Master
Saturday clean Guest
Sunday clean everything

I believe I made it! If only I could test it without waking up the baby… :shushing_face:

Yes it’s true! It works!!!:+1:

1 Like

How do you do that? What is the service called for that? Can you show me an example of your service called, when you clean room 16?

Hi, this is the sequence command i use to clean room number:
service: vacuum.send_command
entity_id: vacuum.vacuum_name
command: app_segment_clean
params: [16]

I noticed that usually the number 16 corresponds to the docking area
For the moment i find just kitchen rooms and lounge area

1 Like

okay, I think I found out the coordinates.
The layout of the number:

Left up corner, Right up corner
Left bottom corner, Right bottom corner

Gardrobe:

25250-27000 28500-27000

25250-25250 28500-25250

Corridor:

24130-28150 25250-28150

24130-30150 25250-30150

Kitchen:

23750-31025 25125-31025

23750-29650 25125-29650

Lobby:

23130-30150 24130-30150

23130-28650 24130-28650

Bathroom:

23130-33650 24880-33650

23130-32150 24880-32150

Bedroom

25250-31000 28750-31000

25250-27250 28750-27250

Livingroom:

25125-31400 30125-31400

25125-29650 30125-29650

It still doesn’t make sens for me, what the calibration points are in the card?
The layout of the zones aren’t clear either…

Hi, how did you discover cordinates ?

well, I’ve started from the fact that 25500, 25500 was the docking station.
sent the roborock to 26000, 25500 then 25500, 26000 and so on…took screenshots and made a grid using the 5 screenshots.
It helped me to find out a scale, which helped me to find al the four corners of the rooms.

i also tryed in the past your solution but my vacuum gone crash across the wall :slight_smile:

Try baby steps!
25500, 25500 worked for me, as the coordinates of Docking statiton.

Try sending it to 25500, 26000
Do a screenshot
Send to 25500, 26500
Do a screenshot
26000, 25500
Screenshot
26500, 25500
Screenshot

Do a clean screenshot from your map in the end.
I’ve used Figma, and drew two lines (vertical, horizontal) to locate the vacuum cleaner on every screenshot.
Merged the lines, added a unique color, and made a note for the coordinates of every color. (blue 26500, 25500; red 25500, 26000, etc…)
then moved them to the clean screenshot, of the map.
Created a grid on the clean map, and you’ll have 4 coordinates and a grid.
This way you’ll have a sense how big is one 1x1 square on your grid, and you’ll be able to measure all the coordinates of the rooms using it.

This is how I succeeded.

The only thing I don’t know right know is what to do with these coordinates. :smiley:

@simcole @3_14 I’d appriciate some input :slight_smile:

Hi, awesome work, spent quite a lot of time reading through the whole thread but I am failing to find out whether it is possible to plot/overlay robot’s progress/path over a static (not returned by robot’s “camera”) image. Is it?

Hi, it is not possible yet, but I am working on it. For now you can check out this solution: Xiaomi Vacuum (rooted) live map with floor plan

WTF Bro :D:D:D … You made me laugh so hard :D:D… I gave up with this card, because I wasn’t able to calibrate the map good enough, and you managed this. But you describe the whole process with ease and end your post with “The only thing I don’t know right know is what to do with these coordinates” … Thanks for that :D:D

1 Like

I simply don’t understand.

Here is @simcole’s example:

calibration_points:
  - map:
      x: 817
      'y': 624
    vacuum:
      x: 25500
      'y': 26000
  - map:
      x: 817
      'y': 1088
    vacuum:
      x: 25500
      'y': 18000
  - map:
      x: 399
      'y': 1071
    vacuum:
      x: 18000
      'y': 18000
entity: vacuum.s5_vacuum
map_image: /community_plugin/lovelace-xiaomi-vacuum-map-card/map.png
type: 'custom:xiaomi-vacuum-map-card'
zones:
  - - - 12973
      - 22562
      - 28773
      - 27712
  - - - 14347
      - 8112
      - 23397
      - 22612
  - - - 23406
      - 12086
      - 29606
      - 22686
  - - - 14763
      - 8327
      - 29563
      - 22827

How should I insert my coordinates?
What are map x and ‘y’ or vacuum x and ‘y’?
In which order should I add zones?

Important to note that X/Y from map start from lower left. My graphic program used upper left to identify coordinates. Took me a while to figure that out.

Actually it should be from upper left… Are you sure your vacuum coordinates are ok? Are they taken from Valetudo?