PiotrMachowski / Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor

This custom integration provides a way to present a live view of a map for Xiaomi (Roborock/Viomi/Roidmi/Dreame) vacuums without a need for rooting.
MIT License
1.14k stars 121 forks source link

Room names are missing #404

Closed KrX3D closed 1 year ago

KrX3D commented 1 year ago

Checklist

The problem

Hello,

the room names are missing. i assume that the names should be shown like this? :

room_numbers: '16': Arbeitszimmer '17': WC

etc.

I got everythin set up at the xiaomi app, or do i need to configure it somewhere else? or is there away to add the names via the config?

image

image

What version of an integration has described problem?

v2.2.0

What was the last working version of an integration?

-

What vacuum model do you have problems with?

roborock.vacuum.a27

What version of Home Assistant do you use?

2023.2.3

What type of installation are you running?

Home Assistant OS

Camera's 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
    country: de
    colors:
      color_charger: [51, 51, 255]
      color_charger_outline: [128, 128, 128]
      color_cleaned_area: [51, 255, 51]
      color_grey_wall: [64, 64, 64]
      color_map_inside: [64, 64, 64]
      color_map_outside: [64, 64, 64]
      color_map_wall: [128, 128, 128]
      color_new_discovered_area: [255, 204, 204]
      color_no_go_zones_outline: [255, 0, 0]
      color_no_go_zones: [255, 204, 204]
      color_obstacle_with_photo: [64, 64, 64]
      color_obstacle: [64, 64, 64]
      color_path: [255, 255, 255]
      color_robo: [255, 255, 255]
      color_robo_outline: [64, 64, 64]
      color_room_names: [0, 0, 0]
      color_scan: [255, 0, 0]
    room_colors:
      16: [102, 178, 255] #WC
      17: [255, 153, 153] #Flur
      18: [255, 190, 0] #Esszimmer
      19: [102, 178, 255] #Wohnzimmer
      20: [102, 178, 255] #Arbeitszimmer
      21: [102, 178, 255] #Badezimmer
      22: [0, 204, 204] #Schlafzimmer
      23: [102, 178, 255] #Kueche
      24: [255, 104, 48] #Balkon
    map_transformation:
      scale: 3
      trim:
        left: 20
        right: 20
        top: 20
        bottom: 20
    sizes:
      charger_radius: 12
      vacuum_radius: 12
      obstacle_radius: 6
      ignored_obstacle_radius: 6
      obstacle_with_photo_radius: 6
      ignored_obstacle_with_photo_radius: 6
      path_width: 2
    draw: ["all"]
    attributes:
      - calibration_points
      - charger
      - cleaned_rooms
      - country
      - goto_path
      - goto_predicted_path
      - goto
      - ignored_obstacles_with_photo
      - ignored_obstacles
      - image
      - is_empty
      - map_name
      - no_go_areas
      - no_mopping_areas
      - obstacles_with_photo
      - obstacles
      - path
      - room_numbers
      - rooms
      - vacuum_position
      - vacuum_room_name
      - vacuum_room
      - walls
      - zones
    force_api: xiaomi
    store_map_raw: true
    store_map_image: true
    store_map_path: /config/xiaomi_cloud_map_extractor

Errors shown in the HA logs (if applicable)

No response

Additional information

No response

PiotrMachowski commented 1 year ago

Roborock raw map file doesn't contain information about room names.

It is also advised to remove all unnecessary values from attributes section of the config

KrX3D commented 1 year ago

ok thanks, so is there also no way to add a config option to this integration to manually set the room names?

PiotrMachowski commented 1 year ago

It's impossible at this moment, but it shouldn't be hard to add. I will try to make it happen.

It is also fairly easy to create a jinja template to handle it (before I add it)