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.18k stars 124 forks source link

support for viomi.vacuum.v38 viomi v5 pro #365

Open djmalin opened 2 years ago

djmalin commented 2 years ago

Checklist

What vacuum model do you want to be supported?

viomi.vacuum.v38

What is its name?

viomi v5 pro

Available APIs

Errors shown in the HA logs (if applicable)

Logger: homeassistant.helpers.entity
Source: custom_components/xiaomi_cloud_map_extractor/viomi/vacuum.py:22
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: 15:21:52 (31 occurrences)
Last logged: 15:24:32

Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 527, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 722, in async_device_update
    raise exc
  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/viomi/vacuum.py", line 22, in decode_map
    unzipped = zlib.decompress(raw_map)
zlib.error: Error -3 while decompressing data: incorrect header check

Other info

camera:
    platform: xiaomi_cloud_map_extractor
    host: 192.168....
    token: !secret xiaomi_cloud_map_extractor_token 
    username: !secret xiaomi_cloud_map_extractor_username
    password: !secret xiaomi_cloud_map_extractor_password
    country: de
    draw: ['all']
    attributes:
      - calibration_points 
PiotrMachowski commented 2 years ago

Map works with force_api: roidmi