Xiaomi Cloud Vacuum Map Extractor

Something seems to be wrong with vacuum entities or card setup

Hello,

How did you manage to get the pictures back?

When I go to my entity Xiaomi Cloud Map Extractor, I don’t see an image, just a question mark in the middle :frowning:

thanks
Robin

It’s bad docs I know… I had to change vaccums from xiaomi miot auto to xiaomi miio.
In blueprint automation I have Default when cleaning… from time to time map vanish and I just wait and ask google to clean, since I can’t choose a room/zone from any app!

type: custom:xiaomi-vacuum-map-card
map_source:
  camera: camera.roborock_s5_0
calibration_source:
  camera: true
entity: vacuum.rosie
vacuum_platform: default
two_finger_pan: true
title: Living Room Vacuum
append_tiles: true
map_modes:
  - name: Zone cleanup
    icon: mdi:select-drag
    run_immediately: false
    coordinates_rounding: true
    selection_type: MANUAL_RECTANGLE
    max_selections: 5
    repeats_type: EXTERNAL
    max_repeats: 3
    service_call_schema:
      service: xiaomi_miio.vacuum_clean_zone
      service_data:
        zone: '[[selection]]'
        repeats: '[[repeats]]'
        entity_id: '[[entity_id]]'
    predefined_selections: []
    variables: {}
  - name: Pin & Go
    icon: mdi:map-marker-plus
    run_immediately: false
    coordinates_rounding: true
    selection_type: MANUAL_POINT
    max_selections: 999
    repeats_type: NONE
    max_repeats: 1
    service_call_schema:
      service: xiaomi_miio.vacuum_goto
      service_data:
        x_coord: '[[point_x]]'
        y_coord: '[[point_y]]'
        entity_id: '[[entity_id]]'
    predefined_selections: []
    variables: {}
  - template: vacuum_clean_segment
    max_selections: 999
    predefined_selections:
      - id: '1'
        icon:
          name: mdi:broom
          x: 23850
          'y': 20150
        label:
          text: WC2
          x: 23850
          'y': 20150
          offset_y: 35
        outline:
          - - 22550
            - 19050
          - - 25150
            - 19050
          - - 25150
            - 21250
          - - 22550
            - 21250
      - id: '2'
        icon:
          name: mdi:broom
          x: 21950
          'y': 20150
        label:
          text: WC1
          x: 21950
          'y': 20150
          offset_y: 35
        outline:
          - - 21300
            - 19100
          - - 22600
            - 19100
          - - 22600
            - 21200
          - - 21300
            - 21200
      - id: '3'
        icon:
          name: mdi:broom
          x: 19050
          'y': 23625
        label:
          text: Kitchen
          x: 19050
          'y': 23625
          offset_y: 35
        outline:
          - - 18000
            - 21500
          - - 20100
            - 21500
          - - 20100
            - 25750
          - - 18000
            - 25750
      - id: '16'
        icon:
          name: mdi:broom
          x: 25775
          'y': 22975
        label:
          text: Office
          x: 25775
          'y': 22975
          offset_y: 35
        outline:
          - - 23250
            - 21200
          - - 28300
            - 21200
          - - 28300
            - 24750
          - - 23250
            - 24750
      - id: '17'
        icon:
          name: mdi:broom
          x: 21675
          'y': 23225
        label:
          text: Hall
          x: 21675
          'y': 23225
          offset_y: 35
        outline:
          - - 20050
            - 19950
          - - 23300
            - 19950
          - - 23300
            - 26500
          - - 20050
            - 26500
      - id: '18'
        icon:
          name: mdi:broom
          x: 18750
          'y': 20575
        label:
          text: Laundry
          x: 18750
          'y': 20575
          offset_y: 35
        outline:
          - - 17500
            - 20150
          - - 20000
            - 20150
          - - 20000
            - 21000
          - - 17500
            - 21000
      - id: '19'
        icon:
          name: mdi:broom
          x: 25100
          'y': 26450
        label:
          text: Living Room
          x: 25100
          'y': 26450
          offset_y: 35
        outline:
          - - 21950
            - 25050
          - - 28250
            - 25050
          - - 28250
            - 27850
          - - 21950
            - 27850
tiles:
  - tile_id: status
    entity: vacuum.rosie
    label: Status
    attribute: status
    icon: mdi:robot-vacuum
    translations:
      starting: Starting
      charger disconnected: Charger disconnected
      idle: Idle
      remote control active: Remote control active
      cleaning: Cleaning
      returning home: Returning home
      manual mode: Manual mode
      charging: Charging
      charging problem: Charging problem
      paused: Paused
      spot cleaning: Spot cleaning
      error: Error
      shutting down: Shutting down
      updating: Updating
      docking: Docking
      going to target: Going to target
      zoned cleaning: Zoned cleaning
      segment cleaning: Segment cleaning
      emptying the bin: Emptying the bin
      charging complete: Charging complete
      device offline: Device offline
  - tile_id: battery_level
    entity: vacuum.rosie
    label: Battery
    attribute: battery_level
    icon: mdi:battery
    unit: '%'
  - tile_id: fan_speed
    entity: vacuum.rosie
    label: Fan speed
    attribute: fan_speed
    icon: mdi:fan
    translations:
      silent: Silent
      standard: Standard
      medium: Medium
      turbo: Turbo
      auto: Auto
      gentle: Gentle
