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.13k stars 122 forks source link

Map retrieve fails #432

Closed Raker87 closed 1 year ago

Raker87 commented 1 year ago

Checklist

The problem

Token is correct IP is correct PW is corret

but i see no map :(

In the log a can see an issue:

File "/config/custom_components/xiaomi_cloud_map_extractor/dreame/map_data_parser.py", line 51, in decode_map unzipped = zlib.decompress(base64.decodebytes(raw_map_string.encode("utf8"))) zlib.error: Error -3 while decompressing data: incorrect header check

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?

dreame.vacuum.p2114a

What version of Home Assistant do you use?

2023.5.2

What type of installation are you running?

Home Assistant OS

Camera's configuration

camera:
  - platform: xiaomi_cloud_map_extractor
    host: <ip>
    token: !secret xiaomi_vacuum_token
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password
    draw: ['all']
    attributes:
      - calibration_points

Errors shown in the HA logs (if applicable)

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update
    await coro
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 278, in update
    self._handle_map_data(map_name)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 335, in _handle_map_data
    map_data, map_stored = self._device.get_map(map_name, self._colors, self._drawables, self._texts,
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum.py", line 36, in get_map
    map_data = self.decode_map(response, colors, drawables, texts, sizes, image_config)
  File "/config/custom_components/xiaomi_cloud_map_extractor/dreame/vacuum.py", line 24, in decode_map
    return MapDataParserDreame.decode_map(raw_map_string, colors, drawables, texts, sizes, image_config)
  File "/config/custom_components/xiaomi_cloud_map_extractor/dreame/map_data_parser.py", line 51, in decode_map
    unzipped = zlib.decompress(base64.decodebytes(raw_map_string.encode("utf8")))
zlib.error: Error -3 while decompressing data: incorrect header check

Additional information

No response

PiotrMachowski commented 1 year ago

Duplicate of #316