core icon indicating copy to clipboard operation
core copied to clipboard

Linksys Smart Wi-Fi does not work.

Open TuborgGold opened this issue 1 year ago • 4 comments

The problem

I don't get Linksys Smart Wi-Fi to work on my Linksys WRT32X

`Logger: homeassistant.components.device_tracker Källa: components/device_tracker/legacy.py:361 integration: Enhetsspårare (dokumentation, ärenden) Inträffade först: 14:19:10 (1 händelser) Senast loggade: 14:19:10

Error setting up platform legacy linksys_smart`

What version of Home Assistant Core has the issue?

2024.6.2

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

Linksys Smart Wi-Fi

Link to integration documentation on our website

https://www.home-assistant.io/integrations/linksys_smart

Diagnostics information

No response

Example YAML snippet

device_tracker:
  - platform: linksys_smart
    host: 192.168.1.1

Anything in the logs that might be useful for us?

Logger: homeassistant.components.device_tracker
Källa: components/device_tracker/legacy.py:361
integration: Enhetsspårare (dokumentation, ärenden)
Inträffade först: 14:19:10 (1 händelser)
Senast loggade: 14:19:10

Error setting up platform legacy linksys_smart

Additional information

No response

TuborgGold avatar Jun 12 '24 18:06 TuborgGold

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Still doesn't work. Same error.

TuborgGold avatar Sep 13 '24 10:09 TuborgGold

Still not fixed?

Source: components/linksys_smart/device_tracker.py:77
integration: Linksys Smart Wi-Fi ([documentation](https://www.home-assistant.io/integrations/linksys_smart), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+linksys_smart%22))
First occurred: 3 October 2024 at 17:16:10 (5334 occurrences)
Last logged: 11:04:00
Router returned unexpected response

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/linksys_smart/device_tracker.py", line 77, in _update_info
    devices = result["output"]["devices"]
              ~~~~~~^^^^^^^^^^
KeyError: 'output'```

oerix avatar Oct 04 '24 10:10 oerix

Same

2024-10-18 10:01:53.953 ERROR (SyncWorker_5) [homeassistant.components.linksys_smart.device_tracker] Router returned unexpected response Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/linksys_smart/device_tracker.py", line 77, in _update_info devices = result["output"]["devices"] ~~~~~~^^^^^^^^^^ KeyError: 'output' 2024-10-18 10:02:05.959 ERROR (SyncWorker_12) [homeassistant.components.linksys_smart.device_tracker] Router returned unexpected response Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/linksys_smart/device_tracker.py", line 77, in _update_info devices = result["output"]["devices"] ~~~~~~^^^^^^^^^^ KeyError: 'output' 2024-10-18 10:02:17.952 ERROR (SyncWorker_10) [homeassistant.components.linksys_smart.device_tracker] Router returned unexpected response Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/linksys_smart/device_tracker.py", line 77, in _update_info devices = result["output"]["devices"] ~~~~~~^^^^^^^^^^ KeyError: 'output'

Australian avatar Oct 18 '24 09:10 Australian

Router Model MX5600 Series Firmware version [up to date] 1.0.0.215906

Australian avatar Oct 18 '24 09:10 Australian

On an MX5500, authentication is required - the code has a comment saying unauthenticated is allowed, but I guess newer routers have changed that - https://github.com/home-assistant/core/blob/dev/homeassistant/components/linksys_smart/device_tracker.py#L102

I've tested manually with curl, and adding X-JNAP-Authorization: Basic ************** resolves the issue (which is what the Linksys web interface does)

jimmyjones2 avatar Nov 21 '24 22:11 jimmyjones2

I see the exact same error as raised by @oerix in this comment . I have a Linksys MX2000 model, which I bought a year ago. so I'm assuming it's the same root cause as mentioned by @jimmyjones2 here.

@jimmyjones2 thanks for taking up the effort of starting a PR for fixing this issue. I see however that the PR has been closed in the meantime. Any chance of picking up the comments that were raised on the PR? I would want to say I would try to help out with fixing the issue, but given that I'm completely new to the Home Assistant project, there is little chance I would be of any value trying to help out...

krelst avatar Jan 04 '25 21:01 krelst

@krelst Seems like there are a few similar PRs before mine that also got rejected - it's quite a lot of work to fully convert the plugin.

My workaround was to create a simple nginx proxy to add the necessary authentication header (helm syntax):

    server {
      listen       80 default_server;
      listen  [::]:80;
      server_name  _;

      location / {
        proxy_pass http://192.168.1.1/;
        proxy_set_header X-JNAP-Authorization "Basic {{ print "admin:" .Values.linksys_password | b64enc }}";
        proxy_http_version 1.1;
      }
    }

jimmyjones2 avatar Jan 05 '25 22:01 jimmyjones2

@jimmyjones2 thanks for the suggestion. By now I've been able to achieve the same result by using the Linksys Velop integration

krelst avatar Jan 06 '25 19:01 krelst

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.