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.17k stars 123 forks source link

Doesn't show map in HA, but shows it in Xiaomi app #504

Open new-kirte opened 10 months ago

new-kirte commented 10 months ago

Checklist

The problem

I am unable to see the map. Instead I am getting the error: "invalid calibration, please check your configuration". The map is displayed in Xiaomi app.

What version of an integration has described problem?

v2.2.1

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

vacuum.roborock_s6_maxv

What version of Home Assistant do you use?

core-2024.1.0

What type of installation are you running?

Home Assistant Container

Camera's configuration

camera:
  - platform: xiaomi_cloud_map_extractor
    host: roborockvacuums6maxv.koval.id.au
    token: !secret xiaomi_vacuum_token
    username: !secret smarthouse_username
    password: !secret smarthouse_password
    name: Roborock Vacuum
    auto_update: false
    draw: ['all']
    colors:
      color_map_outside: [255, 255, 255]
      color_robo: [0, 204, 0]
      color_charger: [204,0,205]
      color_path: [234,234,234]
    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

Errors shown in the HA logs (if applicable)

2024-01-05 14:09:38.789 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieved device model: roborock.vacuum.a10
2024-01-05 14:09:38.789 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Created device, used api: xiaomi
2024-01-05 14:09:38.789 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:44.207 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:44.207 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:44.335 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:44.335 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:44.470 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:44.471 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:44.606 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:44.606 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:44.739 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:44.739 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:44.894 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:44.894 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:45.027 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:45.027 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:45.165 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:45.165 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:45.311 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:45.311 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2024-01-05 14:09:45.453 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2024-01-05 14:09:45.453 DEBUG (SyncWorker_14) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True

Additional information

I have run token extractor and it is correct. I can control the vacuum from HA, but cannot see a map

new-kirte commented 10 months ago

Adding more details - the map is displayed perfectly when the vacuum is cleaning, during this time the log shows the following: 2024-01-05 14:17:07.088 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 14:17:17.512 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 14:17:17.512 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 14:17:17.642 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 14:17:17.642 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 14:17:17.784 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 14:17:17.784 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 14:17:17.914 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 14:17:17.914 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 14:17:18.043 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 14:17:18.043 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 14:17:18.185 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 14:17:18.185 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 14:17:18.331 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 14:17:18.331 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 14:17:18.465 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 14:17:18.466 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 14:17:18.602 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name roboroommap%2F321577025%2F2 2024-01-05 14:17:18.603 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map from Xiaomi cloud 2024-01-05 14:17:21.016 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map data retrieved 2024-01-05 14:17:21.016 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map is ok

As soon as vacuum gets back to dock, the map disappears and is replaced with the above error. The log shows: 2024-01-05 17:18:59.142 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:04.423 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:04.423 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:04.550 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:04.550 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:04.685 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:04.685 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:04.819 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:04.819 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:05.001 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:05.001 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:05.128 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:05.128 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:05.355 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:05.356 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:05.492 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:05.492 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:05.632 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:05.632 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device 2024-01-05 17:19:05.765 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry 2024-01-05 17:19:05.765 DEBUG (SyncWorker_7) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True

iJAY86 commented 10 months ago

I have same issue Model: viomi.vacuum.v7

jnt0r commented 10 months ago

I got the same issue. Model: roborock.vacuum.a15

owlysk commented 9 months ago

Do you have linked account with shared home? I had this issue too, I solved with this https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/pull/510

schastev commented 6 months ago

Hi! I also have this problem with a dreame.vacuum.md1808 in a shared home. @PiotrMachowski do you mind merging owlysk's PR if there is no problem with it?

Fredrik81 commented 6 months ago

Roborock app integration is now official: https://www.home-assistant.io/integrations/roborock/

PiotrMachowski commented 6 months ago

Roborock app integration is now official: https://www.home-assistant.io/integrations/roborock/

@Fredrik81 it has been official for a quite some time now, but it is not related to this issue

Fredrik81 commented 6 months ago

My bad then, It was listed under new integration in this month's release: https://www.home-assistant.io/blog/2024/05/01/release-20245/#new-integrations image

PiotrMachowski commented 6 months ago

@Fredrik81 it is not described as a new integration - it is just a new feature for the existing Roborock integration (which was introduced in 2023.5)