Vacuum Interactive Map Card

I don’t know how active the development of the card is, but I think a nice feature would be to show how much time it takes to clean the selected rooms when selecting them.

I’m not sure if I can add time, but I already have added dimensions/area

What i’m missing, but i think it’s not possible. Is if i can select mopping or not. Cleaning is okay, but i want to enable ‘mop’ yes/no. Searched a lot online but haven’t found it yet if it’s possible or not… als the ‘mop_attached’ attribute is always true (but that’s due to the integration)…

I can’t do anything without support for it in HA :frowning:

I do not see my vacuum map any more.
Before last update it worked fine
It says disable camera_calibration:

How do I do that?
I did say camera_calibration: false
Then another error exists.

If I go back to v2.1.0 it is working again
Thanks

I also have a problem after latest update

You don’t have to change anything in your config, please read comments above: you probably just have to restart HA

Thanks for your answer. I did several times allready
I wil reinstall the HACS again and try to restart

EDIT: It is working again. Thanks

EDIT2 I do like your HACS integration very much. It is working beautifull
:grinning:

Hi, I just installed the Xiaomi Cloud Map Extractor through HACS, and I edited the secretes.yaml and configuration.yaml files. The integration seems to work correctly, but when I add a card to the dashboard it displays a blue image saying “Failed to retrieve map from vacuum”. I doublechecked the token, username, password, and IP, but the error is not solved. I also tried to downgrade to version 2.1.0, still no luck. Any idea?

You can try enabling debug logging to check what causes this issue

I did, it was a typo in the configuration file, now everything’s fixed and it works!

I have a curiosity: i have a house with 3 floors, on the xiaomi app I can see the three maps, but in HA I only see one (the last one). What would it be the best way to have the three maps so depending on where I put the vacuum I can click on the right map to start it?

My idea was to make one dashboard per floor, and add a static image to each one with the map downloaded with Xiaomi Cloud Map Extractor. Is this the correct way of doing this or is there any alternative?

It seems like a good approach. I plan to support multiple maps in one card in the next version

That would be awesome. In the meantime I’ll try as I said. Thanks again for the great work!

Unfortunately development progresses really slow :frowning:

@Radinsky
First, sorry for my English.
Your floorplan image looks beautiful.
How do you get the vacuum map from the bottom and leave only the roborock trail over the floorplan?
Thanks

Explained here: Xiaomi Vacuum Interactive Map Card - #724 by radinsky

Just if anyone else is interested / searching for it.
Using the lovelace-card-templater I was able to dynamically create/ import my “predefined” zones from the xiaomi home app within this xiaomi-vacuum-interactive-map-card from the Xiaomi-Cloud-Map-Extractor component entity.

The lovelace code looks as following (where “vacuum.roborock_og” is my Roborock S7 and “camera.roborock_og_map” is the map object of the Map Extractor component):

        - type: custom:card-templater
          entities: 
            - vacuum.roborock_og
          card:
            type: custom:xiaomi-vacuum-map-card
            entity: vacuum.roborock_og
            map_camera: camera.roborock_og_map
            camera_calibration: true
            language: de
            default_mode: predefined_zones
            zones_template: >
              {% set map = states.camera.roborock_og_map %}
              {% set data = namespace(rooms=[]) %}
              {%- for roomid in state_attr(map.entity_id, "rooms") -%}
                {%- set room = map.attributes.rooms[roomid] %}
                {%- set roomlst = [] %}
                {%- set roomlst = roomlst + [room['x0'],room['y0'],room['x1'],room['y1']] %}
                {% set data.rooms = data.rooms + [[ roomlst ]] %}
              {%- endfor -%}
              {{ data.rooms }}

The reason I have “vacuum.roborock_og” chosen as entity for the card-templater update is that by default the map object updates every 5sec. and thus causes the card-templater to rerender every 5 seconds which is very annoying - especially if you are in “zoned_cleanup” mode.

1 Like

Nice work :+1:

I am completely amazed by the work done by @3_14 with this interactive map, and when I thought I had completed all the steps I just see your comment and I want that as well :rofl:

Just a couple of questions, your code is giving me the error “Invalid default mode: predefined_zones” and actually I can see the only options available are go_to_target and zoned_cleanup" (when I click the mode dropdown menu I can see the predefined_zones but it dissappears almost instantly):

I realised the reason might be the entity camera.xiaomi_cloud_map_extractor doesn´t contain information about rooms (but the picture in the map is correctly divided by rooms with different colours), do you know why this could be happening?

The second question is regarding the “_og”, you are saying to have vacuum.roborock_og to avoid the 5 seconds update but how do you link the vacuum.roborock and vacuum.roborock_og (same for camera.roborock_map and camera.roborock_og_map)? If your roborock is vacuum.roborock and you have vacuum.roborock_og, none of the commands will work, and the same will happen with your map, right? or am I missing something?

Hey
Regarding first question - you need to enable the „rooms“ attribute of the map/camera object in your configuration.

Regarding the second question I think you got me wrong - my vacuum object entity is ALWAYS vacuum.roborock_og as this is the entity coming from roborock integration :wink:
If yours is just vacuum.roborock just change it as necessary.
My comment regarding the 5s update is if you select in the following the map object it will update the zones whenever the map object is updated (which basically seems more correct, but is annoying if you want to use another mode than predefined zones as you have to do all your input within 5seconds )