icons:
  - icon: mdi:play
    conditions:
      - entity: vacuum.rosie
        value_not: cleaning
      - entity: vacuum.rosie
        value_not: error
      - entity: vacuum.rosie
        value_not: returning
    tooltip: Start
    tap_action:
      action: call-service
      service: vacuum.start
      service_data:
        entity_id: vacuum.rosie
  - icon: mdi:pause
    conditions:
      - entity: vacuum.rosie
        value_not: docked
      - entity: vacuum.rosie
        value_not: idle
      - entity: vacuum.rosie
        value_not: error
      - entity: vacuum.rosie
        value_not: paused
    tooltip: Pause
    tap_action:
      action: call-service
      service: vacuum.pause
      service_data:
        entity_id: vacuum.rosie
  - icon: mdi:stop
    conditions:
      - entity: vacuum.rosie
        value_not: docked
      - entity: vacuum.rosie
        value_not: idle
      - entity: vacuum.rosie
        value_not: error
      - entity: vacuum.rosie
        value_not: paused
    tooltip: Stop
    tap_action:
      action: call-service
      service: vacuum.stop
      service_data:
        entity_id: vacuum.rosie
  - icon: mdi:home-map-marker
    conditions:
      - entity: vacuum.rosie
        value_not: docked
      - entity: vacuum.rosie
        value_not: returning
    tooltip: Return to base
    tap_action:
      action: call-service
      service: vacuum.return_to_base
      service_data:
        entity_id: vacuum.rosie
  - icon: mdi:map-marker
    tooltip: Locate
    tap_action:
      action: call-service
      service: vacuum.locate
      service_data:
        entity_id: vacuum.rosie
  - icon: mdi:fan-remove
    conditions:
      - entity: vacuum.rosie
        attribute: fan_speed
        value: Silent
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.rosie
        fan_speed: Standard
  - icon: mdi:fan-speed-1
    conditions:
      - entity: vacuum.rosie
        attribute: fan_speed
        value: Standard
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.rosie
        fan_speed: Strong
  - icon: mdi:fan-speed-2
    conditions:
      - entity: vacuum.rosie
        attribute: fan_speed
        value: Strong
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.rosie
        fan_speed: Turbo
  - icon: mdi:fan-speed-3
    conditions:
      - entity: vacuum.rosie
        attribute: fan_speed
        value: Turbo
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.rosie
        fan_speed: Silent
  - icon: mdi:fan-alert
    conditions:
      - entity: vacuum.rosie
        attribute: fan_speed
        value_not: Silent
      - entity: vacuum.rosie
        attribute: fan_speed
        value_not: Standard
      - entity: vacuum.rosie
        attribute: fan_speed
        value_not: Strong
      - entity: vacuum.rosie
        attribute: fan_speed
        value_not: Turbo
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.rosie
        fan_speed: Silent
map_locked: true

camera blueprint automation

alias: Update Map Extractor camera 0
description: ""
use_blueprint:
  path: PiotrMachowski/update_map_extractor.yaml
  input:
    vacuum: vacuum.rosie
    camera: camera.roborock_s5_0
    mode_to_handle: default_when_cleaning

HI.

I have Roborock S50. It was working for months. Very good work Piotr! :slight_smile: some time ago my problem with getting the map has started. Right now I have got the automation running with the setup like this:


The restart of the vacuum helped maybe 2 first times - now it is not helping.
I got this message:
“Failed to retrieved map from vacuum”
in the log a could see:
2024-01-08 10:12:07.674 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05

2024-01-08 10:13:47.885 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching Paproch data

which is strange (if the automation is properly configured).

