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

Map not updating on Home Assistant #390

Closed xtraorange closed 1 year ago

xtraorange commented 1 year ago

Checklist

The problem

Last night I connected my Roborock s4 to Home Assistant. I then ran the vacuum, divided the rooms, and reran the vacuum to fix one area (mirror).

For some reason, the map on Home Assistant hasn't been updated. It has about half of the rooms divided and nothing past that point. Oddly, if I load a new "floor" and start vacuuming, it immediately updates what I'm seeing on home assistant according to what the vacuum is seeing.

It's as though a map is stuck on it's old version (even though the app reflects the new one).

I have turned on the logger and get no errors.

Anything I can try?

What version of an integration has described problem?

v2.2.0

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

roborock.vacuum.a19

What version of Home Assistant do you use?

2023.1.4

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
    draw: ["all"]
    attributes:
      - calibration_points
      - rooms

Errors shown in the HA logs (if applicable)

None occurred.  The logger seems to be confirming successful extractions:

-01-12 20:16:02.180 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-01-12 20:16:02.481 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map name roboroommap%2F391211918%2F16
2023-01-12 20:16:02.481 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map from Xiaomi cloud
2023-01-12 20:16:02.892 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map data retrieved
2023-01-12 20:16:02.892 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Map is ok

Additional information

No response

xtraorange commented 1 year ago

Also, it correctly draws paths and the vacuum itself as it moves

PiotrMachowski commented 1 year ago

Can you show some screenshots? Have you tried restarting the vacuum? (By holding power button for a few seconds)

xtraorange commented 1 year ago

I had not tried restarting the device, but I did without success.

Here's what I'm seeing (notice the extra blob on home assistant from the mirror, and the middle rooms undivided):

Screenshot_20230112-214118_Mi Home Screenshot_20230112-214106_Home Assistant

xtraorange commented 1 year ago

It seems extra odd to me that it's correctly drawing the path and vacuum though

PiotrMachowski commented 1 year ago

I think that room is divided, but it just happens to be in the same color. Check out room numbers in attributes of camera entity and add room_colors section to your config

xtraorange commented 1 year ago

It looks like you're right. So it is updated, except that it's still showing that right side spill that has been removed from the app map. Is there a way to hide things like that?

PiotrMachowski commented 1 year ago

You probably can change it with color setting: https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor#colors-configuration

Probably color_map_wall_v2 or color_grey_wall

You should change it to [19, 87, 148]

xtraorange commented 1 year ago

That works, thanks!