Xiaomi Cloud Vacuum Map Extractor

Hi, I cannot manage to get it to work with my S6. Camera is created but no image. Installed Extractor with HACS.
Have a separate camera.yaml that is included from configuration.yaml
Have double check token, login and password, they works fine by Xiaomi Miio Integration. Is there any logs stored so I can find any details?
Extracted data from token extractor.
MAC: aa:bb:cc:dd:ee:ff
Token: 32longstring
Model: roborock.vacuum.s6
Region: de

camera.yaml

- 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: "de"
  draw: ["all"]
  attributes:
    - calibration_points

Everything should be in HA logs

Have looked in both supervisor and core log from HA webgui but can’t say I can see any related to xiaomi. Or should I look into log folder, there are 11 files that have been updated today.

It should be in core log. Try checking it out in file itself, GUI version is trimmed

Hello.
Can someone tell me if my Mii Vacuum Mop is supported ? Model STYTJ01ZHM

the map is the last thing missing for my integration.

Thanks.

No, it’s not

Got this from log.

2021-04-06 19:23:31 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 277, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 473, 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 200, in update
    map_data = self._connector.get_map(self._country, map_name, self._colors, self._drawables, self._texts,
  File "/config/custom_components/xiaomi_cloud_map_extractor/xiaomi_cloud_connector.py", line 134, in get_map
    map_data = MapDataParser.parse(unzipped, colors, drawables, texts, sizes, image_config)
  File "/config/custom_components/xiaomi_cloud_map_extractor/map_data_parser.py", line 81, in parse
    ImageHandler.draw_texts(map_data.image, texts)
  File "/config/custom_components/xiaomi_cloud_map_extractor/image_handler.py", line 193, in draw_texts
    ImageHandler.__draw_text__(image, text_config[CONF_TEXT], x, y, text_config[CONF_COLOR],
  File "/config/custom_components/xiaomi_cloud_map_extractor/image_handler.py", line 245, in __draw_text__
    ImageHandler.__draw_on_new_layer__(image, draw_func)
  File "/config/custom_components/xiaomi_cloud_map_extractor/image_handler.py", line 263, in __draw_on_new_layer__
    draw_function(draw)
  File "/config/custom_components/xiaomi_cloud_map_extractor/image_handler.py", line 236, in draw_func
    font = ImageFont.truetype(font_file, font_size)
  File "/usr/local/lib/python3.8/site-packages/PIL/ImageFont.py", line 852, in truetype
    return freetype(font)
  File "/usr/local/lib/python3.8/site-packages/PIL/ImageFont.py", line 849, in freetype
    return FreeTypeFont(font, size, index, encoding, layout_engine)
  File "/usr/local/lib/python3.8/site-packages/PIL/ImageFont.py", line 173, in __init__
    freetype_version = parse_version(features.version_module("freetype2"))
  File "/usr/local/lib/python3.8/site-packages/packaging/version.py", line 57, in parse
    return Version(version)
  File "/usr/local/lib/python3.8/site-packages/packaging/version.py", line 296, in __init__
    match = self._regex.search(version)
TypeError: expected string or bytes-like object

@ha_tony

I have a S6 Pure and I’m having the same issue. I have a camera entity that just sits idle. I think @kongo09 is in the same boat.

Maybe it’s time for an issue on the GitHub.

Just remove texts section and it should work

Who are you referring to the texts section? And where is this section?

Any solution for the camera issue which clearly (3 people all having the issue) isn’t a network issue.

Can you paste your config here?

@3_14

- platform: xiaomi_cloud_map_extractor
    host: !secret robot_ip
    token: !secret robot_api
    username: !secret robot_user
    password: !secret robot_pass
    draw: ['all']
    attributes:
      - calibration_points
    scan_interval:
      seconds: 30
    auto_update: true

Do you know which server/country is your vacuum assigned to?

My App is assigned to United States. I changed it to Mainland China when I got the token, then switched back.

Can you check to which server is your token assigned? You can do it using tokens extractor. If it is China then I suggest resetting your vaccum and assigning it to a different server. After that you can add country in camera’s config to eliminate a need for country discovery.

I’ve never been able to get any of the token extractor’s to work. I had to use the method of iPhone backup, and extract the data.

How would I assign a different server?

When I try to use the token extractor, I get no devices found for all servers

If even extractor doesn’t work then I’m afraid that the problem might be somewhere else… I would suggest to try using it on a different network and device.

I think it should be assigned to current region of Xiaomi app when you connect it after a reset.

By the way, as far as I know tokens are invalidate after resetting

I reset to factor default, the token app still does not work.

I don’t have a different device and won’t do me any good to put it on a different network if the token changes every time you reset.

No, no, my idea was to try to use token extractor while being connected to a different network (e.g. via cellphone) with a PC. I doesn’t have to be in the same LAN as a vacuum, so you don’t have to reconfigure it.

I paired my laptop with my phone, still didn’t work.

How does a vacuum communicate with its server, which I connect to via my app/login credentials to control the vacuum but then this extractor says no devices found?