Vacuum Interactive Map Card

Thanks, I’ll patiently wait. Regardless, thank you for the great job you’ve already done.

Related issue:

Hi !
Can i somehow hide this panel? I would only need to clean the zone, because if I press this, a new cleaning will start and my map will be lost (gen1)

Thanks .

I’ve got this running with my Roborock S5 Max. But I have an issue. When I want to clean a specific room and select to make a double run (so 2 instead of the standard 1), it only does it once.

Known issue? Or should I configure something else?

Next to the play button you should have a button to change a number of cleanings, is it broken?

I can change that number. That’s not the issue. But the robot will only clean once, no matter what that number is.

What integration do you use and what’s your card config?

configuration.yaml

camera:
  - platform: xiaomi_cloud_map_extractor
    host: !secret xiaomi_vacuum_host
    token: !secret xiaomi_vacuum_token
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password
    draw: ['all']
    attributes:
      - calibration_points

I use the Xiaomi Miio integration

This is the card code:

type: custom:xiaomi-vacuum-map-card
entity: vacuum.roborock_s5_max
vacuum_platform: default
preset_name: Live map
map_source:
  camera: camera.xiaomi_cloud_map_extractor
calibration_source:
  camera: true
two_finger_pan: true
map_locked: true
template: vacuum_clean_zone
title: Roborock
map_modes:
  - template: vacuum_goto
  - template: vacuum_clean_zone
  - template: vacuum_clean_segment
    predefined_selections:
      - id: 18
        label:
          text: Eetkamer
          x: 26825
          'y': 29450
          offset_y: 35
        icon:
          name: mdi:broom
          x: 26825
          'y': 29450
      - id: 16
        label:
          text: Woonkamer
          x: 32025
          'y': 29225
          offset_y: 35
        icon:
          name: mdi:broom
          x: 32025
          'y': 29225
      - id: 19
        label:
          text: Hal
          x: 31475
          'y': 34400
          offset_y: 35
        icon:
          name: mdi:broom
          x: 31475
          'y': 34400
      - id: 17
        label:
          text: Keuken
          x: 26975
          'y': 34600
          offset_y: 35
        icon:
          name: mdi:broom
          x: 26975
          'y': 34600
      - id: 20
        label:
          text: Bijkeuken
          x: 25875
          'y': 36525
          offset_y: 35
        icon:
          name: mdi:broom
          x: 25875
          'y': 36525
      - id: 25
        label:
          text: Achterkamer
          x: 21475
          'y': 37650
          offset_y: 35
        icon:
          name: mdi:broom
          x: 21475
          'y': 37650
      - id: 22
        label:
          text: WC
          x: 33125
          'y': 36000
          offset_y: 35
        icon:
          name: mdi:broom
          x: 33125
          'y': 36000
      - id: 26
        label:
          text: Badkamer
          x: 25175
          'y': 39225
          offset_y: 35
        icon:
          name: mdi:broom
          x: 25175
          'y': 39225

Can you try manually calling this service and check if everything works?

I’m clueless on how to do that. I’ve never done an automation with homeassistant.

You can do it in dev tools:

Open your Home Assistant instance and show your service developer tools with a specific service selected.

service: xiaomi_miio.vacuum_clean_segment
data:
  segments: [17,17]
target:
  entity_id: vacuum.roborock_s5_max

I came up with this code, which cleans a certain room, but it only does it once. Is the code ok?

Also just found out, that a zoned cleanup works if I select 2x or 3x in your card. But with a room cleanup it only cleans once when I select 2x or 3x.

Ok, so it seems like a problem with your vacuum or HA Miio integration

Looks like it ;).

But how to solve this?

Thank you very much !

I already have a map card created using the xiaomi cloud map extractor.

I also have a 3D floor plan image which I would like to use as my map in a new card.

I’ve been reading through the documentation and have successfully added my image, but I’m having trouble calibrating it.

Using my existing card, I’ve collected the coordinates of the docked position, plus two more ‘points’ that I have sent the vacuum to. I’ve then loaded my 3D floor plan image into GIMP and collected the coordinates of those same points in the image.

I’m a bit stuck getting those details into my card yaml. I am getting an error saying ‘duplicated mapping key’.
Below is my card yaml:

type: custom:xiaomi-vacuum-map-card
map_source:
  image: /local/images/2707-FP-8am.png
calibration_source:
  camera: true
  calibration_points:
    vacuum:
      x: 24557
      'y': 26471
    map:
      x: 1115
      'y': 714
    vacuum:
      x: 22571
      'y': 29259
    map:
      x: 969
      'y': 487
    vacuum:
      x: 19150
      'y': 29301
    map:
      x: 687
      'y': 474  
entity: vacuum.robot_vacuum
vacuum_platform: default

What am I doing wrong?
Do I still need the ‘camera: true’ line?
I’m assuming once I get it working I can overlay details such as rooms and paths over my 3D floor plan?

Here you have a fixed config:

type: custom:xiaomi-vacuum-map-card
map_source:
  image: /local/images/2707-FP-8am.png
calibration_source:
  calibration_points:
  - vacuum:
      x: 24557
      'y': 26471
    map:
      x: 1115
      'y': 714
  - vacuum:
      x: 22571
      'y': 29259
    map:
      x: 969
      'y': 487
  - vacuum:
      x: 19150
      'y': 29301
    map:
      x: 687
      'y': 474  
entity: vacuum.robot_vacuum
vacuum_platform: default

I’m assuming once I get it working I can overlay details such as rooms and paths over my 3D floor plan?

Unfortunately that’s not exactly how it works. You can overlay your room controls (outlines, icons), but no live data from your vacuum will be overlayed

Thanks very much. Live data is not essential for me. What a great card!

1 Like