Vacuum Interactive Map Card

Currently basic authentication is the only option for valetudo, which is the slight incovenience when opening lovelace and having to type credentials again. Something like HA generating a jwt token and valetudo validating it would kind of fix it.

If I reset the vacuums map in the app, without moving the docking station, will I have to recalibrate the map in this card?

1 Like

@pkilla have you tried using miio integration instead of mqtt?

@ReDaLeRt have you tried authentication with SSH key? I still haven’t implemented password support

@luis_teixeira nice solution, congrats :+1:

@Maximus97 it depends on your vacuum, but recalibration shouldn’t be necessary

just now and by the looks of it, zoned cleaning seems to work. i will have to fine tune it to my needs now. thanks for pointing that out.

Ok, i have a very strange thing that i cannot sort out. Maybe somebody can enlighten me.

Here is a screenshot from my bathroom zone that i configured using the valetudo webinterface

zone_defined_in_valetudo

These are the bathroom zone coordinates from /mnt/data/valetudo/config.json

      "bathroom",
      [
        [
          26717,
          25138,
          28381,
          28794,
          1
        ]
      ]

This is the cleaning result (green area) i get when i use these coordinates in a homeassistant automation

ha_zone_result

You can see that it is completely off.

Any help is appreciated.

I already deleted the persistent map data of the vacuum and let it create a new map. Same problem exists afterwards.

Valetudo is for some reason recalculating y axis, to use values from valetudos config you have to use subtract it from 51200, like on example below:

      "bathroom",
      [
        [
          26717,
          25138,
          28381,
          28794,
          1
        ]
      ]

will end up as:

[26717, 26062, 28381, 22406]

then you have to reorder coordinates for y:

[26717, 22406, 28381, 26062]

Thanks for your reply. You provided enough information to get me onto the right track.

So what i needed to do was to get the coordinates from the valetudo config file, which are for my case:

      "bathroom",
      [
        [
          26717,
          25138,
          28381,
          28794,
          1
        ]
      ]

For further recalculating into a working set of coordinates i had to do this:
[[x1,51200-y1,x2,51200-y2]]

In the set of resulting coordinates x1 < x2 and y1 < y2 needs to be true, if they are not you need to switch them. So in my case y2 becomes y1 and y1 becomes y2.

So the working coordinates in my bathroom case are:
[[26717,22406,28381,26062]]

Thanks.

I couldn’t explain it better :wink:


Hi, congratulations on your really well done project.

I have a roborock series “S6”, i read the whole thread in an attempt to configure the project. This is a screenshoot taken by MI-HOME app of my appartment. You can see the dock garage of my robot. Should i assume that this point has 25500, 25000? On this point should I find the coordinates in pixels?.
Unfortunately Flolevac does not work, it does not load the map and therefore it is not possible to obtain the coordinates of the areas. I really hope a video guide will be made to help to understand how to synchronize the map. Is very hard for me undestand. Thanks in advance :slight_smile:

2 Likes

Love the card!

I have a request, is it possible to have an option to have the map under the dropdown box?

Also thought I would share what my map looks like, created with free software sweet home 3d. Anyone interested in designing something like this, check out this guide

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