question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OpenWRT luci integration reporting "Method not found"

See original GitHub issue

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/

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:11

github_iconTop GitHub Comments

1reaction
motolavcommented, 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)

1reaction
fanglycommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accessing LuCI web interface securely
Accessing LuCI via SSH-tunnel​​ To access LuCI web interface securely, type http://127.0.0.1:8000/ instead of http://openwrt.lan/ or http://192. ...
Read more >
SQM Reporting? - Installing and Using ...
I have today backported the SQM data collection part for collectd in 19.07 , but the graphs data presentation in LuCI has not...
Read more >
Help with error in luci-app-upnp
I just installed luci-app-upnp and when I go to the configuration page under the Services menu in the web gui, I'm getting this...
Read more >
Topic: [Howto] Compile LuCI GUI and OpenWrt
scripts/feeds install -a -p luci $ make menuconfig ... apache.c:44: error: `CURL_ERROR_SIZE' undeclared here (not in a function)
Read more >
[How-To-Updated 2021] Installing AdGuardHome on ...
I do NOT use SSL for AGH's web frontend. Luci (OpenWrt's web interface) runs on port 80 and port 443 for SSL. I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found