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

Please add support for dreame.vacuum.md1808 #450

Open wrewolf opened 1 year ago

wrewolf commented 1 year ago

Checklist

What vacuum model do you want to be supported?

dreame.vacuum.md1808

What is its name?

Xiaomi Robot Vacuum-Mop 2C

Available APIs

Errors shown in the HA logs (if applicable)

zlib.error: Error -3 while decompressing data: incorrect header check
2023-07-04 12:12:56.062 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.xiaomi_cloud_map_extractor_mop_2c fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/homeassistant/helpers/entity.py", line 559, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.11/site-packages/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 "/home/homeassistant/.homeassistant/custom_components/xiaomi_cloud_map_extractor/camera.py", line 278, in update
    self._handle_map_data(map_name)
  File "/home/homeassistant/.homeassistant/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 "/home/homeassistant/.homeassistant/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 "/home/homeassistant/.homeassistant/custom_components/xiaomi_cloud_map_extractor/viomi/vacuum.py", line 22, in decode_map
    unzipped = zlib.decompress(raw_map)
               ^^^^^^^^^^^^^^^^^^^^^^^^

Other info

I tried all api types but unfortunately not working