Closed shurakenas closed 1 year ago
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: 11:57:29 (2 occurrences)
Last logged: 12:07:28
Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 535, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 744, in async_device_update
raise exc
File "/usr/local/lib/python3.9/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
You have to send me raw map file as well
Where to get the raw map file?
Add following lines to config of map extractor:
store_map_raw: true
store_map_path: /config
Map file will be stored alongside configuration.yaml
I added these parameters and restarted HA, the map file did not appear. What name and extension should the map file have?
Can you show your config?
camera:
- platform: xiaomi_cloud_map_extractor
host: 192.168.xxx.xxx
token: mytoken
username: myusername
password: mypass
force_api: xiaomi
store_map_raw: true
store_map_path: /config
draw: ['all']
attributes:
- calibration_points
- charger
- cleaned_rooms
- country
- goto
- goto_path
- goto_predicted_path
- image
- is_empty
- map_name
- no_go_areas
- no_mopping_areas
- obstacles
- ignored_obstacles
- obstacles_with_photo
- ignored_obstacles_with_photo
- path
- room_numbers
- rooms
- vacuum_position
- vacuum_room
- vacuum_room_name
- walls
- zones
auto_update: true
scan_interval:
seconds: 10 #10seconds
Use this one instead:
camera:
- platform: xiaomi_cloud_map_extractor
host: 192.168.xxx.xxx
token: mytoken
username: myusername
password: mypass
store_map_raw: true
store_map_path: /config
draw: ['all']
attributes:
- calibration_points
- rooms
The file has appeared, how best to send it to you?
piotr.machowski.dev [at] gmail.com
Sent
Did you get my file?
Yes, I got it
Ohhh great, if you need more info i can help too, i have one of this kind of vacuum
Is there any news?
I have the same problem with p2140p model... Looking forward to some news.
Hi @PiotrMachowski how can I help with this (I'm a developer), I have this same vacuum device and i want get that map.
@lfdominguez check out this issue
@lfdominguez check out this issue
Thanks
I didn't understand what needs to be done to make it work dreame.vacuum.p2140o
I didn't understand what needs to be done to make it work dreame.vacuum.p2140o
The thing is (I will test it based on that other issue) the map is encrypted on our model with a static key, and need to add that middle task of decrypting the map raw data first.
I didn't understand what needs to be done to make it work dreame.vacuum.p2140o
The thing is (I will test it based on that other issue) the map is encrypted on our model with a static key, and need to add that middle task of decrypting the map raw data first.
thank you, I will be waiting for news
@PiotrMachowski that patch from the other issue is working GREAT!!!!!!
@PiotrMachowski that patch from the other issue is working GREAT!!!!!!
what should I do to make it work?
@PiotrMachowski that patch from the other issue is working GREAT!!!!!!
what should I do to make it work?
You must use this https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/files/11109954/xiaomi_cloud_map_extractor.zip and merge with your actual plugin code, modify where say p2140p
by p2140o
.
@PiotrMachowski that patch from the other issue is working GREAT!!!!!!
what should I do to make it work?
You must use this https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/files/11109954/xiaomi_cloud_map_extractor.zip and merge with your actual plugin code, modify where say
p2140p
byp2140o
.
thank you, it works
@PiotrMachowski that patch from the other issue is working GREAT!!!!!!
what should I do to make it work?
You must use this https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/files/11109954/xiaomi_cloud_map_extractor.zip and merge with your actual plugin code, modify where say
p2140p
byp2140o
.thank you, it works
How did you get it to work? I changed every instance of p2140p to p2140o and replaced the files in HA with the ones from the patch. Restarted HA, still get the error. Rebooted the system, still the same. Am I missing something? I'm running OS on a RPi 4, using the miot platform.
@PiotrMachowski that patch from the other issue is working GREAT!!!!!!
what should I do to make it work?
You must use this https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/files/11109954/xiaomi_cloud_map_extractor.zip and merge with your actual plugin code, modify where say
p2140p
byp2140o
.thank you, it works
How did you get it to work? I changed every instance of p2140p to p2140o and replaced the files in HA with the ones from the patch. Restarted HA, still get the error. Rebooted the system, still the same. Am I missing something? I'm running OS on a RPi 4, using the miot platform.
have you changed the country in the "get_otherinfo" function?
@PiotrMachowski that patch from the other issue is working GREAT!!!!!!
what should I do to make it work?
You must use this https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/files/11109954/xiaomi_cloud_map_extractor.zip and merge with your actual plugin code, modify where say
p2140p
byp2140o
.thank you, it works
How did you get it to work? I changed every instance of p2140p to p2140o and replaced the files in HA with the ones from the patch. Restarted HA, still get the error. Rebooted the system, still the same. Am I missing something? I'm running OS on a RPi 4, using the miot platform.
have you changed the country in the "get_otherinfo" function?
I saw that 30s after my reply. Changed it to us and now it works. I'll get to testing the functionality now.
Moving the discussion to an issue for all affected vacuums: #459
Checklist
The problem
Некорректная калибровка, проверьте вашу конфигурацию. Не отображается карта пылесоса.
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.p2140o
What version of Home Assistant do you use?
core-2022.3.5
What type of installation are you running?
Home Assistant OS
Camera's configuration
Errors shown in the HA logs (if applicable)
Additional information
https://ibb.co/h9qnY0H