uvjim / linksys_velop

Home Assistant integration for the Linksys Velop
MIT License
50 stars 7 forks source link

Timeout whilst contacting the node #528

Closed Huiyuen07 closed 1 day ago

Huiyuen07 commented 2 days ago

image

This is I experiencing the setup of the integration. I assume the primary node is the lan ip address of the node connecting to the wan. I am using MX8400 Mesh (2 x MX4200). Any suggestions? Thanks

uvjim commented 2 days ago

Without logs it's hard to say. I use the MX4200 here without issue.

It looks similar to #521. Have you tried the beta to see if that helps?

If not, could you provide debug logs please? Ensuring only to turn debug logging on for this integration and pyvelop.

Huiyuen07 commented 1 day ago

Sorry here is the log copied from system boot


記錄器: homeassistant.config_entries
來源: config_entries.py:635
首次發生: 上午4:33:34 (1 事件)
最後紀錄: 上午4:33:34

Error setting up entry Linksys Velop Mesh for linksys_velop
Traceback (most recent call last):
  File "/config/custom_components/linksys_velop/__init__.py", line 122, in async_setup_entry
    await mesh.async_initialise()
  File "/usr/local/lib/python3.12/site-packages/pyvelop/mesh.py", line 799, in async_initialise
    await self.async_detect_capabilities()
  File "/usr/local/lib/python3.12/site-packages/pyvelop/mesh.py", line 561, in async_detect_capabilities
    responses: list[tuple[api.Request, api.Response]] = await asyncio.gather(
                                                        ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyvelop/mesh.py", line 279, in _async_make_request
    raise err from None
  File "/usr/local/lib/python3.12/site-packages/pyvelop/mesh.py", line 277, in _async_make_request
    req_resp = await req.execute(timeout=self._timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyvelop/jnap.py", line 192, in execute
    raise MeshTimeoutError from err
pyvelop.exceptions.MeshTimeoutError: Timeout Error

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 635, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/linksys_velop/__init__.py", line 133, in async_setup_entry
    raise exc_mesh_timeout from exc
custom_components.linksys_velop.exceptions.GeneralMeshTimeout: initialise_mesh_timeout
uvjim commented 1 day ago

Thanks. Is this using the beta?

Also, could you confirm...

Did this used to work? Are you using the local router password (not the cloud account password)?

I'm struggling to work out why there's so many timeout issues recently.

Huiyuen07 commented 1 day ago

Same issue for the latest beta version. It’s my first time to try this integration and no luck all along the time. I think I am using the cloud account password and I am not aware of how to find a local router password. Is it the numbers on the router body? I remembered I have tried but it doesn’t work. I will try again when I get back to home.


記錄器: homeassistant.config_entries
來源: config_entries.py:635
首次發生: 下午1:34:59 (1 事件)
最後紀錄: 下午1:34:59

Error setting up entry Linksys Velop Mesh for linksys_velop
Traceback (most recent call last):
  File "/config/custom_components/linksys_velop/__init__.py", line 122, in async_setup_entry
    await mesh.async_initialise()
  File "/usr/local/lib/python3.12/site-packages/pyvelop/mesh.py", line 799, in async_initialise
    await self.async_detect_capabilities()
  File "/usr/local/lib/python3.12/site-packages/pyvelop/mesh.py", line 561, in async_detect_capabilities
    responses: list[tuple[api.Request, api.Response]] = await asyncio.gather(
                                                        ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyvelop/mesh.py", line 279, in _async_make_request
    raise err from None
  File "/usr/local/lib/python3.12/site-packages/pyvelop/mesh.py", line 277, in _async_make_request
    req_resp = await req.execute(timeout=self._timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pyvelop/jnap.py", line 192, in execute
    raise MeshTimeoutError from err
pyvelop.exceptions.MeshTimeoutError: Timeout Error

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 635, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/linksys_velop/__init__.py", line 133, in async_setup_entry
    raise exc_mesh_timeout from exc
custom_components.linksys_velop.exceptions.GeneralMeshTimeout: Timeout initialising the mesh (current timeout: 15.0s), consider increasing the timeout and reloading the integration
a `
uvjim commented 1 day ago

They don't make it particularly obvious. When using the app make sure Router Password is selected (screenshot is from the Android app).

Screenshot_20241201_090023_Linksys.png

Attempt the password you have been using, if it works, then I have an issue somewhere that I am yet to find. 😭

If it doesn't, then click on Reset Password. Follow the on-screen prompts using the Recovery Key printed on the bottom of the node.

You should then be able to login using the new password. Then try that new password in the integration (you may need to remove and re-add it).

Huiyuen07 commented 1 day ago

Sorry it may be a bad news to you. The password I entered is a local password.

I also appended the error screen for your reference.

image

uvjim commented 1 day ago

Aaahhh... But it looks like it set up and then keeps timing out... I'm assuming that you have the configure option available to you. Could you click that, increase the 15 seconds API timeout to say 60 seconds. Then reload the config (or restart Home Assistant) and see if you still get the error?

I have an idea on trying to share objects between the setup routine and the initialisation, but that probably won't get done today (well, it might get started).

Huiyuen07 commented 1 day ago

I removed the integrate and add it again. Set the mesh timeout for 60s. After long waiting time for few minutes, it works without issues so far. Thanks

uvjim commented 1 day ago

No problem. I think there's a timing issue somewhere that's only affecting a few people. I'll still try and see if I can speed things up a bit.

The delays might be from almost hitting the timeouts.