Open mwb9aa opened 10 months ago
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!
(message by CodeOwnersMention)
roborock documentation roborock source (message by IssueLinks)
Interesting.
Two things to try:
1) Disable the integration for a few days and then re-enable 2) Create a new roborock account - share your devices with yourself, and add those devices to Home assistant.
I do a lot to try to prevent getting rate limited, but perhaps having 5 vacuums is just too many for it to keep up with.
@Lash-L, thank you for helping me with this issue. I disabled the integration. I will check that the image entities show after re-enabling it in a couple of days. Since I have five robots, I figure I will enable one robot at a time to figure out where limits are. Is there anything else you would like me to test?
I have a single S7 Ultra Max and the map isn't working for my HAOS instance either. This is from the debug logs:
2024-01-18 18:03:25.381 WARNING (MainThread) [homeassistant.components.image] Setup of image platform roborock is taking over 10 seconds.
2024-01-18 18:03:25.582 ERROR (MainThread) [homeassistant.components.image] Error while setting up roborock platform for image
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 360, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 38, in async_setup_entry
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 147, in create_coordinator_maps
api_data: bytes = await coord.cloud_api.get_map_v1()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/roborock/cloud_api.py", line 210, in get_map_v1
return await self.send_command(RoborockCommand.GET_MAP_V1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 427, in send_command
response = await self._send_command(method, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/roborock/cloud_api.py", line 207, in _send_command
return await self.send_message(roborock_message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/roborock/cloud_api.py", line 185, in send_message
(response, err) = await async_response
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 358, in _wait_response
raise RoborockTimeout(f"id={request_id} Timeout after {self.queue_timeout} seconds") from None
roborock.exceptions.RoborockTimeout: id=24708 Timeout after 10 seconds
@Lash-L, While the integration was disabled, I also removed the image entities at /homeassistant/.storage/core.entity_registration. After five days, I enabled the integration. The maps showed back after restarting home assistant.
@Lash-L After a complete shutdown of HA and boot back up, the image is back on my instance as well. I didn't disable the integration, just a full shutdown / start up. Either way, all good now.
Hi!
I just installed the integration and I'm having also issues with this for a Roborock S8. Shutdown / reboot of HA does not do the trick:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform await asyncio.shield(task) File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 38, in async_setup_entry await asyncio.gather( File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 151, in create_coordinator_maps api_data: bytes = await coord.cloud_api.get_map_v1() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/cloud_api.py", line 210, in get_map_v1 return await self.send_command(RoborockCommand.GET_MAP_V1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/api.py", line 394, in send_command response = await self._send_command(method, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/cloud_api.py", line 207, in _send_command return await self.send_message(roborock_message) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/cloud_api.py", line 185, in send_message (response, err) = await async_response ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/api.py", line 325, in _wait_response raise RoborockTimeout(f"id={request_id} Timeout after {self.queue_timeout} seconds") from None roborock.exceptions.RoborockTimeout: id=29891 Timeout after 10 seconds
Any thoughts?
having the same problem
Logger: homeassistant.components.image
Source: helpers/entity_platform.py:344
Integration: Image (documentation, issues)
First occurred: 11:06:18 (1 occurrences)
Last logged: 11:06:18
Error while setting up roborock platform for image
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
await asyncio.shield(task)
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 38, in async_setup_entry
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 151, in create_coordinator_maps
api_data: bytes = await coord.cloud_api.get_map_v1()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/cloud_api.py", line 210, in get_map_v1
return await self.send_command(RoborockCommand.GET_MAP_V1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/api.py", line 394, in send_command
response = await self._send_command(method, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/cloud_api.py", line 207, in _send_command
return await self.send_message(roborock_message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/cloud_api.py", line 185, in send_message
(response, err) = await async_response
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/roborock/api.py", line 325, in _wait_response
raise RoborockTimeout(f"id={request_id} Timeout after {self.queue_timeout} seconds") from None
roborock.exceptions.RoborockTimeout: id=27662 Timeout after 10 seconds
@Lash-L as you mentioned-
I do a lot to try to prevent getting rate limited
I have a single robot but I'm seeing this failure in my logs, upwards of 24,000 times in under 30 minutes. Does this mean that the Roborock integration is sending requests at nearly 1,000 times per minute? This issue seems to be causing my entire Home Assistant to be unreliable- since this issue appeared for me a few days ago I've only been able to access it intermittently. Of course I could be getting cause and effect mixed up here- maybe something else is messing with my network and this is just a symptom. Appreciate any help with figuring this out.
My log info:
Logger: aiohttp.server
Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421
First occurred: 5:09:02 PM (24733 occurrences)
Last logged: 5:35:06 PM
@Lash-L as you mentioned-
I do a lot to try to prevent getting rate limited
I have a single robot but I'm seeing this failure in my logs, upwards of 24,000 times in under 30 minutes. Does this mean that the Roborock integration is sending requests at nearly 1,000 times per minute?
This issue seems to be causing my entire Home Assistant to be unreliable- since this issue appeared for me a few days ago I've only been able to access it intermittently. Of course I could be getting cause and effect mixed up here- maybe something else is messing with my network and this is just a symptom. Appreciate any help with figuring this out.
My log info:
Logger: aiohttp.server Source: /usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py:421 First occurred: 5:09:02 PM (24733 occurrences) Last logged: 5:35:06 PM
Expand for Traceback
``` Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 88, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/image/__init__.py", line 296, in get return await self.handle(request, image_entity) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/image/__init__.py", line 303, in handle image = await _async_get_image(image_entity, IMAGE_TIMEOUT) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/image/__init__.py", line 89, in _async_get_image if image_bytes := await image_entity.async_image(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 99, in async_image map_data: bytes = await self.cloud_api.get_map_v1() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/cloud_api.py", line 210, in get_map_v1 return await self.send_command(RoborockCommand.GET_MAP_V1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/api.py", line 397, in send_command response = await self._send_command(method, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/cloud_api.py", line 207, in _send_command return await self.send_message(roborock_message) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/cloud_api.py", line 185, in send_message (response, err) = await async_response ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/roborock/api.py", line 328, in _wait_response raise RoborockTimeout(f"id={request_id} Timeout after {self.queue_timeout} seconds") from None roborock.exceptions.RoborockTimeout: id=23263 Timeout after 10 seconds ```
What version of HA are you on?
I'm running HAOS. Here's the output from http://homeassistant.local:8123/config/info
:
Core: 2024.4.3 Supervisor: 2024.04.0 Operating System: 12.2 Frontend: 20240404.2
Let me know if there's anything I can do to help debug.
Hi @jason-curtis I'm slowly working on this - but i've been very overwhelmed and have a lot i am trying to balance and this is a rather complicated issue (something is spawning new connection requests) but I haven't been able to recreate it very well myself.
My thought is I am just going to make a singleton that handles all of the mqtt connections that way even on failure, there's no way a second connection will be made. But that takes time
I see something similiar:
Logger: roborock.cloud_api Source: /usr/local/lib/python3.12/site-packages/roborock/api.py:332 First occurred: 26 June 2024 at 09:36:25 (5182 occurrences) Last logged: 14:40:55
[Roborock S8 Pro Ultra] A network protocol error occurred when communicating with the broker.
&
Logger: roborock.cloud_api Source: /usr/local/lib/python3.12/site-packages/roborock/cloud_api.py:63 First occurred: 26 June 2024 at 09:36:25 (5182 occurrences) Last logged: 14:40:55
[Roborock S8 Pro Ultra] Failed to connect (Unknown error.)
Running this version: Core 2024.6.3 Frontend 20240610.1
Is there any info I can provide that can make it easier to troubleshoot?
Robot is working through HA despite those errors.
I just switched from the hacks version to the official integration. The integration does not create a camera entity.
I get this in the logs
2024-09-03 11:03:43.332 ERROR (MainThread) [homeassistant.components.image] Error while setting up roborock platform for image
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
await asyncio.shield(awaitable)
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 43, in async_setup_entry
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 183, in create_coordinator_maps
RoborockMap(
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 79, in __init__
self.cached_map = self._create_image(starting_map)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 138, in _create_image
parsed_map = self.parser.parse(map_bytes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vacuum_map_parser_roborock/map_data_parser.py", line 95, in parse
map_header_length = RoborockMapDataParser._get_int16(raw, 0x02)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vacuum_map_parser_roborock/map_data_parser.py", line 400, in _get_int16
return ((data[address + 0] << 0) & 0xFF) | ((data[address + 1] << 8) & 0xFFFF)
~~~~^^^^^^^^^^^^^
IndexError: index out of range
I dont know if it related but the selected map often goes to "unknown" even though it is displayed in the roborock app
Hi everyone,
I also have the same issue. No camera entity after switching from HACS to Core. I've tried to delete and reinstall, rebooting the host. Nothing helps.
Hope for your help. Thanks!
2024-11-02 15:29:51.523 ERROR (MainThread) [homeassistant.components.image] Error while setting up roborock platform for image
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
await asyncio.shield(awaitable)
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 43, in async_setup_entry
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 183, in create_coordinator_maps
RoborockMap(
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 79, in __init__
self.cached_map = self._create_image(starting_map)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/roborock/image.py", line 138, in _create_image
parsed_map = self.parser.parse(map_bytes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vacuum_map_parser_roborock/map_data_parser.py", line 95, in parse
map_header_length = RoborockMapDataParser._get_int16(raw, 0x02)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/vacuum_map_parser_roborock/map_data_parser.py", line 400, in _get_int16
return ((data[address + 0] << 0) & 0xFF) | ((data[address + 1] << 8) & 0xFFFF)
~~~~^^^^^^^^^^^^^
IndexError: index out of range
I tried to switch from HACS to the Core integration. Same issue (no camera item) and errors as for @wormiedk, @NewFolk. I switched back to HACS since the camera item is available and I can fully control my vacuum.
@Lash-L any further information I can provide to support you with troubleshooting?
The problem
The image entity used to be on the Roborock integration. After a few weeks, the entity became unavailable. I tried restarting HA and reloading the integration multiple times in various combinations, but nothing made the entity available. I finally deleted the integration, restarted HA, installed the integration again. The image/map entity is not showing up, not even as unavailable.
What version of Home Assistant Core has the issue?
core-2024.1.3
What was the last working version of Home Assistant Core?
a november core, I think
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
config_entry-roborock-f048dd37e1ed8a79e79a1ababdbeb420.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
I have five robots (S6 Pure, S7, S7 MaxxV, and two S8's) and none of them display a map entity. Is there a file in HA where some information might be that I need to delete manually?