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 122 forks source link

Mi Robot Vacuum-Mop 2 #346

Closed dmitriytim closed 1 year ago

dmitriytim commented 1 year ago

Checklist

What vacuum model do you want to be supported?

dreame.vacuum.p2140p

What is its name?

Mi Robot Vacuum-Mop 2

Available APIs

Errors shown in the HA logs (if applicable)

Sep 23 13:39:09 *************[1781]: #033[36m2022-09-23 13:39:09.381 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map from Xiaomi cloud#033[0m
Sep 23 13:39:09 *************[1781]: #033[36m2022-09-23 13:39:09.523 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.dreame.map_data_parser] decoding regular type map#033[0m
Sep 23 13:39:09 *************[1781]: #033[31m2022-09-23 13:39:09.526 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.xiaomi_cloud_map_extractor fails
Sep 23 13:39:09 *************[1781]: Traceback (most recent call last):
Sep 23 13:39:09 *************[1781]:   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
Sep 23 13:39:09 *************[1781]:     await self.async_device_update()
Sep 23 13:39:09 *************[1781]:   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in async_device_update
Sep 23 13:39:09 *************[1781]:     raise exc
Sep 23 13:39:09 *************[1781]:   File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
Sep 23 13:39:09 *************[1781]:     result = self.fn(*self.args, **self.kwargs)
Sep 23 13:39:09 *************[1781]:   File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 278, in update
Sep 23 13:39:09 *************[1781]:     self._handle_map_data(map_name)
Sep 23 13:39:09 *************[1781]:   File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 335, in _handle_map_data
Sep 23 13:39:09 *************[1781]:     map_data, map_stored = self._device.get_map(map_name, self._colors, self._drawables, self._texts,
Sep 23 13:39:09 *************[1781]:   File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum.py", line 36, in get_map
Sep 23 13:39:09 *************[1781]:     map_data = self.decode_map(response, colors, drawables, texts, sizes, image_config)
Sep 23 13:39:09 *************[1781]:   File "/config/custom_components/xiaomi_cloud_map_extractor/dreame/vacuum.py", line 24, in decode_map
Sep 23 13:39:09 *************[1781]:     return MapDataParserDreame.decode_map(raw_map_string, colors, drawables, texts, sizes, image_config)
Sep 23 13:39:09 *************[1781]:   File "/config/custom_components/xiaomi_cloud_map_extractor/dreame/map_data_parser.py", line 51, in decode_map
Sep 23 13:39:09 *************[1781]:     unzipped = zlib.decompress(base64.decodebytes(raw_map_string.encode("utf8")))
Sep 23 13:39:09 *************[1781]: zlib.error: Error -3 while decompressing data: incorrect header check#033[0m

Other info

my config

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
    force_api: dreame

Some time ago (two months) the card appeared, but then disappeared, I tried to delete the card and restart the robot, but it did not help.

chadalau commented 1 year ago

Hi, Got the same error Using the same Model

Tried All Apis, same thing

EvgeniyShatalov commented 1 year ago

Hello. I also use this model and also get errors.

deblynprado commented 1 year ago

Hello everyone!

I'm using this model and I can't get the map too, is there anything else that we can try?

deblynprado commented 1 year ago

Just sent you my map @dmitriytim

Screen Shot 2023-02-27 at 13 10 52 Screen Shot 2023-02-27 at 13 11 14

alzaicko commented 1 year ago

Hi, Got the same error Using the same Model

PiotrMachowski commented 1 year ago

Moving the discussion to an issue for all affected vacuums: #459