Vacuum Interactive Map Card

Hello all,

I’ve been trying to install ‘custom: xiaomi-vacuum-map-card’ for a while. I think I’m doing everything right! (pic 2 and pic 3) however keep getting the following error! What am I doing wrong? (pic. 1)

Can someone tell me what I’m doing wrong?

Thank you for your response.2

You have to add this card to resources

1 Like

Hi and thank you very much for the effort. This looks awesome and i am trying to use it in my Home Assistant.

Unfortunately i am pretty new to HA and i am struggling to get this to work.

I have installed the Lovelace Xiaomi Vacuum Map Card with HACS and under the “resources” tab i can see the “/hacsfiles/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js” so i think i got that part.

I also installed the Xiaomi Cloud Map Extractor and i am able to get a map from my Vacuum from the camera entity.

I dont understand what i have to do from here to get the card set up on my dashboard and how to calibrate my map.

I guess there are several steps i am missing to get this to work.

Are there any step by step guides i can follow or anyone who can give me any tips?

You have to use:

@3_14 is there a way for the image/Map to scale?

I want it a bit bigger,

i use

        - type: 'custom:xiaomi-vacuum-map-card'
          entity: vacuum.roborock_vacuum_s5
          map_camera: camera.xiaomi_cloud_map_extractor
          camera_calibration: true

And for the cloud_map_extractor i use

    map_transformation:
      rotate: 90
      scale: 2
      trim:
        top: 20
        bottom: 12
        left: 0
        right: 12

This works for your other addon, but not for this one

Heres an image when im using the other integration, works fine, heres my code, with the above from map_transformation, if i remove map_transformation it gets even smaller. so dunno whats happening, tried 2 scale, 90 scale etc

with this code

  • type: custom:dwains-flexbox-card
    items_classes: ‘col-xs-12 col-sm-6 col-sm-6’
    cards:
    {% if (data | fromjson)[‘map’] %}
    • type: custom:dwains-flexbox-card
      padding: true
      cards:
      • type: custom:dwains-heading-card
        item_classes: ‘col-xs-12 col-sm-12 col-md-12 col-lg-12’
        title: Map
      • type: ‘custom:xiaomi-vacuum-map-card’
        items_classes: ‘col-sm-12’
        entity: vacuum.roborock_vacuum_s5
        map_camera: camera.xiaomi_cloud_map_extractor
        camera_calibration: true

Can you specify what do you want to achieve?

sorry i am not good at english

i want this card to fill out the width and height of this page.

Its worked with another solution use cloud map extractor, but when i use scale here it doesnt get bigger, or just a bit

code:

type: custom:dwains-flexbox-card
items_classes: ‘col-xs-12 col-sm-6 col-sm-6’
cards:
{% if (data | fromjson)[‘map’] %}
type: custom:dwains-flexbox-card
padding: true
cards:
type: custom:dwains-heading-card
item_classes: ‘col-xs-12 col-sm-12 col-md-12 col-lg-12’
title: Map
type: ‘custom:xiaomi-vacuum-map-card’
items_classes: ‘col-sm-12’
entity: vacuum.roborock_vacuum_s5
map_camera: camera.xiaomi_cloud_map_extractor
camera_calibration: true
camera:
  - platform: xiaomi_cloud_map_extractor
    host: 10.0.0.5
    token: X
    username: X
    password: X
    draw: ['all']
    attributes:
      - calibration_points 
    map_transformation:
      rotate: 90
      scale: 5

Scale changes only resolution of an image, to get rid of empty blue spaces around a map you have to use trim

im not worried about blue space, i want the image to get bigger, so i dont have all that “white space”. See image here for other integration

Ok, so it’s something you have to do in lovelace config, not camera’s. It is probably achieved using some magic cards made by Dwaine

ok thank you, seems its not possible without doing some major work, trying to see if i can use css card mod with it.

some simple css fixed the issue sorry for bringing it up here

Followed this suggestion but this is the result, map seems to not show up:

configuration.yml

vacuum:
  - platform: miio2
    name: "Mi Mop P"
    host: !secret xiaomi_vacuum_host
    token: !secret xiaomi_vacuum_token

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 see that you use miio2, what vacuum model do you have?

Mi Robot Vacuum Mop P (PRO) (STYTJ02YM)

token_extractor.py detects it as
MODEL: viomi.vacuum.v8

BTW, log is full of

2021-03-18 23:07:37 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2021-03-18 23:07:42 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2021-03-18 23:07:47 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2021-03-18 23:07:52 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2021-03-18 23:07:56 ERROR (SyncWorker_57) [miio.miioprotocol] Got error when receiving: timed out

So i assume that is using miio(v1?) protocol to retrive the livemap and is just incompatible with my robot… is something that i can do to help debugging/fixing?

Viomi vacuums are not supported by extractor :frowning:

Can i help you somehow to get it fixed? can you point me in the direction to get some debug information so i can try to find a way to fix? (what’s the “core” func that needs to be fixed? :smiley: )

Hi all, I have in sensors:

- 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
    - charger
    - country
    - goto

I get:

But I do not see selectable calibration points… where are they? This is see in developer tools

@FrancYescO I think that you can’t do anything at this moment, sorry :frowning:

@sender I don’t really understand your problem… Calibration points are used by a card to send a vacuum to correct locations. You can see them on a map by adding debug: true in card’s config