core icon indicating copy to clipboard operation
core copied to clipboard

Errors with 2024.5.0 beta concerning roborock.coordinator and maps

Open Gloomyeye opened this issue 10 months ago • 1 comments

The problem

Hello,

with the newest beta version of home assistant two errors/warnings occur (see logs) during start of home assistant. The map entities of my two roborocks could not be initialized during startup and are not available anymore.

What version of Home Assistant Core has the issue?

core-2024.5.0b1

What was the last working version of Home Assistant Core?

core-2024.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

roborock

Link to integration documentation on our website

https://www.home-assistant.io/integrations/roborock/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.roborock.coordinator
Quelle: helpers/update_coordinator.py:315
Integration: Roborock (Dokumentation, Probleme)
Erstmals aufgetreten: 14:58:48 (1 Vorkommnisse)
Zuletzt protokolliert: 14:58:48

Unexpected error fetching roborock data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/roborock/coordinator.py", line 102, in _async_update_data
    await asyncio.gather(*(self._update_device_prop(), self.get_rooms()))
  File "/usr/src/homeassistant/homeassistant/components/roborock/coordinator.py", line 92, in _update_device_prop
    device_prop = await self.api.get_prop()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_client_v1.py", line 247, in get_prop
    status, clean_summary, consumable = await asyncio.gather(
                                        ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_client_v1.py", line 185, in get_clean_summary
    return CleanSummary(
           ^^^^^^^^^^^^^
  File "<string>", line 10, in __init__
  File "/usr/local/lib/python3.12/site-packages/roborock/containers.py", line 590, in __post_init__
    self.square_meter_clean_area = round(self.clean_area / 1000000, 1) if self.clean_area is not None else None
                                         ~~~~~~~~~~~~~~~~^~~~~~~~~
TypeError: unsupported operand type(s) for /: 'list' and 'int'


....


Logger: homeassistant.components.image
Quelle: helpers/entity_platform.py:356
Integration: Bild (Dokumentation, Probleme)
Erstmals aufgetreten: 11:07:22 (2 Vorkommnisse)
Zuletzt protokolliert: 11:13:53

Error while setting up roborock platform for image
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 39, in async_setup_entry
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 143, in create_coordinator_maps
    map_update = await asyncio.gather(
                 ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/roborock/coordinator.py", line 134, in get_rooms
    iot_rooms = await self.api.get_room_mapping()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_client_v1.py", line 278, in get_room_mapping
    mapping: list = await self.send_command(RoborockCommand.GET_ROOM_MAPPING)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_client_v1.py", line 463, in send_command
    response = await self._send_command(method, params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_local_client_v1.py", line 35, in _send_command
    return await self.send_message(roborock_message)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_local_client_v1.py", line 57, in send_message
    (response, err) = await async_response
                      ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/api.py", line 108, in _wait_response
    raise RoborockTimeout(f"id={request_id} Timeout after {self.queue_timeout} seconds") from None
roborock.exceptions.RoborockTimeout: id=23615 Timeout after 4 seconds

Additional information

No response

Gloomyeye avatar Apr 27 '24 15:04 Gloomyeye

Hey there @humbertogontijo, @lash-l, mind taking a look at this issue as it has been labeled with an integration (roborock) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of roborock can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign roborock Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


roborock documentation roborock source (message by IssueLinks)

home-assistant[bot] avatar Apr 27 '24 15:04 home-assistant[bot]

Can you please upload your diagnostics as well?

Lash-L avatar Apr 29 '24 01:04 Lash-L

I added my diagnostics.

Gloomyeye avatar Apr 29 '24 05:04 Gloomyeye

Can you please do the following:

Enable debug logging for Roborock

Go to developer tools -> Services -> Vacuum: Send Command

command is "get_clean_summary"

Select one of your vacuums at the entity. (Then select the other)

Get me the response from the debug log. That first error shouldn't be happening based on the diagnostic data you sent me.

Lash-L avatar Apr 30 '24 13:04 Lash-L

Hello, you can find attached the debug information: DELETED

With every restart the following error occurs:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
await asyncio.shield(awaitable)
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 39, in async_setup_entry
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 143, in create_coordinator_maps
map_update = await asyncio.gather(
^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/roborock/coordinator.py", line 134, in get_rooms
iot_rooms = await self.api.get_room_mapping()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_client_v1.py", line 278, in get_room_mapping
mapping: list = await self.send_command(RoborockCommand.GET_ROOM_MAPPING)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_client_v1.py", line 463, in send_command
response = await self._send_command(method, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_local_client_v1.py", line 35, in _send_command
return await self.send_message(roborock_message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/version_1_apis/roborock_local_client_v1.py", line 57, in send_message
(response, err) = await async_response
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/api.py", line 108, in _wait_response
raise RoborockTimeout(f"id={request_id} Timeout after {self.queue_timeout} seconds") from None
roborock.exceptions.RoborockTimeout: id=12645 Timeout after 4 seconds

The other error with "TypeError: unsupported operand type(s) for /: 'list' and 'int'" is not available anymore...

Gloomyeye avatar Apr 30 '24 21:04 Gloomyeye

Just to confirm all of your other entities show up, correct?

Lash-L avatar May 01 '24 01:05 Lash-L

Yes, that is correct. Only the image entities are unavailable.

Gloomyeye avatar May 01 '24 04:05 Gloomyeye

Thanks! Fix is working.

Gloomyeye avatar May 01 '24 15:05 Gloomyeye