Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor icon indicating copy to clipboard operation
Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor copied to clipboard

Add support Xiaomi X20 Max

Open danyrd92 opened this issue 10 months ago • 36 comments

Checklist

  • [x] I have updated the integration to the latest version available
  • [x] 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 avatar Jan 17 '25 02:01 danyrd92

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"

danyrd92 avatar Jan 17 '25 02:01 danyrd92

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

PiotrMachowski avatar Jan 17 '25 02:01 PiotrMachowski

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

danyrd92 avatar Jan 17 '25 05:01 danyrd92

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

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

PiotrMachowski avatar Jan 17 '25 05:01 PiotrMachowski

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

danyrd92 avatar Jan 17 '25 06:01 danyrd92

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.

danyrd92 avatar Jan 27 '25 08:01 danyrd92

I can't tell anything at this moment

PiotrMachowski avatar Jan 27 '25 12:01 PiotrMachowski

I'm having the same issue with the same robot, xiaomi X20 Max - xiaomi.vacuum.d109gl. Let me know case I can help with any information.

jpovilela avatar Feb 01 '25 14:02 jpovilela

same here x20 max

KevinSchnippkoweit avatar Feb 07 '25 18:02 KevinSchnippkoweit

Nao estou conseguindo puxar o mapa do 20max

Ojogador01 avatar Feb 07 '25 23:02 Ojogador01

Hi I got same vacuum and same problem. I'll be pleased to help you, also we can talk in PL. Please let me know what you need (im kinda beginner)

Here is information from token extractor

NAME: Xiaomi Robot Vacuum X20 Max ID: ... MAC: ... IP: 192.168.0.239 TOKEN: ... MODEL: xiaomi.vacuum.d109gl

I would rather not send ID on public, I hope its not necessary

Varrial avatar Feb 11 '25 02:02 Varrial

Same here

Chrislari avatar Feb 28 '25 12:02 Chrislari

xiaomi_d109gl_25cb

otralf avatar Mar 06 '25 18:03 otralf

same

nkise-nlab avatar Mar 18 '25 10:03 nkise-nlab

+1

srodighiero avatar Mar 27 '25 11:03 srodighiero

same here xiaomi.vacuum.d109gl

joefreire avatar Mar 28 '25 09:03 joefreire

+1

IblacKKI avatar Mar 30 '25 14:03 IblacKKI

+1

rillekille avatar Mar 30 '25 15:03 rillekille

I´m having the exact same issue with my X20 Max. Model: xiaomi.vacuum.d109gl Region: us

fabiobrolo avatar Apr 25 '25 20:04 fabiobrolo

i cant extract map at x20 max too, server: sg

beyondzvincent avatar May 07 '25 10:05 beyondzvincent

+1 😞

MajicMOLE avatar May 11 '25 20:05 MajicMOLE

+1

gergo-vilmanyi avatar May 13 '25 22:05 gergo-vilmanyi

+1 It’s one of the most widely used models, so it’s hard to believe that no one has taken any steps to add support for it...

fitsou avatar May 14 '25 10:05 fitsou

I can't tell anything at this moment @PiotrMachowski My guess it is using the same new format as Ijai vacuums We (Tarh-76 and me) will release fully working parser for it soon

maksp86 avatar Jun 05 '25 08:06 maksp86

If you guys need help with any data gathering, I am willing to help

fitsou avatar Jun 05 '25 09:06 fitsou

If you guys need help with any data gathering, I am willing to help

Check out my fork https://github.com/maksp86/HA-custom-components-Xiaomi-Cloud-Map-Extractor-Ijai-Support It can be added as custom repository in HACS (ignore update request if it appears afterwards)

It is stable (or I haven't seen any bugs yet). Anyway use it for testing only as any other fork. All issues/reports must be addressed to my repo, not Piotr Machowski`s

Image Proof of it actually working

Image

There is no Issue tab in your repo.

fitsou avatar Jun 06 '25 13:06 fitsou

There is no Issue tab in your repo

Turned it on now, thanks

UPD: Unfortunately it is using some other map format, not Ijai. My fork is not able to parse the map of this model

maksp86 avatar Jun 06 '25 13:06 maksp86

There is no Issue tab in your repo

Turned it on now, thanks

UPD: Unfortunately it is using some other map format, not Ijai. My fork is not able to parse the map of this model

Thanks for your help. Any idea on how to decrypt this new format? Where can I start?

lflondonol92 avatar Jul 29 '25 18:07 lflondonol92

+1

ale5701 avatar Aug 26 '25 11:08 ale5701

Any updates on this?

fitsou avatar Oct 09 '25 07:10 fitsou