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

Doesn't work for dreame.vacuum.p2140p #438

Closed SERGI0310 closed 1 year ago

SERGI0310 commented 1 year ago

Checklist

The problem

Doesn't work for dreame.vacuum.p2140p. Unable to load the map

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.p2140p

What version of Home Assistant do you use?

Home Assistant 2023.5.3

What type of installation are you running?

Home Assistant OS

Camera's configuration

camera:
  - platform: xiaomi_cloud_map_extractor
    host: 192.168.x.xxx
    token: !secret xiaomi_vacuum_token
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password
    country: "de"
    draw: ['all']
    attributes:
      - calibration_points
      - rooms

Errors shown in the HA logs (if applicable)

Este error se originó a partir de una integración personalizada.

Logger: homeassistant.helpers.entity
Source: custom_components/xiaomi_cloud_map_extractor/dreame/map_data_parser.py:51
Integration: xiaomi_cloud_map_extractor (documentation, issues)
First occurred: 20:06:29 (158 occurrences)
Last logged: 20:19:32

Update for camera.xiaomi_cloud_map_extractor fails
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 781, in async_device_update
    await hass.async_add_executor_job(self.update)
  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

auanasgheps commented 1 year ago

I have the same issue, with my Dreame L10 Pro, but it used to work. Need to look into this.

Logs say:

Found an unsupported model 'dreame.vacuum.p2029' for class 'RoborockVacuum'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio/

I refreshed/re-saved the configuration and it works again: magic!

alzaicko commented 1 year ago

I have the same issue for dreame.vacuum.p2140p

Errors shown in the HA logs
Logger: homeassistant.helpers.entity
Source: custom_components/xiaomi_cloud_map_extractor/dreame/map_data_parser.py:51
Integration: xiaomi_cloud_map_extractor ([documentation](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor), [issues](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues))
First occurred: 22:25:30 (1 occurrences)
Last logged: 22:25:30

Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 559, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 786, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.11/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
eugenfaust commented 1 year ago

Also have this error with dreame.vacuum.p2140p

Update for camera.xiaomi_cloud_map_extractor fails

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 781, in async_device_update
    await hass.async_add_executor_job(self.update)
  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
jipijajay commented 1 year ago

not 100% match with the model but looks like the same same issue for my dreame_vacuum_p2114a

This error originated from a custom integration.

Logger: homeassistant.helpers.entity Source: custom_components/xiaomi_cloud_map_extractor/dreame/map_data_parser.py:51 Integration: xiaomi_cloud_map_extractor (documentation, issues) First occurred: August 7, 2023 at 10:30:31 (34421 occurrences) Last logged: 10:19:52

Update for camera.camera_x10 fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 699, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 940, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.11/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

PiotrMachowski commented 1 year ago

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