Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error -3 while decompressing data: incorrect header check while trying Viomi S9 #143

Closed
fokcuk opened this issue Jun 26, 2021 · 13 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@fokcuk
Copy link

fokcuk commented Jun 26, 2021

Hello
I am trying to get maps for Viomi S9 urn:miot-spec-v2:device:vacuum:0000A006:viomi-v18:1
When I configure the parameters and restart HA I get this error:

Logger: homeassistant.helpers.entity
Source: custom_components/xiaomi_cloud_map_extractor/viomi/vacuum.py:14
Integration: xiaomi_cloud_map_extractor (documentation, issues)
First occurred: 10:00:57 PM (8 occurrences)
Last logged: 10:01:30 PM

Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 350, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 558, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 273, in update
    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 28, 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 14, in decode_map
    unzipped = zlib.decompress(raw_map)
zlib.error: Error -3 while decompressing data: incorrect header check
@PiotrMachowski PiotrMachowski self-assigned this Jun 28, 2021
@PiotrMachowski PiotrMachowski added the bug Something isn't working label Jun 28, 2021
@PiotrMachowski
Copy link
Owner

This vacuum uses roidmi map format, related issue: #127

@PiotrMachowski
Copy link
Owner

You can now check out version from this branch

@fokcuk
Copy link
Author

fokcuk commented Jul 9, 2021

not sure where I went wrong:

Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 401, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 609, in async_device_update
    raise exc
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 257, in update
    self._handle_map_data(map_name)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 314, 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 28, 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 14, in decode_map
    unzipped = zlib.decompress(raw_map)
zlib.error: Error -3 while decompressing data: incorrect header check

@PiotrMachowski
Copy link
Owner

What is your config?

@fokcuk
Copy link
Author

fokcuk commented Jul 9, 2021

redownloaded but still get the same issue.
This is what I have in the config:

  - 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
    country: sg
    force_api: viomi

It also did not like(said it did not suport) store_map: true that I had there before, so had to comment that out

@PiotrMachowski
Copy link
Owner

PiotrMachowski commented Jul 9, 2021

You have to remove "force_api" section, as your vacuum doesn't use viomi map format. Everything should be auto-discovered now.
store_map has been changed to store_map_raw

  - 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
    country: sg

@fokcuk
Copy link
Author

fokcuk commented Jul 9, 2021

great! Can see map now, just need to add more options

@PiotrMachowski
Copy link
Owner

Oh, use this config:

  - 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
    country: sg
    draw: ["all"]

@fokcuk
Copy link
Author

fokcuk commented Jul 9, 2021

yep, that is what I needed =)

@fokcuk
Copy link
Author

fokcuk commented Jul 9, 2021

can you please also tell me how to do this?
xiaomi_cloud_map_extractor.reload

@PiotrMachowski
Copy link
Owner

You should have a button for it in "Server controls" page
https://my.home-assistant.io/redirect/server_controls/

@fokcuk
Copy link
Author

fokcuk commented Jul 9, 2021

legend!

@PiotrMachowski
Copy link
Owner

Added in #148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants