uvjim / linksys_velop

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

2024.11.1 is Timing out #505

Closed ahmedelhaw closed 2 weeks ago

ahmedelhaw commented 2 weeks ago

Thank you for the awesome integration.

I updated the integration to 2024.11.1, it times out on my mesh. I got MX5600 and MX5500 (Child and Parent) I have latest HA version I roll back to 2024.10.2 it works fine.

image image

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 559, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, 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 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, 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/http/decorators.py", line 81, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 285, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 410, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 517, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/linksys_velop/config_flow.py", line 705, in async_step_device_trackers
    self._devices = await _async_get_devices(mesh=mesh)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/linksys_velop/config_flow.py", line 274, in _async_get_devices
    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
PaulusThe1 commented 2 weeks ago

Stesso problema. "Configurazione non riuscita"

uvjim commented 2 weeks ago

Can anyone pinpoint when this started to happen? i.e., did a particular beta cause this? I'm not seeing the issue here, so I'll need some help narrowing it down.

wormuths commented 2 weeks ago

I just upgraded HA from 2024.10.3 I think. I'm going to roll back and start over because I upgraded HA and this integration. Not sure which did it at this point, but I can do 1 at a time and see which breaks it...

uvjim commented 2 weeks ago

I think it'll be the integration version that is most interesting. I am running HA 2024.11.1 without issue, so I'm confident it is most likely the integration. I'm going to assume that one of the integration betas introduced the issue for all here.

wormuths commented 2 weeks ago

After the rollback, I'm on v2024.9.1 on this integration and it's working.

ahmedelhaw commented 2 weeks ago

To me, this happened with linksys integration v2024.11.1 (haven't tried any beta only the sharp release), when I rollback to 2024.10.2 it works fine.

Core 2024.11.1 Supervisor 2024.11.2 Operating System 13.2 Rpi4

uvjim commented 2 weeks ago

If you could try the betas, that would be great. I think I can guess which one may have caused it, but I'd rather not guess.

wormuths commented 2 weeks ago

I got everything restored, up and running again. I'm running out right now, unfortunately. I'm staying at 2024.9.1 right now so things keep working. I will dive back into this later. Maybe someone will get to try the beta by then and see if it restores functionality.

Thanks for the help, and the work...

ahmedelhaw commented 2 weeks ago

2024.11.1b52024.11.1b4 Did not test 2024.11.1b3 ✔️ sorry spoke too soon, it completed the configuration page but failed to setup

Source: config_entries.py:635
First occurred: 12:12:38 AM (1 occurrences)
Last logged: 12:12:38 AM

Error setting up entry 192.168.1.1 for linksys_velop
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 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
uvjim commented 2 weeks ago

Thanks. I'm not sure what change between those versions would have caused this. However, I have just put 2024.11.2b0 available for install. I've sped up the gathering of devices when re-configuring and also put a (hopefully) better message in for a timeout on initialising.

If you could give that version a try it would be appreciated.

ahmedelhaw commented 2 weeks ago

Your work is what's appreciated...

Yes I can confirm that 2024.11.2b0 is up and running smoothly :thumbsup:

uvjim commented 2 weeks ago

Well, that's good. I wonder if the new initialise routine was running close to the timeout period for your devices. Keep an eye on it. I'll leave this issue open for a few days just in case.

uvjim commented 2 weeks ago

2024.11.1b3 ✔️ sorry spoke too soon, it completed the configuration page but failed to setup

Haha. Just saw this. I think it was probably 2024.11.1b0 that introduced the issue. Hopefully the changes just made will hold stable for you.

ahmedelhaw commented 2 weeks ago

Well, that's good. I wonder if the new initialise routine was running close to the timeout period for your devices. Keep an eye on it. I'll leave this issue open for a few days just in case.

Actually I did try increasing timeout on my own yesterday from 10to 15, but no dough.

uvjim commented 2 weeks ago

Did you reload the integration afterwards? I found earlier that if I changed the timeout after the error occurred (I could only force a timeout by dropping my timeout to something like 5 seconds) that I needed to reload the config.

I'll have to get that fixed as well, so that'll probably mean another beta soon.

wormuths commented 2 weeks ago

Your work is what's appreciated...

Yes, very much appreciated. I have found that the six nodes I purchased long ago were never quite stable, and the claim that they "self repair" their connectivity is questionable. Nodes would drop and never regain connection until I power cycled them. Because of that I use this integration in conjunction with smart plugs to automate rebooting any node that drops their backhaul connection for more than 10 minutes. It's actually YOUR INTEGRATION that keeps my network functioning, so thanks a million.

When I see 2024.11.2 show up I'll backup, install it, and report back if it works for me as well.

wormuths commented 2 weeks ago

Your work is what's appreciated...

Yes I can confirm that 2024.11.2b0 is up and running smoothly 👍

Thanks for testing the betas...

wormuths commented 2 weeks ago

FYI, also in my case, I have two separate Velop mesh networks on different LAN's. One with two nodes, one with four... The two networks serve different functions in the house, but in my case your integration creates two hubs. Hopefully that doesn't matter, but it's worth noting.

uvjim commented 2 weeks ago

Hopefully that doesn't matter, but it's worth noting.

Shouldn't matter as the integration just directs requests to whichever nodes are seen as primary.

uvjim commented 2 weeks ago

2024.11.2 is out now. I had a change of heart and thought that it needed to get out there quite quickly with 3 reports of timeouts already. I'll close this off as anything else is likely to be related to 2024.11.2 rather than the reported version in this issue.

wormuths commented 1 week ago

Sorry I disappeared, had an SSD failure to deal with...

Just so you know, I am stuck on 2024.9.1... The upgrade to 2024.11.2 didn't fix it for me. I still had the error that the integration wouldn't start. Unfortunately, my SSD died and I can't give you the logs.

This was the previous error I got, bug #506 ...

https://github.com/uvjim/linksys_velop/issues/506#