Vacuum Interactive Map Card

I think the really problem is detect point inside map without flolevac app. If will be possible creare an autodetect point procedure based on map. will be fantastic card !!

tell me more, kind sir! when i try to add iframe card i get just a blank white screen… what is that sorcery with ngnix addon?

Apparently something is still wrong with the calculation of my coordinates.

Here are my coordinates from valetudos config file.

      "hall",
      [
        [
          25123,
          24995,
          26603,
          27087,
          1
        ],
        [
          25024,
          22918,
          29121,
          25053,
          1
        ]
      ]

According to my earlier post, those two zones should become

[25123,24113,26603,26205]
[26717,26147,28381,28282]

But using these, gives me the following cleaning result:

Selection_007

Its cleaning the zone around its homebase successfully but the big white zone above is just cleaned in the “middle” instead of the whole space.

Any ideas?

hi, i’m not sure if anyone faced the same problem. I’ve tried using floevac to extract the cooridinates. however when pressed into map, it keeps prompting for acct verification, until my acct is blocked. Could I check if there is other way to obtain the coordinates?

Hello!
Can you please help me a bit?

I sent the vacuum to 3 points (25500,25500 & 25500,26000 & 27500,24500).
I took a screenshot from the xiaomi app.
Croped the image, rotated it 270 degrees.
In GIMP I “translated” the 3 above points to x & y pixel coordinates.

Then how I can define zones? What do you mean by " Enabling debug in settings"?

Thank you!

Hint: if your calibration will turn out inaccurate use points placed on rectangle on maps edges (see Xiaomi Vacuum Interactive Map Card)
Example configuration with debug enabled:


    - type: custom:xiaomi-vacuum-map-card
      entity: vacuum.xiaomi_vacuum
      map_image: '/local/custom_lovelace/xiaomi_vacuum_map_card/map.png'
      debug: true
      calibration_points:
        - vacuum:
            x: 25500
            y: 25500
          map:
            x: 466
            y: 1889
        - vacuum:
            x: 26500
            y: 26500
          map:
            x: 730
            y: 1625
        - vacuum:
            x: 25500
            y: 26500
          map:
            x: 466
            y: 1625
      zones:
        - [[25500, 25500, 26500, 26500]]
        - [[24215, 28125, 29465, 32175]]
        - [[24245, 25190, 27495, 27940], [27492, 26789, 28942, 27889]]
        - [[28972, 26715, 31072, 27915], [29457, 27903, 31107, 29203], [30198, 29215, 31498, 31215], [29461, 31228, 31511, 32478]]
1 Like

Hi @papaperestan,

Please take a look at the blog post I have written:

and feel free to ask further questions if you find anything not sufficiently covered for your scenario.

Cheers!

1 Like

Guys, how do I enable debug mode if I use the Mi Home app?
Could anyone tell me instructions?

It might be me, but didn’t find this in the Mi Home app.

“Enabling debug in settings, drawing zone in Zoned cleanup mode and holding Start button. Note: this method also works for other modes.”

It is in cards configuration, not in Mi Home (see: Xiaomi Vacuum Interactive Map Card)

Hello Acme, you wrote: “croped the image, rotated it 270 degrees” are you shure ? have i to apply this rotation to my map screenshooted from Mi-home ? thanks in advance.
Gabriele

You can rotate rotate map if you want to, it is not necessary.

Thanks, that means I was following a wrong path.
Will try that at home. :slight_smile:

Thank a lot for your answers Mr 3_14 :slight_smile: i tryed to track some point in map of my home took from mi-home becouse Flolevac seems unable to pick up the map from server, but without success :frowning: .I want try to retrive another time anyway next days. There is not another method to recognize some coordinate point across the map i see.

There is a way, you have to send commands using Home Assistant dev tools and check in Mi Home where you end up.

ah ah :slight_smile: I have already tried this method :-), but all the times my vacuum ends up against the wall :-). If you look my map you can see the vacuum garage point… Please try to suggest me some test point to send my vacuum and i will try. ps My vacuum is the new model Roborock S6

okay, I’m still lost…
I’ve added this to configuration.yaml

logger:
default: debug

How does it help me finding the coordinates?
I understood that this part is where I’ll draw the zones on my map:

zones:
- [[25500, 25500, 26500, 26500]]
- [[24215, 28125, 29465, 32175]]
- [[24245, 25190, 27495, 27940], [27492, 26789, 28942, 27889]]
- [[28972, 26715, 31072, 27915], [29457, 27903, 31107, 29203], [30198, 29215, 31498, 31215],
[29461, 31228, 31511, 32478]]

And probably this part should tell me where the vacuum is on my map.

calibration_points:
- vacuum:
x: 25500
y: 25500
map:
x: 466
y: 1889
- vacuum:
x: 26500
y: 26500
map:
x: 730
y: 1625
- vacuum:
x: 25500
y: 26500
map:
x: 466
y: 1625

But where can I get these coordinates?

Yes the documentation is kind of confustion in my opinion (I’m also new so maybe thats it). Anyway, you use flovac, or mi-home apk, etc to draw boxes on each room and get those coordinates. Once you have each room which is defined by (x,y,x,y) I suggest printing your own map with every corner defined. Then pick 3 spots on the map where you could make a right triangle by placing the vacuum in the middle of 3 rooms. Once you think you have an idea where, manually send the vacuum to spot 1 of 3 and screen shot it. You will send the vacuum by using “Developer tools -> services” and selecting vacuum. Type in the send command with coordinates of what you want spot 1 to be. Next do spot 2 the same way: sending the robot and taking a screenshot. Same for spot 3. Open each of your pictures of each spot in microsoft paint or gimp or similar and get the MOUSE X,Y coordinates of your spots and write those down. Now you have your calibration spots, zones, and map coords. Make sense?

Why does my card formatting get so messed up every time I type it out nice and save it? I LITERALLY copied the example only changing my coordinates and this is the garbage that comes back when I save. Things are NOT working.

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

This is not the card’s fault, the formatting is done by Home Assistant.

Is there anything I can do to fix it… it sets off my ocd :stuck_out_tongue: ?