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.12k stars 121 forks source link

Support for xiaomi.vacuum.c103 (Xiaomi Mijia 3C Plus) enhancement new platform #491

Open kennedysmartins opened 8 months ago

kennedysmartins commented 8 months ago

Checklist

What vacuum model do you want to be supported?

xiaomi.vacuum.c103

What is its name?

Xiaomi Mijia 3C Plus

Available APIs

Errors shown in the HA logs (if applicable)

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:696
First occurred: 22:04:56 (7 occurrences)
Last logged: 22:05:25

Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 696, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 959, 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 27, in get_map
    response = self.get_raw_map_data(map_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum.py", line 45, in get_raw_map_data
    map_url = self.get_map_url(map_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum_v2.py", line 18, in get_map_url
    if api_response is None or "result" not in api_response or "url" not in api_response["result"]:
                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

Other info

I have checked force_api: xiaomi, viomi, roidmi and dreame - no luck... In the map file, it shows a blue screen saying "Failed to retrieve map from vacuum"

belyashforHA commented 7 months ago

same wish (xiaomi.vacuum.c103 not work with Xiaomi-Cloud-Map-Extractor)

andytion commented 6 months ago

My Mijia Robot Vacuum-Mop 3(xiaomi.vacuum.c104) had same errors shown, i think is the sam framework!

maxcoff commented 5 months ago

same wish (xiaomi.vacuum.c103 not work with Xiaomi-Cloud-Map-Extractor)

gsaldana commented 5 months ago

Same issue - I've tested all the force_api configuration with no result.

kuntet2007 commented 5 months ago

B106CN had same issue

xvolte commented 3 months ago

https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues/460

if you go there, you will have the new API url, some tools to try to download and decrypt your maps... it is still work in progress, but a good way to start :)