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

ERROR connecting to openwrt. Read timed out. (read timeout=15) #41

Open
derzahla opened this issue Nov 30, 2024 · 3 comments
Open

ERROR connecting to openwrt. Read timed out. (read timeout=15) #41

derzahla opened this issue Nov 30, 2024 · 3 comments

Comments

@derzahla
Copy link

derzahla commented Nov 30, 2024

hi, I have been stuggling to get my openwrt access points integrated with hass. I followed all the instructions and double, triple, etc checked my configs. But when I try adding an openwrt instance as an integration the webui form just returns 'unknown error'.

HASS version: 2024.11.
OpenWrt: SNAPSHOT r0-91b3b56 (recent, for latest NSS updates for my Dynalink DL-WRX36)

Logs from hass ultimately returns a read timeout error. here is the full custom component debug logs:

2024-11-29 15:05:38.572 DEBUG (MainThread) [custom_components.openwrt.config_flow] Input: {'id': 'owrt', 'address': 'owrt.local.domain', 'username': 'hass', 'https': True, 'verify_cert': False, 'port': 0, 'path': '/ubus', 'wps': False, 'password': 's3cretPaaSSwOOrd', 'wifi_devices': '2g-LAN,2g-IOT,5g-LAN'}
2024-11-29 15:05:38.572 DEBUG (MainThread) [custom_components.openwrt.coordinator] new_ubus_client(): {'id': 'owrt', 'address': 'owrt.local.domain', 'username': 'hass', 'https': True, 'verify_cert': False, 'port': 0, 'path': '/ubus', 'wps': False, 'password': 's3cretPaaSSwOOrd', 'wifi_devices': '2g-LAN,2g-IOT,5g-LAN'}
2024-11-29 15:05:38.572 DEBUG (MainThread) [custom_components.openwrt.ubus] New call [https://owrt.local.domain/ubus] {"jsonrpc": "2.0", "id": 1, "method": "call", "params": ["00000000000000000000000000000000", "session", "login", {"username": "hass", "password": "s3cretPaaSSwOOrd"}]}
2024-11-29 15:05:38.694 DEBUG (MainThread) [custom_components.openwrt.ubus] Raw json: [https://owrt.local.domain/ubus] {'jsonrpc': '2.0', 'id': 1, 'result': [0, {'ubus_rpc_session': '8b1a1e8e15485f4e5b29129f3ee3aa77', 'timeout': 300, 'expires': 299, 'acls': {'access-group': {'hass': ['write', 'read'], 'unauthenticated': ['read']}, 'file': {'/usr/bin/uptime': ['exec']}, 'rc': {'/etc/init.d/presence-detector': ['init']}, 'ubus': {'file': ['exec'], 'hostapd.*': ['get_clients', 'wps_status', 'wps_start', 'wps_cancel'], 'iwinfo': ['info', 'assoclist'], 'luci': ['getFeatures'], 'mwan3': ['status'], 'network.device': ['status'], 'network.wireless': ['status'], 'rc': ['init'], 'session': ['access', 'login'], 'system': ['board', 'reboot']}}, 'data': {'username': 'hass'}}]}
2024-11-29 15:05:38.694 DEBUG (MainThread) [custom_components.openwrt.ubus] Login result: {'ubus_rpc_session': '8b1a1e8e15485f4e5b29129f3ee3aa77', 'timeout': 300, 'expires': 299, 'acls': {'access-group': {'hass': ['write', 'read'], 'unauthenticated': ['read']}, 'file': {'/usr/bin/uptime': ['exec']}, 'rc': {'/etc/init.d/presence-detector': ['init']}, 'ubus': {'file': ['exec'], 'hostapd.*': ['get_clients', 'wps_status', 'wps_start', 'wps_cancel'], 'iwinfo': ['info', 'assoclist'], 'luci': ['getFeatures'], 'mwan3': ['status'], 'network.device': ['status'], 'network.wireless': ['status'], 'rc': ['init'], 'session': ['access', 'login'], 'system': ['board', 'reboot']}}, 'data': {'username': 'hass'}}
2024-11-29 15:05:38.694 DEBUG (MainThread) [custom_components.openwrt.ubus] New call [https://owrt.local.domain/ubus] {"jsonrpc": "2.0", "id": 2, "method": "list", "params": ["8b1a1e8e15485f4e5b29129f3ee3aa77", "*", {}]}
2024-11-29 15:05:53.807 ERROR (MainThread) [custom_components.openwrt.ubus] api_call exception: HTTPSConnectionPool(host='owrt.local.domain', port=443): Read timed out. (read timeout=15)
2024-11-29 15:05:53.807 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.12/site-packages/urllib3/connectionpool.py", line 468, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/srv/homeassistant/lib/python3.12/site-packages/urllib3/connectionpool.py", line 463, in _make_request
    httplib_response = conn.getresponse()
                       ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/http/client.py", line 1428, in getresponse
    response.begin()
  File "/usr/lib/python3.12/http/client.py", line 331, in begin
    version, status, reason = self._read_status()
                              ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/http/client.py", line 292, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/socket.py", line 707, in readinto
    return self._sock.recv_into(b)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1252, in recv_into
    return self.read(nbytes, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/ssl.py", line 1104, in read
    return self._sslobj.read(len, buffer)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TimeoutError: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/urllib3/connectionpool.py", line 802, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/urllib3/util/retry.py", line 552, in increment
    raise six.reraise(type(error), error, _stacktrace)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/urllib3/packages/six.py", line 770, in reraise
    raise value
  File "/srv/homeassistant/lib/python3.12/site-packages/urllib3/connectionpool.py", line 716, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/urllib3/connectionpool.py", line 470, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/srv/homeassistant/lib/python3.12/site-packages/urllib3/connectionpool.py", line 358, in _raise_timeout
    raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='owrt.local.domain', port=443): Read timed out. (read timeout=15)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.homeassistant/custom_components/openwrt/ubus.py", line 90, in _api_call
    response = await self.executor_job(post)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.homeassistant/custom_components/openwrt/ubus.py", line 84, in post
    return requests.post(
           ^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/requests/adapters.py", line 713, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='owrt.local.domain', port=443): Read timed out. (read timeout=15)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 477, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/web_app.py", line 567, in _handle
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/http/forwarded.py", line 210, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/http/request_context.py", line 26, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/http/ban.py", line 86, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/http/auth.py", line 242, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/http/headers.py", line 32, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/http.py", line 73, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/http/decorators.py", line 81, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/config/config_entries.py", line 222, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/components/http/data_validator.py", line 74, in wrapper
    return await method(view, request, data, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/helpers/data_entry_flow.py", line 122, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/data_entry_flow.py", line 367, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/data_entry_flow.py", line 414, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.12/site-packages/homeassistant/data_entry_flow.py", line 517, in _async_handle_step
    result: _FlowResultT = await getattr(flow, method)(user_input)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.homeassistant/custom_components/openwrt/config_flow.py", line 41, in async_step_user
    await ubus.api_list() # Check connection
    ^^^^^^^^^^^^^^^^^^^^^
  File "/root/.homeassistant/custom_components/openwrt/ubus.py", line 124, in api_list
    return await self.api_call("*", None, None, "list")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.homeassistant/custom_components/openwrt/ubus.py", line 45, in api_call
    return await self._api_call(rpc_method, subsystem, method, params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.homeassistant/custom_components/openwrt/ubus.py", line 93, in _api_call
    raise ConnectionError from err
ConnectionError

if i run 'ubus monitor' on openwrt while trying to configure the hass integration it seems like its connecting and querying a bunch of data so I am not sure what the problem could be. I have tried HTTPS and HTTP and get the same error. Heres the output of 'ubus monitor' when I try to connect from hass:

root@owrt:~# ubus monitor
-> edd04a77 #3 status: {"status":0}
<- f1466e4c #00000000 lookup: {"objpath":"session"}
-> f1466e4c #00000000 data: {"objpath":"session","objid":1703232304,"objtype":1000320332,"signature":{"create":{"timeout":5},"list":{"ubus_rpc_session":3},"grant":{"ubus_rpc_session":3,"scope":3,"objects":1},"revoke":{"ubus_rpc_session":3,"scope":3,"objects":1},"access":{"ubus_rpc_session":3,"scope":3,"object":3,"function":3},"set":{"ubus_rpc_session":3,"values":2},"get":{"ubus_rpc_session":3,"keys":1},"unset":{"ubus_rpc_session":3,"keys":1},"destroy":{"ubus_rpc_session":3},"login":{"username":3,"password":3,"timeout":5}}}
-> f1466e4c #00000000 status: {"status":0}
<- f1466e4c #00000000 lookup: {"objpath":"session"}
-> f1466e4c #00000000 data: {"objpath":"session","objid":1703232304,"objtype":1000320332,"signature":{"create":{"timeout":5},"list":{"ubus_rpc_session":3},"grant":{"ubus_rpc_session":3,"scope":3,"objects":1},"revoke":{"ubus_rpc_session":3,"scope":3,"objects":1},"access":{"ubus_rpc_session":3,"scope":3,"object":3,"function":3},"set":{"ubus_rpc_session":3,"values":2},"get":{"ubus_rpc_session":3,"keys":1},"unset":{"ubus_rpc_session":3,"keys":1},"destroy":{"ubus_rpc_session":3},"login":{"username":3,"password":3,"timeout":5}}}
-> f1466e4c #00000000 status: {"status":0}
<- f1466e4c #65854330 invoke: {"objid":1703232304,"method":"access","data":{"ubus_rpc_session":"00000000000000000000000000000000","object":"session","function":"login"}}
-> 556d6911 #f1466e4c invoke: {"objid":1703232304,"method":"access","data":{"ubus_rpc_session":"00000000000000000000000000000000","object":"session","function":"login"},"user":"root","group":"root"}
<- 556d6911 #f1466e4c data: {"objid":1703232304,"data":{"access":true}}
-> f1466e4c #65854330 data: {"objid":1703232304,"data":{"access":true}}
<- 556d6911 #f1466e4c status: {"status":0,"objid":1703232304}
-> f1466e4c #65854330 status: {"status":0,"objid":1703232304}
<- f1466e4c #65854330 invoke: {"objid":1703232304,"method":"login","data":{"username":"hass","password":"s3cretPaaSSwOOrd","ubus_rpc_session":"00000000000000000000000000000000"}}
-> 556d6911 #f1466e4c invoke: {"objid":1703232304,"method":"login","data":{"username":"hass","password":"s3cretPaaSSwOOrd","ubus_rpc_session":"00000000000000000000000000000000"},"user":"root","group":"root"}
<- 556d6911 #f1466e4c data: {"objid":1703232304,"data":{"ubus_rpc_session":"c06753d1963dbe2fcd9d7fb008464472","timeout":300,"expires":299,"acls":{"access-group":{"hass":["write","read"],"unauthenticated":["read"]},"file":{"/usr/bin/uptime":["exec"]},"ubus":{"file":["exec"],"hostapd.":["get_clients","wps_status","wps_start","wps_cancel"],"iwinfo":["info","assoclist"],"luci":["getFeatures"],"mwan3":["status"],"network.device":["status"],"network.wireless":["status"],"session":["access","login"],"system":["board","reboot"]}},"data":{"username":"hass"}}}
-> f1466e4c #65854330 data: {"objid":1703232304,"data":{"ubus_rpc_session":"c06753d1963dbe2fcd9d7fb008464472","timeout":300,"expires":299,"acls":{"access-group":{"hass":["write","read"],"unauthenticated":["read"]},"file":{"/usr/bin/uptime":["exec"]},"ubus":{"file":["exec"],"hostapd.
":["get_clients","wps_status","wps_start","wps_cancel"],"iwinfo":["info","assoclist"],"luci":["getFeatures"],"mwan3":["status"],"network.device":["status"],"network.wireless":["status"],"session":["access","login"],"system":["board","reboot"]}},"data":{"username":"hass"}}}
<- 556d6911 #f1466e4c status: {"status":0,"objid":1703232304}
-> f1466e4c #65854330 status: {"status":0,"objid":1703232304}
<- f1466e4c #00000000 lookup: {"objpath":"c06753d1963dbe2fcd9d7fb008464472"}
-> f1466e4c #00000000 status: {"status":4}
<- f1466e4c #00000000 lookup: {"objpath":"*"}
-> f1466e4c #00000000 data: {"objpath":"container","objid":919515727,"objtype":617518219,"signature":{"set":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"add":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"list":{"name":3,"verbose":7},"delete":{"name":3,"instance":3},"state":{"spawn":7,"name":3},"get_features":{},"console_set":{"name":3,"instance":3},"console_attach":{"name":3,"instance":3}}}
-> f1466e4c #00000000 data: {"objpath":"dnsmasq","objid":2108132662,"objtype":-354985956,"signature":{"metrics":{}}}
-> f1466e4c #00000000 data: {"objpath":"dnsmasq.IoT","objid":-904316921,"objtype":-340754331,"signature":{"metrics":{}}}
-> f1466e4c #00000000 data: {"objpath":"dnsmasq.IoT.dns","objid":1908948178,"objtype":1342480297,"signature":{}}
-> f1466e4c #00000000 data: {"objpath":"dnsmasq.dns","objid":1803156244,"objtype":196101793,"signature":{}}
-> f1466e4c #00000000 data: {"objpath":"file","objid":-64898802,"objtype":-1907458749,"signature":{"read":{"path":3,"base64":7,"ubus_rpc_session":3},"write":{"path":3,"data":3,"append":7,"mode":5,"base64":7,"ubus_rpc_session":3},"list":{"path":3,"ubus_rpc_session":3},"stat":{"path":3,"ubus_rpc_session":3},"md5":{"path":3,"ubus_rpc_session":3},"remove":{"path":3,"ubus_rpc_session":3},"exec":{"command":3,"params":1,"env":2,"ubus_rpc_session":3}}}
-> f1466e4c #00000000 data: {"objpath":"hostapd","objid":1779283166,"objtype":-1280551440,"signature":{"reload":{"phy":3,"radio":5},"apsta_state":{"phy":3,"radio":5,"up":7,"frequency":5,"sec_chan_offset":5,"csa":7,"csa_count":5},"config_get_macaddr_list":{"phy":3,"radio":5},"config_set":{"phy":3,"radio":5,"config":3,"prev_config":3},"config_add":{"iface":3,"config":3},"config_remove":{"iface":3},"bss_info":{"iface":3}}}
-> f1466e4c #00000000 data: {"objpath":"hostapd-auth","objid":2006229438,"objtype":2028083222,"signature":{}}
-> f1466e4c #00000000 data: {"objpath":"hostapd.2g-IOT","objid":1047227000,"objtype":1987041903,"signature":{"reload":{},"get_clients":{},"get_sta_ies":{"address":3},"get_status":{},"del_client":{"addr":3,"reason":5,"deauth":7,"ban_time":5},"update_airtime":{"sta":3,"weight":5},"list_bans":{},"wps_start":{},"wps_status":{},"wps_cancel":{},"update_beacon":{},"get_features":{},"switch_chan":{"freq":5,"bcn_count":5,"center_freq1":5,"center_freq2":5,"bandwidth":5,"sec_channel_offset":5,"ht":7,"vht":7,"he":7,"block_tx":7,"force":7},"set_vendor_elements":{"vendor_elements":3},"notify_response":{"notify_response":5},"bss_mgmt_enable":{"neighbor_report":7,"beacon_report":7,"link_measurement":7,"bss_transition":7},"rrm_nr_get_own":{},"rrm_nr_list":{},"rrm_nr_set":{"list":1},"rrm_beacon_req":{"addr":3,"mode":5,"op_class":5,"channel":5,"duration":5,"bssid":3,"ssid":3},"link_measurement_req":{"addr":3,"tx-power-used":5,"tx-power-max":5},"bss_transition_request":{"addr":3,"disassociation_imminent":7,"disassociation_timer":5,"validity_period":5,"neighbors":1,"abridged":7,"dialog_token":5,"mbo_reason":5,"cell_pref":5,"reassoc_delay":5}}}
-> f1466e4c #00000000 data: {"objpath":"hostapd.2g-LAN","objid":-1008410494,"objtype":1987041903,"signature":{"reload":{},"get_clients":{},"get_sta_ies":{"address":3},"get_status":{},"del_client":{"addr":3,"reason":5,"deauth":7,"ban_time":5},"update_airtime":{"sta":3,"weight":5},"list_bans":{},"wps_start":{},"wps_status":{},"wps_cancel":{},"update_beacon":{},"get_features":{},"switch_chan":{"freq":5,"bcn_count":5,"center_freq1":5,"center_freq2":5,"bandwidth":5,"sec_channel_offset":5,"ht":7,"vht":7,"he":7,"block_tx":7,"force":7},"set_vendor_elements":{"vendor_elements":3},"notify_response":{"notify_response":5},"bss_mgmt_enable":{"neighbor_report":7,"beacon_report":7,"link_measurement":7,"bss_transition":7},"rrm_nr_get_own":{},"rrm_nr_list":{},"rrm_nr_set":{"list":1},"rrm_beacon_req":{"addr":3,"mode":5,"op_class":5,"channel":5,"duration":5,"bssid":3,"ssid":3},"link_measurement_req":{"addr":3,"tx-power-used":5,"tx-power-max":5},"bss_transition_request":{"addr":3,"disassociation_imminent":7,"disassociation_timer":5,"validity_period":5,"neighbors":1,"abridged":7,"dialog_token":5,"mbo_reason":5,"cell_pref":5,"reassoc_delay":5}}}
-> f1466e4c #00000000 data: {"objpath":"hostapd.5g-LAN","objid":1044153158,"objtype":1987041903,"signature":{"reload":{},"get_clients":{},"get_sta_ies":{"address":3},"get_status":{},"del_client":{"addr":3,"reason":5,"deauth":7,"ban_time":5},"update_airtime":{"sta":3,"weight":5},"list_bans":{},"wps_start":{},"wps_status":{},"wps_cancel":{},"update_beacon":{},"get_features":{},"switch_chan":{"freq":5,"bcn_count":5,"center_freq1":5,"center_freq2":5,"bandwidth":5,"sec_channel_offset":5,"ht":7,"vht":7,"he":7,"block_tx":7,"force":7},"set_vendor_elements":{"vendor_elements":3},"notify_response":{"notify_response":5},"bss_mgmt_enable":{"neighbor_report":7,"beacon_report":7,"link_measurement":7,"bss_transition":7},"rrm_nr_get_own":{},"rrm_nr_list":{},"rrm_nr_set":{"list":1},"rrm_beacon_req":{"addr":3,"mode":5,"op_class":5,"channel":5,"duration":5,"bssid":3,"ssid":3},"link_measurement_req":{"addr":3,"tx-power-used":5,"tx-power-max":5},"bss_transition_request":{"addr":3,"disassociation_imminent":7,"disassociation_timer":5,"validity_period":5,"neighbors":1,"abridged":7,"dialog_token":5,"mbo_reason":5,"cell_pref":5,"reassoc_delay":5}}}
-> f1466e4c #00000000 data: {"objpath":"hotplug.dhcp","objid":857038971,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> f1466e4c #00000000 data: {"objpath":"hotplug.firmware","objid":870917305,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> f1466e4c #00000000 data: {"objpath":"hotplug.ieee80211","objid":296236928,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> f1466e4c #00000000 data: {"objpath":"hotplug.iface","objid":-804744354,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> f1466e4c #00000000 data: {"objpath":"hotplug.leds","objid":1579835348,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> f1466e4c #00000000 data: {"objpath":"hotplug.neigh","objid":781815515,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> f1466e4c #00000000 data: {"objpath":"hotplug.net","objid":1909326747,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> f1466e4c #00000000 data: {"objpath":"hotplug.ntp","objid":-93532881,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> f1466e4c #00000000 data: {"objpath":"hotplug.tftp","objid":1734950694,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> f1466e4c #00000000 data: {"objpath":"iwinfo","objid":-1621396391,"objtype":1434293547,"signature":{"devices":{},"info":{"device":3},"scan":{"device":3},"assoclist":{"device":3,"mac":3},"freqlist":{"device":3},"txpowerlist":{"device":3},"countrylist":{"device":3},"survey":{"device":3},"phyname":{"section":3}}}
-> f1466e4c #00000000 data: {"objpath":"log","objid":1392386651,"objtype":-826223509,"signature":{"read":{"lines":5,"stream":7,"oneshot":7},"write":{"event":3}}}
-> f1466e4c #00000000 data: {"objpath":"luci","objid":-1456566758,"objtype":692841593,"signature":{"getVersion":{},"getInitList":{"name":3},"setInitAction":{"name":3,"action":3},"getLocaltime":{},"setLocaltime":{"localtime":5},"getTimezones":{},"getLEDs":{},"getUSBDevices":{},"getConntrackHelpers":{},"getFeatures":{},"getSwconfigFeatures":{"switch":3},"getSwconfigPortState":{"switch":3},"setPassword":{"username":3,"password":3},"getBlockDevices":{},"setBlockDetect":{},"getMountPoints":{},"getRealtimeStats":{"mode":3,"device":3},"getConntrackList":{},"getProcessList":{},"getBuiltinEthernetPorts":{}}}
-> f1466e4c #00000000 data: {"objpath":"luci-rpc","objid":-582657848,"objtype":-98373444,"signature":{"getNetworkDevices":{},"getWirelessDevices":{},"getHostHints":{},"getDUIDHints":{},"getBoardJSON":{},"getDHCPLeases":{"family":5}}}
-> f1466e4c #00000000 data: {"objpath":"luci.ddns","objid":581357496,"objtype":1084778237,"signature":{"get_services_log":{"service_name":3},"get_services_status":{},"get_ddns_state":{},"get_env":{}}}
-> f1466e4c #00000000 data: {"objpath":"luci.upnp","objid":-72937332,"objtype":-1388960706,"signature":{"get_status":{},"delete_rule":{"token":3}}}
-> f1466e4c #00000000 data: {"objpath":"luci.wireguard","objid":1198984147,"objtype":-1075127661,"signature":{"generatePsk":{},"generateKeyPair":{},"getPublicAndPrivateKeyFromPrivate":{"privkey":3},"getWgInstances":{}}}
-> f1466e4c #00000000 data: {"objpath":"mwan3","objid":492747414,"objtype":-332669236,"signature":{"status":{"section":3,"interface":3,"policies":3}}}
-> f1466e4c #00000000 data: {"objpath":"network","objid":1019391920,"objtype":-1260298138,"signature":{"restart":{},"reload":{},"add_host_route":{"target":3,"v6":7,"interface":3,"exclude":7},"get_proto_handlers":{},"add_dynamic":{"name":3},"netns_updown":{"jail":3,"start":7}}}
-> f1466e4c #00000000 data: {"objpath":"network.device","objid":192094537,"objtype":1667728998,"signature":{"status":{"name":3},"set_alias":{"alias":1,"device":3},"set_state":{"name":3,"defer":7,"auth_status":7,"auth_vlans":1},"stp_init":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface","objid":718920737,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.docker","objid":-998201625,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.lan","objid":-179237380,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.lan_iot","objid":-751257501,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.loopback","objid":-96392291,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_cg","objid":-757968758,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_fr","objid":-93549704,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_hu","objid":1630659255,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_ic","objid":-658203072,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_jp","objid":-45224838,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_lv","objid":-955394904,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_lx","objid":-1044553511,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_my1","objid":1936272290,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_no","objid":1044392880,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_po","objid":124262299,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_rs","objid":-535309443,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_sg","objid":1196495662,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.vpn_sg1","objid":1806671668,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.wan","objid":-1240555669,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.interface.wan6","objid":615978761,"objtype":-2142396399,"signature":{"up":{},"down":{},"renew":{},"status":{},"prepare":{},"dump":{},"add_device":{"name":3,"link-ext":7,"vlan":1},"remove_device":{"name":3,"link-ext":7,"vlan":1},"notify_proto":{},"remove":{},"set_data":{}}}
-> f1466e4c #00000000 data: {"objpath":"network.rrdns","objid":-1160913738,"objtype":88947186,"signature":{"lookup":{"addrs":1,"timeout":5,"server":3,"port":6,"limit":5}}}
-> f1466e4c #00000000 data: {"objpath":"network.wireless","objid":-1130553964,"objtype":1063186231,"signature":{"up":{},"down":{},"reconf":{},"status":{},"notify":{},"get_validate":{}}}
-> f1466e4c #00000000 data: {"objpath":"rc","objid":-1503606509,"objtype":2056638824,"signature":{"list":{"name":3,"skip_running_check":7},"init":{"name":3,"action":3}}}
-> f1466e4c #00000000 data: {"objpath":"service","objid":1460455996,"objtype":35590388,"signature":{"set":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"add":{"name":3,"script":3,"instances":2,"triggers":1,"validate":1,"autostart":7,"data":2},"list":{"name":3,"verbose":7},"delete":{"name":3,"instance":3},"signal":{"name":3,"instance":3,"signal":5},"update_start":{"name":3},"update_complete":{"name":3},"event":{"type":3,"data":2},"validate":{"package":3,"type":3,"service":3},"get_data":{"name":3,"instance":3,"type":3},"state":{"spawn":7,"name":3},"watchdog":{"mode":5,"timeout":5,"name":3,"instance":3}}}
-> f1466e4c #00000000 data: {"objpath":"session","objid":1703232304,"objtype":1000320332,"signature":{"create":{"timeout":5},"list":{"ubus_rpc_session":3},"grant":{"ubus_rpc_session":3,"scope":3,"objects":1},"revoke":{"ubus_rpc_session":3,"scope":3,"objects":1},"access":{"ubus_rpc_session":3,"scope":3,"object":3,"function":3},"set":{"ubus_rpc_session":3,"values":2},"get":{"ubus_rpc_session":3,"keys":1},"unset":{"ubus_rpc_session":3,"keys":1},"destroy":{"ubus_rpc_session":3},"login":{"username":3,"password":3,"timeout":5}}}
-> f1466e4c #00000000 data: {"objpath":"system","objid":977568483,"objtype":299823091,"signature":{"board":{},"info":{},"reboot":{},"watchdog":{"frequency":5,"timeout":5,"magicclose":7,"stop":7},"signal":{"pid":5,"signum":5},"validate_firmware_image":{"path":3},"sysupgrade":{"path":3,"force":7,"backup":3,"prefix":3,"command":3,"options":2}}}
-> f1466e4c #00000000 data: {"objpath":"uci","objid":269022427,"objtype":-1693753549,"signature":{"configs":{},"get":{"config":3,"section":3,"option":3,"type":3,"match":2,"ubus_rpc_session":3},"state":{"config":3,"section":3,"option":3,"type":3,"match":2,"ubus_rpc_session":3},"add":{"config":3,"type":3,"name":3,"values":2,"ubus_rpc_session":3},"set":{"config":3,"section":3,"type":3,"match":2,"values":2,"ubus_rpc_session":3},"delete":{"config":3,"section":3,"type":3,"match":2,"option":3,"options":1,"ubus_rpc_session":3},"rename":{"config":3,"section":3,"option":3,"name":3,"ubus_rpc_session":3},"order":{"config":3,"sections":1,"ubus_rpc_session":3},"changes":{"config":3,"ubus_rpc_session":3},"revert":{"config":3,"ubus_rpc_session":3},"commit":{"config":3,"ubus_rpc_session":3},"apply":{"rollback":7,"timeout":5,"ubus_rpc_session":3},"confirm":{"ubus_rpc_session":3},"rollback":{"ubus_rpc_session":3},"reload_config":{}}}
-> f1466e4c #00000000 data: {"objpath":"wpa_supplicant","objid":-1349912921,"objtype":-1212490777,"signature":{"phy_set_state":{"phy":3,"radio":5,"stop":7},"phy_set_macaddr_list":{"phy":3,"radio":5,"macaddr":1},"phy_status":{"phy":3,"radio":5},"config_set":{"phy":3,"radio":5,"num_global_macaddr":5,"config":1,"defer":7},"config_add":{"driver":3,"iface":3,"bridge":3,"hostapd_ctrl":3,"ctrl":3,"config":3},"config_remove":{"iface":3},"bss_info":{"iface":3}}}
-> f1466e4c #00000000 status: {"status":0}
<- f1466e4c #00000000 lookup: {"objpath":""}
-> f1466e4c #00000000 status: {"status":4}
-> b9648b76 #b9648b76 hello: {}
<- b9648b76 #00000000 lookup: {"objpath":"hotplug.ntp"}
-> b9648b76 #00000000 data: {"objpath":"hotplug.ntp","objid":-93532881,"objtype":-153292523,"signature":{"call":{"env":1}}}
-> b9648b76 #00000000 status: {"status":0}
<- b9648b76 #fa6ccd2f invoke: {"objid":-93532881,"method":"call","data":{"env":["ACTION=periodic","freq_drift_ppm=-6","offset=-0.005057","SHLVL=1","stratum=4","container=ujail","PWD=/","poll_interval=2048"]}}
-> 17c49143 #b9648b76 invoke: {"objid":-93532881,"method":"call","data":{"env":["ACTION=periodic","freq_drift_ppm=-6","offset=-0.005057","SHLVL=1","stratum=4","container=ujail","PWD=/","poll_interval=2048"]},"user":"ntp","group":"ntp"}
<- 17c49143 #b9648b76 status: {"status":0,"objid":-93532881}
-> b9648b76 #fa6ccd2f status: {"status":0,"objid":-93532881}

@BenJamesAndo
Copy link

Did you ever figure it out? I'm having the same issue.

@kvj
Copy link
Owner

kvj commented Jan 6, 2025

hard to say anything specific. I have 5 openwrt devices, all connected via HTTP and they respond very quickly

@BenJamesAndo
Copy link

Are any of your devices the GL-iNet Flint 2 GL-M6000? That's what I'm running and perhaps with the alternative Web UI some of the config is different and it doesn't work correctly. I'm running GL-iNet OpenWrt 24.10.0-rc2
Manually calling ubus call system reboot via ssh does restart the device.
image
image

File "/config/custom_components/openwrt/config_flow.py", line 42, in async_step_user
    await ubus.api_list() # Check connection
    ^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/openwrt/ubus.py", line 130, in api_list
    return await self.api_call("*", None, None, "list")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/openwrt/ubus.py", line 48, in api_call
    await self._login()
  File "/config/custom_components/openwrt/ubus.py", line 53, in _login
    result = await self._api_call(
             ^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
        "00000000000000000000000000000000")
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/openwrt/ubus.py", line 102, in _api_call
    raise ConnectionError(f"HTTP error: {response.status_code}")
ConnectionError: HTTP error: 404

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants