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

Not load map from roidmi.vacuum.sdj60 #572

Open
2 tasks done
Splintergreen opened this issue Dec 11, 2024 · 2 comments
Open
2 tasks done

Not load map from roidmi.vacuum.sdj60 #572

Splintergreen opened this issue Dec 11, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Splintergreen
Copy link

Checklist

  • I have updated the integration to the latest version available
  • I have checked if the problem is already reported

The problem

Can't load map from my roidmi.vacuum.sdj60
image

What version of an integration has described problem?

v2.2.1

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

roidmi.vacuum.sdj60

What version of Home Assistant do you use?

2023.5.2

What type of installation are you running?

Home Assistant Container

Camera's configuration

camera:
  - platform: xiaomi_cloud_map_extractor
    host: !secret xiaomi_vacuum_host
    token: !secret xiaomi_vacuum_token
    force_api: xiaomi
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password
    draw: ['all']
    attributes:
      - calibration_points
      - rooms

Errors shown in the HA logs (if applicable)

With force_api: xiaomi i have error:

2024-12-11 21:32:02.180 ERROR (MainThread) [custom_components.xiaomi_miot.vacuum] ROIDMI EVE MAX(roidmi.vacuum.sdj60): Got MiioException while fetching the state: No response from the device, mapping: {'vacuum.status': {'siid': 2, 'piid': 1}, 'vacuum.fault': {'siid': 2, 'piid': 2}, 'vacuum.mode': {'siid': 2, 'piid': 4}, 'sweep.sweep_mode': {'siid': 14, 'piid': 1}, 'map.clean_path': {'siid': 13, 'piid': 1}, 'map.multi_maps_info': {'siid': 13, 'piid': 6}, 'brush_left_time-16-1': {'siid': 16, 'piid': 1}, 'brush_life_level-16-2': {'siid': 16, 'piid': 2}, 'mop-15.mop_life_level': {'siid': 15, 'piid': 1}, 'mop-15.mop_left_time': {'siid': 15, 'piid': 2}, 'brush_left_time-12-1': {'siid': 12, 'piid': 1}, 'brush_life_level-12-2': {'siid': 12, 'piid': 2}, 'brush_cleaner.brush_left_time': {'siid': 11, 'piid': 1}, 'brush_cleaner.brush_life_level': {'siid': 11, 'piid': 2}, 'speaker.volume': {'siid': 10, 'piid': 2}, 'mop.mop_life_level': {'siid': 9, 'piid': 1}, 'mop.mop_left_time': {'siid': 9, 'piid': 2}, 'battery_level': {'siid': 3, 'piid': 1}}, max_properties: 9/18

With other force_api:
2024-12-11 21:36:15.027 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 554, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update
    await coro
  File "/usr/local/lib/python3.10/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

Additional information

No response

@Splintergreen Splintergreen added the bug Something isn't working label Dec 11, 2024
@Splintergreen
Copy link
Author

Splintergreen commented Jan 9, 2025

After upgrading to the latest versions of HA,Xiaomi Miot Auto, Xiaomi Cloud Map Extractor.
Current version: HA 2025.1.1, Xiaomi Miot Auto 1.0.8, Xiaomi Cloud Map Extractor 2.2.3
If I use force_api: xiaomi, I get endless delays and a timeout when loading the card.

2025-01-07 20:50:37.807 ERROR (SyncWorker_2) [miio.miioprotocol] Got error when receiving: {'code': -9999, 'message': 'user ack timeout'}
2025-01-07 20:50:37.808 WARNING (SyncWorker_2) [custom_components.xiaomi_cloud_map_extractor.camera] Got exception while fetching the state: Unable to recover failed command
2025-01-07 20:50:38.876 DEBUG (SyncWorker_2) [custom_components.xiaomi_cloud_map_extractor.camera] Asking device for map name... (10/10)
2025-01-07 20:50:55.097 ERROR (SyncWorker_2) [miio.miioprotocol] Got error when receiving: {'code': -9999, 'message': 'user ack timeout'}
2025-01-07 20:50:55.098 WARNING (SyncWorker_2) [custom_components.xiaomi_cloud_map_extractor.camera] Got exception while fetching the state: Unable to recover failed command

If I use force_api: roidmi, I get an error:

2025-01-09 11:13:43.593 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map from Xiaomi cloud
2025-01-09 11:13:43.774 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"]:
                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

@horinka-gabor
Copy link

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants