Xiaomi Cloud Vacuum Map Extractor

One more thing, vacuum map won’t work with this repo (probably), so I suggest this approach instead:

So … the map works perfectly! My problem is that I’m stuck at the first point.
The script you made me with vacuum_goto no longer goes.
I think I have to use the clean_point or spot service but I tried with the same script but from error.

wait a sec, have you changed back to KrzysztofHajdamowicz/home-assistant-vacuum-styj02ym or use raidenlal/home-assistant-viomi-vacuum-v8?

raidenlal/home-assistant-viomi-vacuum-v8

alias: Giovanni Pulizia
sequence:
  - service: vacuum.clean_point
    data:
      point: [-1.1199999999999974, 0.7499999999999964]
      entity_id: vacuum.giovanni
mode: single
icon: hass:robot-vacuum

Giovanni Pulizia: Error executing script. Service not found for call_service at pos 1: Unable to find service vacuum.clean_point

alias: Giovanni Pulizia
sequence:
  - service: viomi_vacuum_v8.clean_point
    data:
      point: [-1.1199999999999974, 0.7499999999999964]
      entity_id: vacuum.giovanni
mode: single
icon: hass:robot-vacuum

Ok thanks a lot! This works. :slightly_smiling_face::smiling_face_with_three_hearts:

Hello everyone,

I have a question about vacuum cleaners. I haven’t been working on it for a while, but I want to work this out a bit now.
the following code used to work:

  - platform: xiaomi_cloud_map_extractor
    host: !secret whipsie_host
    token: !secret whipsie_token
    username: !secret mihome_user
    password: !secret mihome_pass
    name: "Whipsie"
    colors:
      color_map_inside: [32, 115, 185]
      color_map_outside: [19, 87, 148]
      color_map_wall: [100, 196, 254]
      color_map_wall_v2: [93, 109, 126]
      color_grey_wall: [93, 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, 0]
      color_predicted_path: [255, 255, 0, 0]
      color_cleaned_area: [127, 127, 127, 127]
      color_zones: [0xAD, 0xD8, 0xFF, 0x8F]
      color_zones_outline: [0xAD, 0xD8, 0xFF]
      color_virtual_walls: [255, 0, 0]
      color_new_discovered_area: [64, 64, 64]
      color_no_go_zones: [255, 33, 55, 127]
      color_no_go_zones_outline: [255, 0, 0]
      color_no_mop_zones: [163, 130, 211, 127]
      color_no_mop_zones_outline: [163, 130, 211]
      color_charger: [0x66, 0xfe, 0xda, 0x7f]
      color_robo: [75, 235, 149]
      color_room_names: [0, 0, 0]
      color_unknown: [0, 0, 0]
      color_scan: [0xDF, 0xDF, 0xDF]
    room_colors:
      1: [240, 178, 122]
      2: [133, 193, 233]
      3: [217, 136, 128]
      4: [52, 152, 219]
      5: [205, 97, 85]
      6: [243, 156, 18]
      7: [88, 214, 141]
      8: [245, 176, 65]
      9: [252, 212, 81]
      10: [72, 201, 176]
      11: [84, 153, 199]
      12: [133, 193, 233]
      13: [245, 176, 65]
      14: [82, 190, 128]
      15: [72, 201, 176]
      16: [165, 105, 18]
    draw:
      - charger
      - cleaned_area
      - goto_path
      - ignored_obstacles
      - ignored_obstacles_with_photo
      - no_go_zones
      - no_mopping_zones
      - obstacles
      - obstacles_with_photo
      - path
      - predicted_path
      - room_names
      - vacuum_position
      - virtual_walls
      - zones
     texts:
      - text: "Room 1"
        x: 25
        y: 25
        color: [125, 20, 213]
      - text: "Room 2"
        x: 25
        y: 75
        color: [125, 20, 213, 127]
        font: "FreeSans.ttf"
        font_size: 25
    map_transformation:
      scale: 1
      rotate: 0
      trim:
        top: 35
        bottom: 33
        left: 23
        right: 25
    sizes:
      charger_radius: 4
      vacuum_radius: 4.5
      obstacle_radius: 3
      ignored_obstacle_radius: 3
      obstacle_with_photo_radius: 3
      ignored_obstacle_with_photo_radius: 3
    attributes:
      - calibration_points
      - charger
      - cleaned_rooms
      - country
      - goto
      - goto_path
      - goto_predicted_path
      - image
      - is_empty
      - map_name
      - no_go_areas
      - no_mopping_areas
      - obstacles
      - ignored_obstacles
      - obstacles_with_photo
      - ignored_obstacles_with_photo
      - path
      - room_numbers
      - rooms
      - vacuum_position
      - vacuum_room
      - vacuum_room_name
      - walls
      - zones
    scan_interval:
      seconds: 10
    auto_update: true
    store_map_raw: false
    store_map_image: true
    store_map_path: "/tmp"
    force_api: xiaomi   

but now suddenly not anymore and I get the error message:’ invalid calibration, plaese check your configuration’. However, if I remove this part:

     texts:
      - text: "Room 1"
        x: 25
        y: 25
        color: [125, 20, 213]
      - text: "Room 2"
        x: 25
        y: 75
        color: [125, 20, 213, 127]
        font: "FreeSans.ttf"
        font_size: 25

then it will work.
My problem is how can I name my rooms then?

thanks for every response.

It’s a compatibility issue with HA 2023.8+. I will publish a fix later today/tomorrow

1 Like

Fixed in v2.2.1

Thanks, it’s working again. :ok_hand: :ok_hand:

Hello, with Xiaomi miio my Roborock S7 wasn’t working properly, but now there is an integration of Roborock. At the time of adding to the lovelace, I can’t get the map working, my vacuum entity is selected but nothing happens, is it possible to obtain the map ussing the Roborock integration? Thanks

Yes, but only using the custom one (humbertogontijo/homeassistant-roborock)

1 Like

Why does my map look so blocky vs other people are posting, what I am I doing wrong?

camera:    
  - platform: xiaomi_cloud_map_extractor
    host: XXX.XXX.XXX.XXX
    token: XXXXXXXXXXXXXXXXX
    username: XXXXXXXXXXXXXXX
    password: XXXXXXXXXXXXXXX
    draw: ['all']
    attributes:
      - calibration_points
    map_transformation:
      scale: 1
      rotate: 0
      trim:
        top: 25
        bottom: 32
        left: 32
        right: 28  ```

scale: 2 should make it a bit nicer

You do nothing wrong, the bigger the map the nicer I looks - your map seems to be one a smaller side

hi to ev.
i’m trying to let this work but it still says “inactive”
and when i click on it it says that “it doesn’t have an unique id”
what i’m supposed to do? ndr: xiaomi robot vacuum s12
this is my configuration in configuration.yaml (and nothing more at all, did i miss something?)

camera:
  - platform: xiaomi_cloud_map_extractor
    host: xxx.xxx.xxx.xxx
    token: 32 digitsxxxxxxxxx
    username: [email protected]
    password: xxxxxxxx
    draw: ['all']
    attributes:
      - calibration_points
      - charger
      - cleaned_rooms
      - country
      - goto
      - goto_path
      - goto_predicted_path
      - image
      - is_empty
      - map_name
      - no_go_areas
      - no_mopping_areas
      - obstacles
      - ignored_obstacles
      - obstacles_with_photo
      - ignored_obstacles_with_photo
      - path
      - room_numbers
      - rooms
      - vacuum_position
      - vacuum_room
      - vacuum_room_name
      - walls
      - zones
    scan_interval:
      seconds: 10
    auto_update: true
    store_map_raw: false
    store_map_image: true
    store_map_path: "/tmp"

Does the camera entity has any image?


nothing at all

“inactive” is ok, it’s a standard state. Missing unique id doesn’t affect functionality of the integration. Try enclosing the token in double quotes and use following config:

camera:
  - platform: xiaomi_cloud_map_extractor
    host: xxx.xxx.xxx.xxx
    token: "32 digitsxxxxxxxxx"
    username: [email protected]
    password: xxxxxxxx
    draw: ['all']
    attributes:
      - calibration_points
      - rooms