Vacuum Interactive Map Card

Replace

service: script.xiaomi_vacuum_goto

with

service: dreame_vacuum.vacuum_goto
1 Like

Is there a way to have the rooms be automatically mapped from my configuration within Roborock app? I have it all set up properly but when I set up the card in HA, most rooms are missing and the ones that are there aren’t in the right spots. Thanks in advance!

How can I apply this with card-mod?

ha-card {
  primary-background-color: rgba(255,255,255,0.1);
}


I want all 3 in the same color.

Yeah, I plan to adjust it someday


You have copied my config, so you have my rooms :man_shrugging: Add the card from the scratch and click “Generate rooms config” button if it is possible for your setup.


I have replied to your question on GitHub

1 Like

Thank you very much :smiling_face:

@3_14 Hi, after resetting my vacuums wifi, then connecting it back to the same network (maintaining the same local ip, etc) the map has stopped working and looks like this now


I refreshed the xiaomi integration so the vacuum comes back online to my HA instance, but the map still doesnt work, no matter if the vacuum is cleaning or is docked. HA reboots, internet restarts won’t help. Can you help me?

I answered your question there.

“Failed to retrieve device” usually means that the token is no longer valid.

1 Like

I recive the same message with my Roborock Q Revo.
I use the Image Entity.

Your problem is different. Official Roborock integration doesn’t provide calibration required for this card to work automagically :frowning:

@3_14 Hey, I broke something and now my map card can’t extract coords, I dont know what the hell is happening, Im even trying that on a clean card with the simplest config possible, which is:

type: custom:xiaomi-vacuum-map-card
title: "Vacuum Map Control"
entity: vacuum.robot_vacuum
vacuum_platform: Setup integer
map_source:
  camera: camera.xiaomi_cloud_map_extractor
calibration_source:
  camera: true

Tell me, would that be possible if we could hop on a discord call together? I’m Polish, which I assume you are as well, so we could talk either in Polish or English. I’d appreciate if we could talk as it would make it much much easier to understand and fix my problems, I also can’t seem to get predefined zones to work, but I didn’t even reach a fix for that problem, because I stumbled on that coords problem.

Do you mean the “Selection” option in the editor?

I mean this: I change the platform to Setup Integer, I make a zone selection somewhere on the map, I click the “start” button and then the “Selection” remains empty ([ ]). I also then receive the error that can be shown on the screenshot below alongside the steps I do to get there

Selection should be updated the moment you create it on the map. You don’t have to click “play” button. Can you open the card editor, hoover the mouse over any of 3 icons in the center (play/pin/fan) and check what text is shown in the tooltip?

I’m sorry, I’m not sure if this is what you mean:

image
(I had my cursor hovering over the pin icon while taking the screenshot)

Yes, this is exactly what I meant. Was this screenshot taken in the card editor?

Yes, if I understand correctly by what are you referring to as “card editor”, opening my dashboard that contains the vacuum map card, going into edit mode of the dashboard, then opening the map. If this, then, yes this is how I made this screenshot.

hi @3_14 ! Thank you for this amazing card. I have mine configured with a Dreame robot running Valetudo. The current status is that the map and black buttons all work. However, selecting a room and cleaning that doesn’t seem to do anything. I get a “Success” message, but the robot stays put.

Here’s the card config:

type: custom:xiaomi-vacuum-map-card
map_source:
  camera: camera.r2jeeves2_camera
calibration_source:
  camera: true
entity: vacuum.valetudo_dreame
vacuum_platform: Hypfer/Valetudo
map_locked: true
two_finger_pan: true
map_modes:
  - template: vacuum_clean_zone
  - template: vacuum_goto
  - template: vacuum_clean_segment
    predefined_selections:
      - id: "1"
        icon:
          name: mdi:broom
          x: 3167
          "y": 2445
        label:
          text: Main Bedroom
          x: 3167
          "y": 2445
          offset_y: 35
        outline:
          - - 2950
            - 2225
          - - 3385
            - 2225
          - - 3385
            - 2665
          - - 2950
            - 2665
      - id: "2"
        icon:
          name: mdi:broom
          x: 2805
          "y": 3177
        label:
          text: Living Room
          x: 2805
          "y": 3177
          offset_y: 35
        outline:
          - - 2615
            - 2910
          - - 2995
            - 2910
          - - 2995
            - 3445
          - - 2615
            - 3445
      - id: "3"
        icon:
          name: mdi:broom
          x: 2995
          "y": 2850
        label:
          text: Hallway
          x: 2995
          "y": 2850
          offset_y: 35
        outline:
          - - 2860
            - 2580
          - - 3130
            - 2580
          - - 3130
            - 3120
          - - 2860
            - 3120
      - id: "4"
        icon:
          name: mdi:broom
          x: 3222
          "y": 2895
        label:
          text: Kitchen
          x: 3222
          "y": 2895
          offset_y: 35
        outline:
          - - 3115
            - 2755
          - - 3330
            - 2755
          - - 3330
            - 3035
          - - 3115
            - 3035
      - id: "5"
        icon:
          name: mdi:broom
          x: 3322
          "y": 3200
        label:
          text: Dining Room
          x: 3322
          "y": 3200
          offset_y: 35
        outline:
          - - 3150
            - 3015
          - - 3495
            - 3015
          - - 3495
            - 3385
          - - 3150
            - 3385
      - id: "6"
        icon:
          name: mdi:broom
          x: 2780
          "y": 2812
        label:
          text: Bathroom
          x: 2780
          "y": 2812
          offset_y: 35
        outline:
          - - 2695
            - 2735
          - - 2865
            - 2735
          - - 2865
            - 2890
          - - 2695
            - 2890
      - id: "7"
        icon:
          name: mdi:broom
          x: 2777
          "y": 2482
        label:
          text: Guest Room
          x: 2777
          "y": 2482
          offset_y: 35
        outline:
          - - 2615
            - 2225
          - - 2940
            - 2225
          - - 2940
            - 2740
          - - 2615
            - 2740
      - id: "8"
        icon:
          name: mdi:broom
          x: 2585
          "y": 2835
        label:
          text: Room 8
          x: 2585
          "y": 2835
          offset_y: 35
        outline:
          - - 2455
            - 2690
          - - 2715
            - 2690
          - - 2715
            - 2980
          - - 2455
            - 2980
      - id: "9"
        icon:
          name: mdi:broom
          x: 3072
          "y": 3187
        label:
          text: Entryway
          x: 3072
          "y": 3187
          offset_y: 35
        outline:
          - - 2995
            - 3100
          - - 3150
            - 3100
          - - 3150
            - 3275
          - - 2995
            - 3275
layout_options:
  grid_columns: 16
  grid_rows: auto

and here is the service call for one of the rooms:

{
  "domain": "mqtt",
  "service": "publish",
  "serviceData": {
    "topic": "[[topic]]/MapSegmentationCapability/clean/set",
    "payload": "{\"segment_ids\": [\"2\"], \"iterations\": 1, \"customOrder\": true}"
  }
}

Thank you for this amazing card and for your help here

You have to provide topic to make it work with Valetudo - documentation

1 Like

Ugh sorry i missed that documentation. Thank you so much again @3_14 for this card and @sca075 for the camera map and autoconfiguration magic

1 Like