Xiaomi Cloud Vacuum Map Extractor

hello again, i checked my logs and seem that the device is not responding
image

The vacuum entity i have to delete it or not? now i had remove it.
I can confirm that i received normally the map! The problem was the extraction token.
Two different tokens for EU servers.
Thank you for your kind help!

One more thing again.
How to draw or to set an area on the map and give a name?
I can not find somewhere an atribute on the entity.
Also in Lovelace i return with the following message " This entity (“camera.xiaomi_cloud_map_extractor”) does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail."
I can see the mp and i can see the vacuum as an entity in the same picture-glance card.How to manage to lead the vacuum?
THanks again for your help.

You can’t draw areas on a camera image. You can use map card to do it.

Lovelace message is not a problem, it doesn’t limit functionalities of this integration.

To show it in picture-glance you can use something like this:

type: picture-glance
camera_image: camera.xiaomi_cloud_map_extractor
entity: vacuum.xiaomi vacuum

Yes i allready done it via picture-glance but i needed to point and go or to name the areas for use it with home kit and siri.
So i will go as you said with map card! Thank you again!

Last night i updated HA to the latest version (core-2021.8.8)

After that the zone cleaning ain’t working anymore. I can see the vacuum live on the map. but cant use the zone cleaning function.

my config looks like this:

type: custom:xiaomi-vacuum-map-card
entity: vacuum.xiaomi_vacuum_cleaner
map_camera: camera.my_vacuum_camera
debug: false
language: se
calibration_points:
  - vacuum:
      x: 25500
      'y': 25500
    map:
      x: 273
      'y': 167
  - vacuum:
      x: 26500
      'y': 25500
    map:
      x: 293
      'y': 167
  - vacuum:
      x: 26500
      'y': 26500
    map:
      x: 293
      'y': 147
zones:
  - - - 19343
      - 17156
      - 21493
      - 20856
  - - - 23003
      - 21656
      - 26553
      - 24806
  - - - 17084
      - 24887
      - 20084
      - 28137
  - - - 22743
      - 25075
      - 26543
      - 28175
  - - - 20437
      - 21460
      - 21637
      - 25810
  - - - 18709
      - 21027
      - 20759
      - 22427
  - - - 21505
      - 17231
      - 26655
      - 21481

Im guessing something have changed, when i try to use services to send command i got errors, about the format of the zones.

please help

First of all, it is not a correct thread, this one is :wink:

Secondly, please attach your errors, usually they are the most useful part

This pluging work very nice! The only problem is once in while the map fully resets and the coordinates are all off and I have to regenerate the map & edit the script with new coordinates. Is this something that can be prevented? Once the map is generated I’d like to keep using it. I have Xiaomi Mi Vacuum 1S.

Is it just:

auto_update: false

?

All you can do is avoid “full cleaning”, use zone cleaning instead, do not move docking station and hope for the best. ¯\_( ͡° ͜ʖ ͡°)_/¯

Stopped workind today. Says ‘two factor auth required (see logs)’
Nothing in logs, username, password and token are okay. It’s like on attached screenshot.
Robot is Xiaomi Vacuum 1st generation.

Also, as far as i understood, 1st gen can’t save full map, it will be recreated on any full cleaning cycle, am i right?

Screenshot_1

It is possible that it was some time ago, you can try restarting HA and checking logs immediately after start.

Yup, you are right.

Thanks, restarted component, now map is displayed correctly.

had the same issue today, a restart of HA fixxed the problem for me just like you

It’s possible to fix it by just reloading extractor’s domain in system settings

Awesome integration.
However as of lately i get the “two factor auth” problem and i have to restart the service for it to work again.
The link i get in the logs always seem to be expired, is there a way to generate this link manually?

You can try to use token extractor to generate a new link

I tried running the extractor tool like i would to extract the token, however that didn’t work.
Might it be because my HA installation and Desktop are on different lans? (same external ip).

You can try to run extractor on the same machine as HA :slight_smile:

good day. please tell me how to add cards to lovelace??
and how you can get information about room numbers. I want to make automation to include cleaning not in all rooms, but in some.

Adding cards to lovelace

You can get room numbers by adding room_numbers in attributes section of configuration, they will be available as an attribute, which you can see in dev tools.

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    
      - room_numbers

thank you very much. or can you suggest something by the beautiful design (examples of writing in Lovelace))))