home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.88k stars 30.95k forks source link

openwrt_luci_rpc.openwrt_luci_rpc #128406

Open NA7KR opened 1 month ago

NA7KR commented 1 month ago

The problem

Please can you help with this error:

2024-10-13 13:59:46.727 DEBUG (SyncWorker_1) [openwrt_luci_rpc.openwrt_luci_rpc] _call_json_rpc : https://192.168.10.1/cgi-bin/luci/rpc/auth
2024-10-13 13:59:46.729 DEBUG (SyncWorker_0) [openwrt_luci_rpc.openwrt_luci_rpc] _call_json_rpc : https://192.168.210.1/cgi-bin/luci/rpc/auth
2024-10-13 13:59:46.957 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy luci
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/device_tracker/legacy.py", line 335, in async_setup_legacy
scanner = await hass.async_add_executor_job(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/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 44, in get_scanner
scanner = LuciDeviceScanner(config[DEVICE_TRACKER_DOMAIN])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/luci/device_tracker.py", line 55, in __init__
self.router = OpenWrtRpc(
              ^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/openwrt_luci_rpc/__init__.py", line 34, in __init__
self.router = OpenWrtLuciRPC(
              ^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 61, in __init__
self._refresh_token()
File "/usr/local/lib/python3.12/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 69, in _refresh_token
self.token = self._call_json_rpc(auth_url, 'login',
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/openwrt_luci_rpc/openwrt_luci_rpc.py", line 261, in _call_json_rpc
raise LuciRpcUnknownError("Invalid response from luci: %s", res)
openwrt_luci_rpc.exceptions.LuciRpcUnknownError: ('Invalid response from luci: %s', <Response [500]>)
2024-10-13 13:59:47.179 INFO (SyncWorker_0) [openwrt_luci_rpc.openwrt_luci_rpc] Luci RPC login was successful
 OpenWrt 23.05.3, r23809-234f1a2efa

root@SalemOpenWrt:~# cat /etc/openwrt_release DISTRIB_ID='OpenWrt' DISTRIB_RELEASE='23.05.3' DISTRIB_REVISION='r23809-234f1a2efa' DISTRIB_TARGET='mvebu/cortexa9' DISTRIB_ARCH='arm_cortex-a9_vfpv3-d16' DISTRIB_DESCRIPTION

https://github.com/openwrt/luci/issues/7327

What version of Home Assistant Core has the issue?

core-2024.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

OpenWrt

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

device_tracker:
  - platform: luci
    host: 192.168.10.1
    username: root
    password: password
    verify_ssl: false
    ssl: true
    interval_seconds: 30
    consider_home: 180
    track_new_devices: true

  - platform: luci
    host: 192.168.210.1
    username: root
    password: password
    verify_ssl: false
    ssl: true
    interval_seconds: 30
    consider_home: 180
    track_new_devices: true

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @mzdrale, mind taking a look at this issue as it has been labeled with an integration (luci) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `luci` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign luci` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


luci documentation luci source (message by IssueLinks)