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

OpenWRT luci integration reporting "Method not found" #50758

Open
dvenza opened this issue May 17, 2021 · 31 comments
Open

OpenWRT luci integration reporting "Method not found" #50758

dvenza opened this issue May 17, 2021 · 31 comments

Comments

@dvenza
Copy link

dvenza commented May 17, 2021

The problem

I added in my configuration.yaml the following section, according to the docs for the OpenWRT luci integration:

device_tracker:
  - platform: luci
    host: 192.168.1.1
    username: root
    password:

After restarting home assistant I get the following in the logs:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 339, in async_device_tracker_scan
    found_devices = await scanner.async_scan_devices()
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 806, in async_scan_devices
    return await self.hass.async_add_executor_job(self.scan_devices)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/luci/device_tracker.py", line 63, in scan_devices
    self._update_info()
  File "/usr/src/homeassistant/homeassistant/components/luci/device_tracker.py", line 91, in _update_info
    result = self.router.get_all_connected_devices(only_reachable=True)
  File "/usr/local/lib/python3.8/site-packages/openwrt_luci_rpc/__init__.py", line 42, in get_all_connected_devices
    return self.router.get_all_connected_devices(
  File "/usr/local/lib/python3.8/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 161, in get_all_connected_devices
    arp_result = self._call_json_rpc(*self.arp_call)
  File "/usr/local/lib/python3.8/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 229, in _call_json_rpc
    raise LuciRpcMethodNotFoundError(
openwrt_luci_rpc.exceptions.LuciRpcMethodNotFoundError: ("method: '%s' returned an error '%s' (code: '%s).", 'net.arptable', 'Method not found.', -32601)

My OpenWRT router is a Turring Omnia, the luci-mod-rpc is installed at version git-21.062.76689-a607f9c-1 (the default from the official turris repository).

What is version of Home Assistant Core has the issue?

core-2021.5.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

OpenWRT luci

Link to integration documentation on our website

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

@probot-home-assistant
Copy link

Hey there @mzdrale, mind taking a look at this issue as its been labeled with an integration (luci) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@Nowaker
Copy link

Nowaker commented Jun 12, 2021

+1. Same problem here on Turris Omnia. This has been buggy for many months.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 352, in async_device_tracker_scan
    found_devices = await scanner.async_scan_devices()
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 829, in async_scan_devices
    return await self.hass.async_add_executor_job(self.scan_devices)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/luci/device_tracker.py", line 63, in scan_devices
    self._update_info()
  File "/usr/src/homeassistant/homeassistant/components/luci/device_tracker.py", line 91, in _update_info
    result = self.router.get_all_connected_devices(only_reachable=True)
  File "/usr/local/lib/python3.8/site-packages/openwrt_luci_rpc/__init__.py", line 42, in get_all_connected_devices
    return self.router.get_all_connected_devices(
  File "/usr/local/lib/python3.8/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 161, in get_all_connected_devices
    arp_result = self._call_json_rpc(*self.arp_call)
  File "/usr/local/lib/python3.8/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 229, in _call_json_rpc
    raise LuciRpcMethodNotFoundError(
openwrt_luci_rpc.exceptions.LuciRpcMethodNotFoundError: ("method: '%s' returned an error '%s' (code: '%s).", 'net.arptable', 'Method not found.', -32601)

@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Sep 10, 2021
@Nowaker
Copy link

Nowaker commented Sep 10, 2021

Bad bot

@github-actions github-actions bot removed the stale label Sep 10, 2021
@github-actions
Copy link

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.

@github-actions github-actions bot added the stale label Dec 13, 2021
@dvenza
Copy link
Author

dvenza commented Dec 13, 2021 via email

@Nowaker
Copy link

Nowaker commented Dec 13, 2021

Bad bot

@github-actions github-actions bot removed the stale label Dec 13, 2021
@fangly
Copy link

fangly commented Apr 2, 2022

I have a Turris Omnia router and was hoping to use this integration, but I encountered the same problem:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 353, in async_device_tracker_scan
found_devices = await scanner.async_scan_devices()
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 827, in async_scan_devices
return await self.hass.async_add_executor_job(self.scan_devices)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/luci/device_tracker.py", line 67, in scan_devices
self._update_info()
File "/usr/src/homeassistant/homeassistant/components/luci/device_tracker.py", line 95, in _update_info
result = self.router.get_all_connected_devices(only_reachable=True)
File "/usr/local/lib/python3.9/site-packages/openwrt_luci_rpc/init.py", line 42, in get_all_connected_devices
return self.router.get_all_connected_devices(
File "/usr/local/lib/python3.9/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 161, in get_all_connected_devices
arp_result = self._call_json_rpc(*self.arp_call)
File "/usr/local/lib/python3.9/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 229, in _call_json_rpc
raise LuciRpcMethodNotFoundError(
openwrt_luci_rpc.exceptions.LuciRpcMethodNotFoundError: ("method: '%s' returned an error '%s' (code: '%s).", 'net.arptable', 'Method not found.', -32601)

This is with a freshly installed luci-mod-rpc package, git-22.052.50988-1b6c126-1, and Home Assistant core 2022.3.7.

@motolav
Copy link

motolav commented May 26, 2022

On Home Assistant Container 2022.5.5 and OpenWrt 22.03-rc2 with luci-mod-rpc version git-21.020.56896-af422b1,
I don't have that issue if it happens immediately on start so that issue might be one with Turris' changes to OpenWrt instead of the integration
I did check that known_devices.yaml was populated when track_new_devices is on

Since Turris uses lower version numbers than OpenWrt it defaults to the "legacy" method before OpenWrt 18 which causes the Method not found.
To fix it, there needs to be a check on "OPENWRT_DEVICE_MANUFACTURER" for "OpenWrt" or "CZ.NIC" then use that to decide on which method to use based on version (3 and lower for legacy)

@fangly
Copy link

fangly commented Jun 1, 2022

Yes you are right @motolav, the problem is upstream, in openwrt-luci-rpc: see fbradyirl/openwrt-luci-rpc#52

@alfureu
Copy link

alfureu commented Sep 21, 2022

any news on this?

@issue-triage-workflows
Copy link

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.

@dvenza
Copy link
Author

dvenza commented Jan 16, 2023 via email

@Poci
Copy link

Poci commented Feb 17, 2023

Any news? Still waiting with my Turris router.

@dvenza
Copy link
Author

dvenza commented Apr 11, 2023

I made a pull request on the upstream library, no answer : fbradyirl/openwrt-luci-rpc#55

@dvenza
Copy link
Author

dvenza commented Apr 13, 2023

Upstream merged the pull request to fix this issue, can you update the library in home assistant ? @mzdrale

@mzdrale
Copy link
Contributor

mzdrale commented Apr 13, 2023

Thank you @dvenza .

Home Assistant PR: #91358

@Id2ndR
Copy link

Id2ndR commented Apr 13, 2023

If your router does not have a password set, you should add "" as value for password:.

@issue-triage-workflows
Copy link

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.

@Nowaker
Copy link

Nowaker commented Jul 13, 2023

Closing it won't change the fact this continues to be broken.

@issue-triage-workflows
Copy link

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.

@Nowaker
Copy link

Nowaker commented Oct 11, 2023

bad bot

@github-actions github-actions bot removed the stale label Oct 11, 2023
@issue-triage-workflows
Copy link

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.

@Nowaker
Copy link

Nowaker commented Jan 10, 2024

bad bot

@GabrielPearce
Copy link

Hi guys I am having the same issue as described above on my banana pi r3 running 23.05.2 I have added done the required steps, howerever my router does not show up in home assistant

@issue-triage-workflows
Copy link

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.

@Nowaker
Copy link

Nowaker commented Jun 21, 2024

bad bot

@issue-triage-workflows
Copy link

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.

@qoh
Copy link

qoh commented Sep 23, 2024

This works for me on Home Assistant 2024.9.1 with a Turris Omnia router. I see no errors in logs and device_tracker entities show up.

@github-actions github-actions bot removed the stale label Sep 23, 2024
@issue-triage-workflows
Copy link

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.

@Nowaker
Copy link

Nowaker commented Dec 22, 2024

bad bot

@github-actions github-actions bot removed the stale label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants