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

Timeouts fréquents sur l'appel à get_hosts_list #743

Open
fthiery opened this issue Dec 11, 2024 · 0 comments
Open

Timeouts fréquents sur l'appel à get_hosts_list #743

fthiery opened this issue Dec 11, 2024 · 0 comments

Comments

@fthiery
Copy link

fthiery commented Dec 11, 2024

Describe the bug

Dans les journaux Home Assistant core je vois souvent (environ 500 fois par jour) des timeouts sur la fonction get_hosts_list(); suis-je le seul ?

J'ai une freebox Delta, connectée en RJ45 à un Home Assistant Green.

Mon intégration freebox liste 18 appareils et 135 entités, dont 37 activées

{"box_model_name":"Freebox v7 (r1)","api_base_url":"\/api\/","https_port":xxxx,"device_name":"Freebox Server","https_available":true,"box_model":"fbxgw7-r1\/full","api_domain":"xxxx.fbxos.fr","uid":"xxxx","api_version":"12.2","device_type":"FreeboxServer7,1"}

log

2024-12-11 11:39:54.403 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1055, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 668, in read
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/freebox/router.py", line 130, in update_all
    await self.update_device_trackers()
  File "/usr/src/homeassistant/homeassistant/components/freebox/router.py", line 142, in update_device_trackers
    self.supports_hosts, fbx_devices = await get_hosts_list_if_supported(
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self._api
        ^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/components/freebox/router.py", line 75, in get_hosts_list_if_supported
    fbx_devices = await fbx_api.lan.get_hosts_list() or []
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/freebox_api/api/lan.py", line 64, in get_hosts_list
    return await self._access.get(f"lan/browser/{interface}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/freebox_api/access.py", line 122, in get
    return await self._perform_request(self.session.get, end_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/freebox_api/access.py", line 94, in _perform_request
    r = await verb(url, **request_params)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 728, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1050, in start
    with self._timer:
         ^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/helpers.py", line 671, in __exit__
    raise asyncio.TimeoutError from exc_val
TimeoutError

Ou encore

2024-12-11 10:44:35.691 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.freebox_wifi fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 701, 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 544, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1050, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/connector.py", line 1363, 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 1116, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs, sock=sock)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1182, in create_connection
    transport, protocol = await self._create_connection_transport(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
        ssl_shutdown_timeout=ssl_shutdown_timeout)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 1215, in _create_connection_transport
    await waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 960, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1318, in async_device_update
    await self.async_update()
  File "/usr/src/homeassistant/homeassistant/components/freebox/switch.py", line 75, in async_update
    data = await self._router.wifi.get_global_config()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/freebox_api/api/wifi.py", line 132, in get_global_config
    return await self._access.get("wifi/config/")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/freebox_api/access.py", line 122, in get
    return await self._perform_request(self.session.get, end_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/freebox_api/access.py", line 94, in _perform_request
    r = await verb(url, **request_params)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 607, in _request
    with timer:
         ^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/helpers.py", line 671, in __exit__
    raise asyncio.TimeoutError from exc_val
TimeoutError
2024-12-11 10:47:18.038 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1055, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/streams.py", line 668, in read
    await self._waiter
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/freebox/router.py", line 130, in update_all
    await self.update_device_trackers()
  File "/usr/src/homeassistant/homeassistant/components/freebox/router.py", line 142, in update_device_trackers
    self.supports_hosts, fbx_devices = await get_hosts_list_if_supported(
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self._api
        ^^^^^^^^^
    )
    ^
  File "/usr/src/homeassistant/homeassistant/components/freebox/router.py", line 75, in get_hosts_list_if_supported
    fbx_devices = await fbx_api.lan.get_hosts_list() or []
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/freebox_api/api/lan.py", line 64, in get_hosts_list
    return await self._access.get(f"lan/browser/{interface}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/freebox_api/access.py", line 122, in get
    return await self._perform_request(self.session.get, end_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/freebox_api/access.py", line 94, in _perform_request
    r = await verb(url, **request_params)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client.py", line 728, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.13/site-packages/aiohttp/client_reqrep.py", line 1050, in start
    with self._timer:
         ^^^^^^^^^^^
  File "/usr/local/lib/python3.13/site-packages/aiohttp/helpers.py", line 671, in __exit__
    raise asyncio.TimeoutError from exc_val
TimeoutError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant