Vacuum Interactive Map Card

Hi,

I am a user of the styj02ym robot and I have correctly installed the card. Everything appears correctly, the map, the calibration is correct, in debug mode appears correct, but I think that the instructions sent to the robot are not correct. The instructions that the robot reacts are:

  • vacuum.xiaomi_clean_point
  • vacuum.xiaomi_clean_zone

Are these correct in the case of the card ?. Because if I make it through there they won’t work. Any idea?.

Thank you.

This model uses also different coordinates system, so it needs different approach.

Right now it is not supported by this card, but it will be. You can follow this issue

Hey,
Just want to be sure,
There is still no known way to save the latest Xiaomi vacuum gen 1 map - right?

I will ask otherwise, my problem is that the vacuum cleaner goes on the carpet and gets stuck and then they try to release and restart / restart the map is deleted
This is really disturbing because I have already built coordinates for each room and now they are irrelevant ):

Thanks

Same problem with the carpet with gen 1😭 so I have to put it back on the Dock, start full cleaning pressing manually robot button, and then after 10 seconds push the home button. But no problem with coordinates.

Hi. Have a problem with getting interactive map from my xiaomi vacuum Roborock S5.
The cleaner has been working well with map_image param, but doesn’t work with map_camera and this component:

I have such a card config:

type: 'custom:xiaomi-vacuum-map-card'
entity: vacuum.xiaomi_roborock_s5
debug: false
map_camera: camera.roborock_camera
camera_calibration: true
calibration_points: []

Camera config:

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
    country: cn
    name: "Roborock Camera"
    draw: ["all"]
    attributes:
      - calibration_points
    scan_interval:
      seconds: 100
    auto_update: true

And I see the error in logs

Logger: custom_components.xiaomi_cloud_map_extractor.camera
Source: custom_components/xiaomi_cloud_map_extractor/camera.py:209
Integration: xiaomi_cloud_map_extractor (documentation)
First occurred: 2:36:57 AM (5 occurrences)
Last logged: 2:43:35 AM

Unable to retrieve map data

Logger: custom_components.xiaomi_cloud_map_extractor.camera
Source: custom_components/xiaomi_cloud_map_extractor/camera.py:188
Integration: xiaomi_cloud_map_extractor (documentation)
First occurred: 3:00:19 AM (1 occurrences)
Last logged: 3:00:19 AM

Got exception while fetching the state: Unable to discover the device 192.168.0.102

Debugging of this code showed that self._vacuum.map()[0] returns 'retry'.

How to fix this issue?

Thnx.

Are you sure that your token is correct? You can check it using this tool.

Yes, I’m sure. Other cards works well with the vacuum. I’m still able to send commands to my cleaner. But I can’t get the “live” map.

I even get the instance of vacuum - miio.vacuum.Vacuum object at 0xaeff2bb0
But the method map() returns ['retry']

Is map shown correctly in Xiaomi Home?

Yes. In MiHome everything is ok. And from HA I can send commands to clean zone and vacuum do them.

Which exactly model do you have? Maybe it also uses a different API

My lovelace in yaml mode. I have installed map extractor.
mkdir -p www/custom_lovelace/xiaomi_vacuum_map_card is created in /home/pi/

I have added this URLs everywhere: configuration.yaml, ui-lovelace.yaml

  • url: /home/pi/www/custom_lovelace/xiaomi_vacuum_map_card/xiaomi-vacuum-map-card.js
    type: module
  • url: /local/xiaomi-vacuum-card.js?v=4.1.0
    type: module
  • url: /hacsfiles/lovelace-xiaomi-vacuum-card/xiaomi-vacuum-card.js
    type: module
  • url: /local/custom_lovelace/xiaomi_vacuum_map_card/xiaomi-vacuum-map-card.js
    type: module

No success. I’m getting always: “Custom element doesn’t exist: xiaomi-vacuum-map-card.”

Do you use HACS?

Yes. But all instructions are not explaining what I should to do with HACS. I think they are all for experienced users.

This card is available in “Frontend” section

Done.


But nothing changes.
image
Where should be “custom_lovelace” folder. Next to community folder in HA folder?

Can somebody share his ui-lovelace card for vacuum cleaner? I don’t understand what I am doing wrong. With bulbs and thermometers it was 100 times easier. It was easier too to connect Amazon Alexa to HA. :frowning:

When installed via HACS you can remove it from custom_lovelace.
The correct resource for HACS is:

url: /hacsfiles/lovelace-xiaomi-vacuum-card/xiaomi-vacuum-card.js
type: module

You can remove other resources.

Also you have to reload resources in lovelace


But no success. Card is empty.
Now I don’t understand which card type should it be.
type: custom:xiaomi-vacuum-map-card or type: custom:xiaomi-vacuum-card
Both are with no result.

Xiaomi Roborock S5 with the latest firmware 3.5.7_002008

The magic has just happened and the map now is showed! :slight_smile:

1 Like

It should be

type: custom:xiaomi-vacuum-map-card

Plus of you use 0.118.0 you have to update HA to the latest version