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

Errors with 2024.5.0 beta concerning roborock.coordinator and maps #116300

Closed
Gloomyeye opened this issue Apr 27, 2024 · 8 comments · Fixed by #116487
Closed

Errors with 2024.5.0 beta concerning roborock.coordinator and maps #116300

Gloomyeye opened this issue Apr 27, 2024 · 8 comments · Fixed by #116487

Comments

@Gloomyeye
Copy link

Gloomyeye commented Apr 27, 2024

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. Every vaccum has only one map availalble.

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

DELETED

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

@home-assistant
Copy link

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)

@mib1185 mib1185 added this to the 2024.5.0 milestone Apr 27, 2024
@Lash-L
Copy link
Contributor

Lash-L commented Apr 29, 2024

Can you please upload your diagnostics as well?

@Gloomyeye
Copy link
Author

I added my diagnostics.

@Lash-L
Copy link
Contributor

Lash-L commented Apr 30, 2024

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.

@Gloomyeye
Copy link
Author

Gloomyeye commented Apr 30, 2024

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...

@Lash-L
Copy link
Contributor

Lash-L commented May 1, 2024

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

@Lash-L Lash-L mentioned this issue May 1, 2024
20 tasks
@Gloomyeye
Copy link
Author

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

@Gloomyeye
Copy link
Author

Thanks! Fix is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants