uvjim / linksys_velop

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

Integration doesn't work after 2024.7.2 update. #473

Closed Aekung closed 3 months ago

Aekung commented 4 months ago

Hello,

After updating the Home Assistant to 2024.7.2, the integration is failed to setup at all. I have tried rebooting the Velop along with the whole home assistant container but it still doesn't work.

Here is the debug log.

2024-07-13 09:08:34.010 DEBUG (MainThread) [custom_components.linksys_velop] async_logging_state --> log state: DEBUG
2024-07-13 09:08:34.049 DEBUG (MainThread) [custom_components.linksys_velop] async_logging_state --> JNAP response log state: WARNING
2024-07-13 09:08:34.084 DEBUG (MainThread) [custom_components.linksys_velop] async_setup_entry --> entered
2024-07-13 09:08:34.122 DEBUG (MainThread) [custom_components.linksys_velop] async_setup_entry --> logging mode: single
2024-07-13 09:08:34.162 DEBUG (MainThread) [custom_components.linksys_velop] async_setup_entry --> preparing memory storage
2024-07-13 09:08:34.201 DEBUG (MainThread) [custom_components.linksys_velop] async_setup_entry --> setting up Mesh for the coordinator
2024-07-13 09:08:34.238 DEBUG (MainThread) [pyvelop.mesh] __init__ --> entered
2024-07-13 09:08:34.277 DEBUG (MainThread) [pyvelop.mesh] __init__ --> Session was passed in: Yes
2024-07-13 09:08:34.316 DEBUG (MainThread) [pyvelop.mesh] __init__ --> pyvelop version: 2024.5.3
2024-07-13 09:08:34.355 DEBUG (MainThread) [pyvelop.mesh] __init__ --> Initialised mesh for XX.XX.X.X
2024-07-13 09:08:34.396 DEBUG (MainThread) [pyvelop.mesh] __init__ --> exited
2024-07-13 09:08:34.435 DEBUG (MainThread) [custom_components.linksys_velop] async_setup_entry --> setting up the coordinator
2024-07-13 09:08:34.472 DEBUG (MainThread) [custom_components.linksys_velop] _async_get_mesh_data --> entered
2024-07-13 09:08:34.510 DEBUG (MainThread) [custom_components.linksys_velop] _async_get_mesh_data --> retrieving existing devices for comparison
2024-07-13 09:08:34.550 DEBUG (MainThread) [custom_components.linksys_velop] _async_get_mesh_data --> retrieving existing nodes for comparison
2024-07-13 09:08:34.584 DEBUG (MainThread) [custom_components.linksys_velop] _async_get_mesh_data --> previous_node_serials: {'20J20607912851', '20J20609820149', '20J20602902021', '20J10C64810592', '20J20602901850', '20J20607912731', '20J20607912824'}
2024-07-13 09:08:34.624 DEBUG (MainThread) [custom_components.linksys_velop] _async_get_mesh_data --> gathering details
2024-07-13 09:08:34.670 DEBUG (MainThread) [pyvelop.mesh] async_gather_details --> entered
2024-07-13 09:08:34.711 DEBUG (MainThread) [pyvelop.mesh] _async_gather_details --> entered, args: JNAPActionMappings.CMP_MESH_DETAILS
2024-07-13 09:08:34.751 DEBUG (MainThread) [pyvelop.mesh] _async_make_request --> entered
2024-07-13 09:08:34.788 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> entered
2024-07-13 09:08:34.827 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> URL: http://XX.XX.X.X/JNAP/, Headers: {'X-JNAP-Authorization': '**REDACTED**', 'Content-Type': 'application/json; charset=UTF-8', 'X-JNAP-Action': 'http://linksys.com/jnap/core/Transaction'}, Payload: [{"action": "http://linksys.com/jnap/firewall/GetALGSettings", "request": {}}, {"action": "http://linksys.com/jnap/nodes/diagnostics/GetBackhaulInfo", "request": {}}, {"action": "http://linksys.com/jnap/nodes/setup/GetSelectedChannels", "request": {}}, {"action": "http://linksys.com/jnap/devicelist/GetDevices3", "request": {}}, {"action": "http://linksys.com/jnap/router/GetExpressForwardingSettings", "request": {}}, {"action": "http://linksys.com/jnap/firmwareupdate/GetFirmwareUpdateSettings", "request": {}}, {"action": "http://linksys.com/jnap/guestnetwork/GetGuestRadioSettings2", "request": {}}, {"action": "http://linksys.com/jnap/router/GetLANSettings", "request": {}}, {"action": "http://linksys.com/jnap/macfilter/GetMACFilterSettings", "request": {}}, {"action": "http://linksys.com/jnap/parentalcontrol/GetParentalControlSettings", "request": {}}, {"action": "http://linksys.com/jnap/healthcheck/GetHealthCheckResults", "request": {"healthCheckModule": "SpeedTest", "includeModuleResults": true, "lastNumberOfResults": 10}}, {"action": "http://linksys.com/jnap/healthcheck/GetHealthCheckStatus", "request": {}}, {"action": "http://linksys.com/jnap/nodes/topologyoptimization/GetTopologyOptimizationSettings2", "request": {}}, {"action": "http://linksys.com/jnap/nodes/firmwareupdate/GetFirmwareUpdateStatus", "request": {}}, {"action": "http://linksys.com/jnap/routerupnp/GetUPnPSettings", "request": {}}, {"action": "http://linksys.com/jnap/router/GetWANStatus3", "request": {}}, {"action": "http://linksys.com/jnap/wirelessap/GetWPSServerSettings", "request": {}}], Timeout: 60
2024-07-13 09:08:34.864 DEBUG (MainThread) [pyvelop.mesh] _async_make_request --> entered
2024-07-13 09:08:34.904 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> entered
2024-07-13 09:08:34.942 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> URL: http://XX.XX.X.X/JNAP/, Headers: {'X-JNAP-Authorization': '**REDACTED**', 'Content-Type': 'application/json; charset=UTF-8', 'X-JNAP-Action': 'http://linksys.com/jnap/homekit/GetHomeKitSettings'}, Payload: {}, Timeout: 60
2024-07-13 09:08:34.983 DEBUG (MainThread) [pyvelop.mesh] _async_make_request --> entered
2024-07-13 09:08:35.024 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> entered
2024-07-13 09:08:35.068 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> URL: http://XX.XX.X.X/JNAP/, Headers: {'X-JNAP-Authorization': '**REDACTED**', 'Content-Type': 'application/json; charset=UTF-8', 'X-JNAP-Action': 'http://linksys.com/jnap/nodes/networkconnections/GetNodesWirelessNetworkConnections'}, Payload: {}, Timeout: 60
2024-07-13 09:08:35.106 DEBUG (MainThread) [pyvelop.mesh] _async_make_request --> entered
2024-07-13 09:08:35.144 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> entered
2024-07-13 09:08:35.184 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> URL: http://XX.XX.X.X/JNAP/, Headers: {'X-JNAP-Authorization': '**REDACTED**', 'Content-Type': 'application/json; charset=UTF-8', 'X-JNAP-Action': 'http://linksys.com/jnap/nodes/storage/GetNodesPartitions'}, Payload: {}, Timeout: 60
2024-07-13 09:08:35.222 DEBUG (MainThread) [pyvelop.mesh] _async_make_request --> entered
2024-07-13 09:08:35.258 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> entered
2024-07-13 09:08:35.299 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> URL: http://XX.XX.X.X/JNAP/, Headers: {'X-JNAP-Authorization': '**REDACTED**', 'Content-Type': 'application/json; charset=UTF-8', 'X-JNAP-Action': 'http://linksys.com/jnap/nodes/storage/GetSMBServerSettings'}, Payload: {}, Timeout: 60
2024-07-13 09:08:35.895 DEBUG (MainThread) [custom_components.linksys_velop] _async_get_mesh_data --> error type: <class 'pyvelop.exceptions.MeshConnectionError'>
2024-07-13 09:08:35.935 ERROR (MainThread) [custom_components.linksys_velop] _async_get_mesh_data --> Connection Error
2024-07-13 09:08:35.935 DEBUG (MainThread) [custom_components.linksys_velop] Finished fetching linksys_velop data in 1.500 seconds (success: False)
2024-07-13 09:08:36.092 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> exited
2024-07-13 09:08:36.134 DEBUG (MainThread) [pyvelop.mesh] _async_make_request --> exited
2024-07-13 09:08:36.213 DEBUG (MainThread) [pyvelop.jnap] Request.execute --> exited
2024-07-13 09:08:36.252 DEBUG (MainThread) [pyvelop.mesh] _async_make_request --> exited

Anyone is experiencing the same problem? Without this integration, the Velop experience would totally be a nightmare to me once again. Linksys itself is just so useless without the integration.

Thank you and looking forward to hearing from you.

gndenton commented 4 months ago

I have a similar situation. If needed, I can send/attach the log file.

uvjim commented 4 months ago

I'm running Home Assistant 2024.7.2 using HAOS. All is working well here.

Are you able to log in using the Linksys app or the router web UI?

The log in the first post implies that there is an issue connecting to the primary node.

gndenton commented 4 months ago

Thanks for the quick response.

As per your questions:

1. I am able to log into the primary router via the Linksys App 2. I am able to log into the primary router via the Linksys Smart Wi-Fi web interface

I am attaching my log file.

Many thanks, Gary

Gary N. Denton Mobile: +1 (317) 430-3051 Email: @.***


From: uvjim @.> Sent: Thursday, July 18, 2024 3:46 PM To: uvjim/linksys_velop @.> Cc: Gary Denton @.>; Comment @.> Subject: Re: [uvjim/linksys_velop] Integration doesn't work after 2024.7.2 update. (Issue #473)

I'm running Home Assistant 2024.7.2 using HAOS. All is working well here.

Are you able to log in using the Linksys app or the router web UI?

The log in the first post implies that there is an issue connecting to the primary node.

— Reply to this email directly, view it on GitHubhttps://github.com/uvjim/linksys_velop/issues/473#issuecomment-2237418170, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BATKJ7YD4Z7LEZ36PC3ET73ZNALQHAVCNFSM6AAAAABKZ3DTWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXGQYTQMJXGA. You are receiving this because you commented.Message ID: @.***>

uvjim commented 4 months ago

In both cases are you using the local password for the router or using the one labelled as email? (see following screenshot from the app).

Screenshot_20240718_210826_Linksys.png

You should be using the local password.

gndenton commented 4 months ago

Sorry for my ignorance ... I am able to login to the router via the web and via local. I do not recognize the png file. Where is that located?

Gary N. Denton


From: uvjim @.> Sent: Thursday, July 18, 2024 4:19 PM To: uvjim/linksys_velop @.> Cc: Gary Denton @.>; Comment @.> Subject: Re: [uvjim/linksys_velop] Integration doesn't work after 2024.7.2 update. (Issue #473)

In both cases are you using the local password for the router or using the one labelled as email? (see following screenshot from the app).

Screenshot_20240718_210826_Linksys.png (view on web)https://github.com/user-attachments/assets/4c804e95-3d36-4b88-95c4-807a79618418

You should be using the local password.

— Reply to this email directly, view it on GitHubhttps://github.com/uvjim/linksys_velop/issues/473#issuecomment-2237489402, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BATKJ73AY72ZOJ3RTTLNUXLZNAPL7AVCNFSM6AAAAABKZ3DTWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXGQ4DSNBQGI. You are receiving this because you commented.Message ID: @.***>

uvjim commented 4 months ago

@gndenton - that's the screen I get in the app (at least on Android) to login. The app will likely cache credentials and log you straight in using the last ones. You'll have to logout of the app and then attempt to connect using the "Router Password" option. If that doesn't work, it explains why the integration cannot get any data back. You may find you have to reset the password - I had that recently - everything appeared to be working but I could not access anything using the "router password". I reset it to the same thing and it has been fine since.

gndenton commented 4 months ago

Thanks again. I did reset the password on the router and we are almost back to normal. How does your code get the "new" password so normal data flow is reestablished? I didn't see anything along those lines in the configuration.

Gary N. Denton


From: uvjim @.> Sent: Friday, July 19, 2024 7:46 AM To: uvjim/linksys_velop @.> Cc: Gary Denton @.>; Mention @.> Subject: Re: [uvjim/linksys_velop] Integration doesn't work after 2024.7.2 update. (Issue #473)

@gndentonhttps://github.com/gndenton - that's the screen I get in the app (at least on Android) to login. The app will likely cache credentials and log you straight in using the last ones. You'll have to logout of the app and then attempt to connect using the "Router Password" option. If that doesn't work, it explains why the integration cannot get any data back. You may find you have to reset the password - I had that recently - everything appeared to be working but I could not access anything using the "router password". I reset it to the same thing and it has been fine since.

— Reply to this email directly, view it on GitHubhttps://github.com/uvjim/linksys_velop/issues/473#issuecomment-2238970182, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BATKJ7ZPCTGZ2DX64PKBFUTZND4DBAVCNFSM6AAAAABKZ3DTWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZYHE3TAMJYGI. You are receiving this because you were mentioned.Message ID: @.***>

uvjim commented 4 months ago

You have 2 choices really...

  1. Remove the integration instance and add it again - assuming you didn't change entity names etc, they should get created again as they were before.
  2. Go into the JSON files that HASS uses and modify it there - if you do this, you'll need to restart the HASS.
gndenton commented 4 months ago

Good news - option 1 has completed successfully.

Many thanks.

Gary N. Denton


From: uvjim @.> Sent: Friday, July 19, 2024 9:03 AM To: uvjim/linksys_velop @.> Cc: Gary Denton @.>; Mention @.> Subject: Re: [uvjim/linksys_velop] Integration doesn't work after 2024.7.2 update. (Issue #473)

You have 2 choices really...

  1. Remove the integration instance and add it again - assuming you didn't change entity names etc, they should get created again as they were before.
  2. Go into the JSON files that HASS uses and modify it there - if you do this, you'll need to restart the HASS.

— Reply to this email directly, view it on GitHubhttps://github.com/uvjim/linksys_velop/issues/473#issuecomment-2239087176, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BATKJ73D6JRJ2HAWI67OS5TZNEFC5AVCNFSM6AAAAABKZ3DTWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZZGA4DOMJXGY. You are receiving this because you were mentioned.Message ID: @.***>

uvjim commented 4 months ago

@Aekung - I'm guessing it's something similar for you. Are you able to check out the suggestions in this thread?

Aekung commented 4 months ago

@Aekung - I'm guessing it's something similar for you. Are you able to check out the suggestions in this thread?

I reseted the local router password as suggested but when I tried to reconfigure the integration, it keeps on returning this error.

Bad response on login. Check that the primary node is correct.

I checked that the router is accessible on the primary node IP with the new password and I also checked that the primary node IP is correct on the configuration screen. I'm not sure why this error keeps on showing up after 'gathering mesh details' state. I reset the router multiple times along with the Home Assistant itself but it still throwing the same error.

Do you have any idea on what should I do to resolve this?

uvjim commented 4 months ago

OK. So that's a different error to before. Could you get debug logs again please?

Aekung commented 3 months ago

OK. So that's a different error to before. Could you get debug logs again please?

Sorry for the late reply.

I got it working now. It was all because of my Velops and not your integration.

I had to delete all the offline devices in my Velop device list and then reboot the whole system. After than, I had to delete the integration before re-adding it once again and it works without an issue now.

I think, for some reason, the offline device list just ate up all of my RAM so my Velop started acting weird and threw error that suggest me to do hard reset on the Velop system. I did it once a year ago and this time it happened again but I decided not to reset my router but looked for the root cause instead since adding all the reserved dhcps back is just a pain in the ass.

Now I believe I found the root cause of this problem! Deleting offline devices to regain your memory makes your Velop flies like an eagle once again.

Thank you,.

uvjim commented 3 months ago

Thanks @Aekung it's good to know. There is a service for deleting an offline device. You should be able to use an automation to periodically delete offline devices if that helps you out.

I shall close this issue off now.

Aekung commented 3 months ago

Thanks @Aekung it's good to know. There is a service for deleting an offline device. You should be able to use an automation to periodically delete offline devices if that helps you out.

I shall close this issue off now.

This is very useful. I'll do that. Thanks for suggesting.

Aekung commented 3 months ago

I checked the service and found service delete delete device but I could only set it to delete a specific device instead of deleting all offline device.

Delete a device from the mesh Device List (only a single device can be deleted at a time). The mesh will reject the request if the device is not marked as offline.

Can you guide me on how to delete all offline devices at once so that I can set a schedule to perform this service periodically?

Thank you in advance.

Aekung commented 3 months ago

Got the delete all offline devices script working now thanks to @uvjim reply to one of the community post here.

If anyone is interested, create a script with this

alias: Remove Offline Devices
sequence:
  - repeat:
      for_each: "{{ state_attr('sensor.your_mesh_offline_devices_sensor', 'devices') }}"
      sequence:
        - service: linksys_velop.delete_device
          data:
            mesh: YOUR MESH ID
            device: "{{ repeat.item.id }}"
        - data:
            title: "{{ repeat.item.name }}"
            message: "Unique ID: {{ repeat.item.id }}"
          action: persistent_notification.create
mode: single
description: "Remove Offline Devices Periodically "
icon: mdi:access-point-network

After that, you can run the script based on timely manner by using Automation or manually by activating the script.