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

Roborock: Not setting up P20 Pro because the coordinator failed to get data for the first time using the offline client #141120

Closed
giorgiopogliani opened this issue Mar 22, 2025 · 8 comments

Comments

@giorgiopogliani
Copy link

giorgiopogliani commented Mar 22, 2025

The problem

is there a way to avoid the download of map data?

What version of Home Assistant Core has the issue?

core-2025.3.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

roborock

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

Anything in the logs that might be useful for us?

2025-03-22 16:23:36.142 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ****@****.com for roborock
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1116, in _wrap_create_connection
    sock = await aiohappyeyeballs.start_connection(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohappyeyeballs/impl.py", line 73, in start_connection
    sock = await _connect_sock(
           ^^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohappyeyeballs/impl.py", line 208, in _connect_sock
    await loop.sock_connect(sock, address)
  File "/usr/local/lib/python3.13/asyncio/selector_events.py", line 641, in sock_connect
    return await fut
           ^^^^^^^^^
asyncio.exceptions.CancelledError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 703, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        req, traces=traces, timeout=real_timeout
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 548, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1056, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1411, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1380, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<7 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1113, in _wrap_create_connection
    async with ceil_timeout(
               ~~~~~~~~~~~~^
        timeout.sock_connect, ceil_threshold=timeout.ceil_threshold
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ):
    ^
  File "/usr/local/lib/python3.13/asyncio/timeouts.py", line 116, in __aexit__
    raise TimeoutError from exc_val
TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 753, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/roborock/__init__.py", line 50, in async_setup_entry
    home_data = await api_client.get_home_data_v2(user_data)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/roborock/web_api.py", line 317, in get_home_data_v2
    home_id = await self._get_home_id(user_data)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/roborock/web_api.py", line 274, in _get_home_id
    home_id_response = await home_id_request.request(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<3 lines>...
    )
    ^
  File "/usr/local/lib/python3.13/site-packages/roborock/web_api.py", line 454, in request
    async with session.request(method, _url, params=params, data=data, headers=_headers, json=json) as resp:
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 1425, in __aenter__
    self._resp: _RetType = await self._coro
                           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 707, in _request
    raise ConnectionTimeoutError(
        f"Connection timeout to host {url}"
    ) from exc
aiohttp.client_exceptions.ConnectionTimeoutError: Connection timeout to host https://cniot.roborock.com/api/v1/getHomeDetail
2025-03-22 16:26:07.458 WARNING (MainThread) [homeassistant.components.roborock] Not setting up P20 Pro because the coordinator failed to get data for the first time using the offline client Please create an issue with the following error included: Failed to get map data: {err}

Additional information

No response

@mib1185
Copy link
Contributor

mib1185 commented Mar 22, 2025

@giorgiopogliani please provide the error message again as a comment and don't put it into the headline, thx 👍

@giorgiopogliani
Copy link
Author

Roborock: Not setting up P20 Pro because the coordinator failed to get data for the first time using the offline client Please create an issue with the following error included: Failed to get map data: {err}

What the title shoud be?

@mib1185
Copy link
Contributor

mib1185 commented Mar 22, 2025

What the title shoud be?

A title should never be a whole sentence, nor contain a full blown error message (parts are ok) ... it should just be as short as possible and long as needed.

Further were exactly did you see this error? is it from a log or shown in the WebUI?

@giorgiopogliani giorgiopogliani changed the title Roborock: Not setting up P20 Pro because the coordinator failed to get data for the first time using the offline client Please create an issue with the following error included: Failed to get map data: {err} Roborock: Not setting up P20 Pro because the coordinator failed to get data for the first time using the offline client Mar 22, 2025
@giorgiopogliani
Copy link
Author

@mib1185 in the logs, I updated the issue with the full stack trace of the error

@home-assistant
Copy link

Hey there @Lash-L, @allenporter, 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)

@Lash-L
Copy link
Contributor

Lash-L commented Mar 22, 2025

Is your question if you can use the device 100% offline? If so - the answer is no. The device itself cannot work 100% offline and therefore neither can the integration

@giorgiopogliani
Copy link
Author

Ok, i was afraid that was the case. Anyway i could just start it? Becasue if i manually push the button it starts, of course i can't control anything more than that but at least is working.

If not I might just add a remote button pusher to do it.

@Lash-L
Copy link
Contributor

Lash-L commented Mar 23, 2025

Ok, i was afraid that was the case. Anyway i could just start it? Becasue if i manually push the button it starts, of course i can't control anything more than that but at least is working.

If not I might just add a remote button pusher to do it.

Unfortunately not. If you send a command locally, the vacuum will run it once and then it will reset its wifi connection and get stuck in a endless loop trying to connect to the cloud servers. It's a limitation of the device unfortunately. A silly limitation, as it can work 100% locally, they just don't let it

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

No branches or pull requests

4 participants