Roborock Integration error

Hi all,
I updated to 2023.7.1 over the weekend and the Roborock integration stopped worked. I have deleted the integration and tried again.

Looking at my logs, the integration goes through logging in and pulling home data, then it stops and gives me a nice verbose Python error:

2023-07-10 09:42:18.462 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [email protected] for roborock
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 390, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/roborock/__init__.py", line 45, in async_setup_entry
    network_results = await asyncio.gather(
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 470, in get_networking
    return await self.send_command(RoborockCommand.GET_NETWORK_INFO, return_type=NetworkInfo)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 370, in send_command
    response = await self._send_command(method, params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/cloud_api.py", line 189, in _send_command
    return await self.send_message(roborock_message)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/cloud_api.py", line 167, in send_message
    (response, err) = await self._async_response(request_id, response_protocol)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 309, in _async_response
    raise RoborockTimeout(f"id={request_id} Timeout after {QUEUE_TIMEOUT} seconds") from None
roborock.exceptions.RoborockTimeout: id=32296 Timeout after 4 seconds

Any idea what’s going on here?

A Timeout error here implies that HA can’t communicate with the vacuum at all. We get networking information from the cloud client, not the local one.

Can you please check that your vacuum can be reached using the Roborock app? Are you using the official or custom integration for Roborock?

I have several timeout issues on different integrations after installing 2023.7.1, including this integration. I have not yet identified what’s going on. I have upgraded to the newest Debian ver. 12, and can see ex. RTSP streams from video is going on/off etc. So maybe something in the update that is having trouble with network ?

I reset the wifi and now I can add my account as an integration entity but there are no device entities. It’s for a S6Max and it worked before the 2023.7 upgrade.

Core or custom? Anything in logs?

I had this same error as well as other timeout errors in 2023.7. I restored a backup to 2023.6 and the integration started working again. My error log with debug was very similar: a timeout of 4 seconds.

2023-07-16 18:09:28.570 INFO (MainThread) [roborock.cloud_api] Connecting to mqtt
2023-07-16 18:09:28.748 INFO (MainThread) [roborock.cloud_api] Starting mqtt loop
2023-07-16 18:09:28.750 INFO (MainThread) [roborock.cloud_api] Connecting to mqtt
2023-07-16 18:09:28.781 INFO (Thread-422 (_thread_main)) [roborock.cloud_api] Connected to mqtt mqtt-us.roborock.com:8883
2023-07-16 18:09:28.782 INFO (Thread-422 (_thread_main)) [roborock.cloud_api] Subscribed to topic rr/m/o/69UKJheWhrRBco0audwgeK/acbe10fc/3qAWfuiNt47sRKUpIHqgDr
2023-07-16 18:09:28.851 INFO (MainThread) [roborock.cloud_api] Starting mqtt loop
2023-07-16 18:09:28.861 DEBUG (MainThread) [roborock.cloud_api] id=10109 Requesting method get_network_info with []
2023-07-16 18:09:28.885 INFO (Thread-423 (_thread_main)) [roborock.cloud_api] Connected to mqtt mqtt-us.roborock.com:8883
2023-07-16 18:09:28.886 INFO (Thread-423 (_thread_main)) [roborock.cloud_api] Subscribed to topic rr/m/o/69UKJheWhrRBco0audwgeK/acbe10fc/3ZiOW9FOxGKvwZpj1wB7PH
2023-07-16 18:09:28.887 DEBUG (MainThread) [roborock.cloud_api] id=30125 Requesting method get_network_info with []
2023-07-16 18:09:29.040 DEBUG (MainThread) [roborock.cloud_api] id=10109 Response from get_network_info: {'ssid': '[My SSID Removed]', 'ip': '192.168.*.***', 'mac': 'b0:4a:**:**:**:**', 'bssid': '26:5a:**:**:**:**', 'rssi': -50}
2023-07-16 18:09:32.889 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [My User Removed] for roborock
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 390, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/roborock/__init__.py", line 45, in async_setup_entry
    network_results = await asyncio.gather(
                      ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 480, in get_networking
    return await self.send_command(RoborockCommand.GET_NETWORK_INFO, return_type=NetworkInfo)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 380, in send_command
    response = await self._send_command(method, params)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/cloud_api.py", line 189, in _send_command
    return await self.send_message(roborock_message)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/cloud_api.py", line 167, in send_message
    (response, err) = await self._async_response(request_id, response_protocol)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 319, in _async_response
    raise RoborockTimeout(f"id={request_id} Timeout after {QUEUE_TIMEOUT} seconds") from None
roborock.exceptions.RoborockTimeout: id=30125 Timeout after 4 seconds

All core on Home Assistant OS on a Pi4.

I have the exact same issue. Even 2023.8, the phone APP is working

2023-08-04 01:06:49.410 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry [email protected] for roborock
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 388, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/roborock/init.py”, line 45, in async_setup_entry
network_results = await asyncio.gather(
^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/roborock/api.py”, line 480, in get_networking
return await self.send_command(RoborockCommand.GET_NETWORK_INFO, return_type=NetworkInfo)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/roborock/api.py”, line 380, in send_command
response = await self._send_command(method, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/roborock/cloud_api.py”, line 189, in _send_command
return await self.send_message(roborock_message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/roborock/cloud_api.py”, line 167, in send_message
(response, err) = await self._async_response(request_id, response_protocol)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/roborock/api.py”, line 319, in _async_response
raise RoborockTimeout(f"id={request_id} Timeout after {QUEUE_TIMEOUT} seconds") from None
roborock.exceptions.RoborockTimeout: id=32208 Timeout after 4 seconds

This should be fixed in 2023.8.2

Still have the issue after 2023.8.2

Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:137
First occurred: 4:15:39 PM (918 occurrences)
Last logged: 6:47:54 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 321, in _wait_response
    raise RoborockTimeout(f"id={request_id} Timeout after {QUEUE_TIMEOUT} seconds") from None
roborock.exceptions.RoborockTimeout: id=0 Timeout after 4 seconds

Hello,

I have a same issue :

Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:137
First occurred: 16:20:09 (12 occurrences)
Last logged: 16:21:11

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/roborock/api.py", line 321, in _wait_response
    raise RoborockTimeout(f"id={request_id} Timeout after {QUEUE_TIMEOUT} seconds") from None
roborock.exceptions.RoborockTimeout: id=0 Timeout after 4 seconds

Agreed. Upgraded to 2023.8.2 and still see:

2023-08-14 11:44:31.085 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.028 seconds (success: True)
2023-08-14 11:45:05.547 ERROR (MainThread) [custom_components.roborock.coordinator] Error fetching roborock data: id=25738 Timeout after 4 seconds
2023-08-14 11:45:05.548 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 4.490 seconds (success: False)
2023-08-14 11:45:35.506 INFO (MainThread) [custom_components.roborock.coordinator] Fetching roborock data recovered
2023-08-14 11:45:35.506 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.448 seconds (success: True)
2023-08-14 11:46:05.442 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.384 seconds (success: True)
2023-08-14 11:46:36.164 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 1.107 seconds (success: True)
2023-08-14 11:47:06.471 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.414 seconds (success: True)
2023-08-14 11:47:36.084 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.027 seconds (success: True)
2023-08-14 11:48:06.564 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.507 seconds (success: True)
2023-08-14 11:48:36.123 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.065 seconds (success: True)
2023-08-14 11:49:06.087 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.031 seconds (success: True)
2023-08-14 11:49:36.434 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.376 seconds (success: True)
2023-08-14 11:50:06.130 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.072 seconds (success: True)
2023-08-14 11:50:36.138 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.081 seconds (success: True)
2023-08-14 11:51:06.088 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.031 seconds (success: True)
2023-08-14 11:51:36.230 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.173 seconds (success: True)
2023-08-14 11:52:06.424 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.367 seconds (success: True)
2023-08-14 11:52:36.393 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.336 seconds (success: True)
2023-08-14 11:53:06.132 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.075 seconds (success: True)
2023-08-14 11:53:36.093 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.036 seconds (success: True)
2023-08-14 11:54:07.146 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 1.089 seconds (success: True)
2023-08-14 11:54:37.159 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.102 seconds (success: True)
2023-08-14 11:55:07.438 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.381 seconds (success: True)
2023-08-14 11:55:37.958 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.900 seconds (success: True)
2023-08-14 11:56:07.489 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.433 seconds (success: True)
2023-08-14 11:56:37.086 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.029 seconds (success: True)
2023-08-14 11:57:07.442 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.385 seconds (success: True)
2023-08-14 11:57:37.126 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.068 seconds (success: True)
2023-08-14 11:58:07.438 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.381 seconds (success: True)
2023-08-14 11:58:41.059 ERROR (MainThread) [custom_components.roborock.coordinator] Error fetching roborock data: id=28628 Timeout after 4 seconds
2023-08-14 11:58:41.060 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 4.003 seconds (success: False)
2023-08-14 11:59:11.085 INFO (MainThread) [custom_components.roborock.coordinator] Fetching roborock data recovered
2023-08-14 11:59:11.085 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.028 seconds (success: True)
2023-08-14 11:59:41.229 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.172 seconds (success: True)
2023-08-14 12:00:11.074 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.018 seconds (success: True)
2023-08-14 12:00:41.103 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 0.046 seconds (success: True)
2023-08-14 12:01:15.060 ERROR (MainThread) [custom_components.roborock.coordinator] Error fetching roborock data: id=19640 Timeout after 4 seconds
2023-08-14 12:01:15.061 DEBUG (MainThread) [custom_components.roborock.coordinator] Finished fetching roborock data in 4.004 seconds (success: False)

so this integration is currently broken? (is for me) is there anywhere this gets posted?

Still broken in 2023.9.0! This has been broken for several months now

My Roborock integration was working. Not quite sure which dot version I was on exactly, but it was 2023.8.X. Upgraded yesterday to 2023.9.1 and it stopped working. I reloaded several times, restarted HA, no luck. Then just as I was typing this now I tried reloading again so I could grab the log error to paste, and it worked.

Edit: looks like there are roborock server issues. Maps aren’t loading in my official roborock app.

1 Like

same error. I have a roborock s7 Max

1 Like

Same here with 11.2

Logger: homeassistant.components.roborock.coordinator
Source: helpers/update_coordinator.py:322
Integration: Roborock (documentation, issues)
First occurred: 03:09:46 (2 occurrences)
Last logged: 05:51:50

Error fetching roborock data: Failed connecting to 192.168.1.100
Error fetching roborock data: id=18142 Timeout after 4 seconds

Vacuum is S8 Pro Ultra. Both the official and custom integration times out randomly after some hours, but manually reloading the integration fixes is.

Network is Unifi, and AP is in line of sight of the vacuum, wifi signal strength is for sure not a problem

Maybe a Roborock issue, but can the timeout be increased or retry added?

@Apolitosz
I have nearly the same setup as you → Unfi (UDMP, APs, Switches)
and two Roborock Vaccums.

And my ErrorMsg :
and this comes daily at 3:09 am

Logger: custom_components.roborock.coordinator
Source: helpers/update_coordinator.py:322
Integration: Roborock (documentation, issues)
First occurred: 03:09:31 (2 occurrences)
Last logged: 03:38:34

Error fetching roborock data: Failed connecting to 192.168.1.224
Error fetching roborock data: Failed connecting to 192.168.1.78

I’ve done the following things now:

→ moved both vacuums to a simple vlan
→ both vacuums have an excellent wifi connection
→ both vaccums have a fixed IP
→ APs ssid set to channel 11 / no channel switching
→ both vacuums locked to nearby AP to avoid AP changes
→ changed the SCAN_INTERVAL from 5 to 10 seconds in (roborock code) / to get rid of the map_extractor took over 10 seconds log message.

but until now … same issue with failed connects.

TODAY (DEC 05, 2023) I changed again something in the roborock code. Maybe that works :smiley: we will see tomorrow :smiley:

BR
hapadev

This happens to mine (S7maxv) no matter if I use the roborock integration or the Xiaomi (what I’m using right now)

Not sure if it’s the exact time as yours but yeah drops off almost daily.

I also have UniFi gear and have gone down the path of trying to troubleshoot it. As you’ve already discovered most recommend stripping all the ‘automagic’ stuff off the 2.4g AP serving the bot. (been there, done that,) and it continues to do it.

But if you’re seeing this you’re probably on unifi and if you haven’t noticed a forced reconnect in Unifi brings it back immediately.

Ive been using this script to bounce the network connection on the bot nightly and whenever I detect the bot status entity unknown for more than a couple minutes

service: unifi.reconnect_client
data:
  device_id: [your UniFi device for your bot] 
alias: Force Bot WIFI Reconnect

Only device Id is available for the service call at least I the UI. I’m planning to see if I can find a way to refer to it by entity_id instead but for now this hack keeps mine online and not missing a scheduled clean

1 Like

Hey NathanCu,

thanks for the idee to use the “reconnect service”.
I will try to figure out what happens after my changes in the roborock files …
and if this doesn’t work I would like to test your idea.

I will share feedback asap

BR,
hapadev

1 Like