The config is:

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
    colors:
      color_map_inside: [0, 10, 20]
      color_map_outside: [0, 0, 0]
      color_map_wall: [0, 254, 0]
      color_map_wall_v2: [190, 190, 190]
      color_grey_wall: [254, 109, 126]
      color_ignored_obstacle: [0, 0, 0, 127]
      color_ignored_obstacle_with_photo: [0, 0, 0, 127]
      color_obstacle: [0, 0, 0, 127]
      color_obstacle_with_photo: [0, 0, 0, 127]
      color_path: [147, 194, 238]
      color_goto_path: [0, 255, 255]
      color_predicted_path: [255, 255, 0, 127]
      color_cleaned_area: [127, 127, 127, 127]
      color_zones: [0xAD, 0xD8, 0xFF, 0x8F]
      color_zones_outline: [0xAD, 0xD8, 0xFF]
      color_virtual_walls: [0, 0, 0]
      color_new_discovered_area: [64, 64, 64]
      color_no_go_zones: [0, 0, 0, 250]
      color_no_go_zones_outline: [0, 0, 0]
      color_no_mop_zones: [44, 33, 55, 200]
      color_no_mop_zones_outline: [163, 130, 211]
      color_charger: [0x66, 0xfe, 0xda, 0x7f]
      color_robo: [230, 230, 230]
      color_room_names: [0, 0, 0]
      color_unknown: [0, 0, 0]
      color_scan: [0xDF, 0xDF, 0xDF]
    room_colors:
      1: [30, 30, 30]

Any advice?

You have to add auto_update: false to your camera config

1 Like

Hi everyone

I have this problem, where the camera entity wont load the map. It says invalid calibration, please check your configuration - but the image on my ha instance is showing the correct map and even updating?
I have a roborock s7 maxv without the dock station.


Hi!
Will this be possible? Returned my Xiaomi e10 because it would not save map making the cleanup take to long. Thinking of buying it again if it will be possible to save map. Do you know if it will be able to save map on the Xiaomi e10? And is it possible to see when it will be released?
Thanks!

Will it be possible to save map for Xiaomi robot vacuum e10? Will it make it faster at navigation? The e10 creates a map when cleaning but does not save the map for next time making the cleanup time long. Thanks in advance!

Which entity is on the left and which one is on the right?

camera on right - using the xiaomi vacuum map card - and picture entity on the left.

Is the left image provided by the Roborock integration?

Can you kindly suggest what can be wrong in the configuration?
I am using Xiaomi Robot Vacuum v1. Also I’ve triple checked that credentials and token for the vacuum are correct. The map card complains about invalid calibration.
My configuration:

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
    store_map_raw: true
    scan_interval: 600

Logs (unable to retrieve was right when I rebooted the vacuum - for 10th time :sweat_smile:)

2024-01-13 15:19:14.324 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:14.430 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:14.430 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:14.536 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:14.536 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:14.642 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:14.642 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:14.748 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:14.748 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:14.854 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:14.854 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:14.960 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:14.960 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:15.068 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:15.068 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:15.175 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:15.175 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:15.281 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:15.281 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:15.386 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:19:15.387 DEBUG (SyncWorker_11) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True
2024-01-13 15:19:44.324 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:54.325 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2024-01-13 15:19:54.430 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:19:54.655 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching rockrobo.vacuum.v1 data
2024-01-13 15:19:59.536 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:04.640 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:09.744 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:14.324 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:30
2024-01-13 15:20:14.848 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:22.201 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:22.201 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:22.308 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:22.309 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:22.448 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:22.448 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:22.555 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:22.555 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:22.661 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:22.661 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True
2024-01-13 15:20:34.691 INFO (MainThread) [homeassistant.components.xiaomi_miio] Fetching rockrobo.vacuum.v1 data recovered
2024-01-13 15:20:44.324 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:44.433 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:44.433 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:44.540 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:44.540 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:44.646 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:44.646 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:44.752 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:44.752 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:44.857 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:44.857 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:44.964 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:44.964 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:45.070 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:45.070 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:45.175 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:45.175 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:45.283 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:45.283 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-13 15:20:45.388 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-13 15:20:45.389 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True

Is the map available in Xiaomi Home?

HI
Do you know if there is a command that can manage the coordinates of the vacuum when it stops in a certain position?

I would like that when I send it to the bin coordinates, when it arrives, a script that notifies me if there are brushes to replace.
thanks

You probably just can wait for the vacuum to become idle after sending it to the specific location.

Thanks for the reply.
I was thinking of something like this but I wanted to keep the existing automations without merging them all into one, but simply using a condition in those that notify me of the consumables.

Hi to all,

has anyone managed to get the map for “Xiaomi Robot Vacuum S10” (ijai.vacuum.v17) - Xiaomi Robot Vacuum S10 - Xiaomi Global ?

with no force-api I get:
image

With force-api to either Xiaomi or viomi I get:
image

In that past I had the ‘Xiaomi Mijia STYJ02YM’ and everything was running sweet :wink:

If you get failed to retrieve the map from Vacuum, are you able to see the map in the Xiaomi application? this is what I normally see as the issue. The Xiaomi app doesn´t load the map either at that time.

Ijai vacuums are not supported at this moment:

yes correct, I have checked the supported devices. I just asked in case someone somehow managed to do it. If you need help on testing/debugging I can help. Thank you