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

Add support Xiaomi X20 Max #588

Open
2 of 7 tasks
danyrd92 opened this issue Jan 17, 2025 · 7 comments
Open
2 of 7 tasks

Add support Xiaomi X20 Max #588

danyrd92 opened this issue Jan 17, 2025 · 7 comments
Assignees
Labels
enhancement New feature or request new platform

Comments

@danyrd92
Copy link

Checklist

  • I have updated the integration to the latest version available
  • I have checked if the vacuum/platform is already requested
  • I have sent raw map file to piotr.machowski.dev [at] gmail.com (Retrieving map; please provide your GitHub username in the email)

What vacuum model do you want to be supported?

D109GL

What is its name?

Xiaomi X20 Max

Available APIs

  • xiaomi
  • viomi
  • roidmi
  • dreame

Errors shown in the HA logs (if applicable)

TypeError: argument of type 'NoneType' is not iterable
2025-01-17 03:09:13.675 DEBUG (SyncWorker_4) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map from Xiaomi cloud
2025-01-17 03:09:13.734 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 960, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1320, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 291, in update
    self._handle_map_data(self._map_name)
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 362, in _handle_map_data
    map_data, map_stored = self._device.get_map(map_name, self._colors, self._drawables, self._texts,
                           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                                self._sizes, self._image_config, store_map_path)
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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"]:

Other info

I am an owner of this new X20 Max model, and I would like to know if it is possible to add support.

Thanks in advance and really thanks for your work.

@danyrd92
Copy link
Author

PD. I have not attached the raw map file because, in my case, Home Assistant does not provide any kind of map.

"➜ ~ docker exec homeassistant bash -c "mkdir -p /config/tmp/ && cp /tmp/map_* /config/tmp/"
cp: can't stat '/tmp/map_*': No such file or directory"

@PiotrMachowski
Copy link
Owner

Please provide a vacuum model code (returned by e.g. Tokens Extractor)

@danyrd92
Copy link
Author

hi again, token extractor give me the same model: xiaomi.vacuum.d109gl

@PiotrMachowski
Copy link
Owner

hi again, token extractor give me the same model: xiaomi.vacuum.d109gl

Well, it's not exactly the same, the prefix is also important :)

@danyrd92
Copy link
Author

Oh ok! I don't know it, sorry for the misunderstanding.

@danyrd92
Copy link
Author

Sorry, I understand it's not something that can be done overnight; I would just like to know if it will be possible to get support for this model.

@PiotrMachowski
Copy link
Owner

I can't tell anything at this moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new platform
Projects
None yet
Development

No branches or pull requests

2 participants