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 22.03 stable release Device [openwrt] async_update_data error: rpc error: 2 #11

Open
amirudon opened this issue Oct 14, 2022 · 2 comments

Comments

@amirudon
Copy link

amirudon commented Oct 14, 2022

could not connect to openwrt 22.03

home assistant giving error:
Device [openwrt] async_update_data error: rpc error: 2

logs from home assistant:

This error originated from a custom integration.

Logger: custom_components.openwrt.coordinator
Source: custom_components/openwrt/ubus.py:121
Integration: OpenWrt (documentation, issues)
First occurred: 9:33:48 AM (23 occurrences)
Last logged: 9:59:08 AM

Device [openwrt] async_update_data error: rpc error: 2
Traceback (most recent call last):
File "/config/custom_components/openwrt/coordinator.py", line 250, in async_update_data
result["wan"] = await self.update_wan_info()
File "/config/custom_components/openwrt/coordinator.py", line 215, in update_wan_info
response = await self._ubus.api_call(
File "/config/custom_components/openwrt/ubus.py", line 41, in api_call
return await self._api_call(rpc_method, subsystem, method, params)
File "/config/custom_components/openwrt/ubus.py", line 121, in _api_call
raise ConnectionError(f"rpc error: {result[0]}")
ConnectionError: rpc error: 2

@BosakS
Copy link

BosakS commented Feb 11, 2023

Same error:
2023-02-12 00:50:54.069 ERROR (MainThread) [custom_components.openwrt.coordinator] Device [OpenWrt] async_update_data error: rpc error: 2
Traceback (most recent call last):
File "/config/custom_components/openwrt/coordinator.py", line 252, in async_update_data
result["wan"] = await self.update_wan_info()
File "/config/custom_components/openwrt/coordinator.py", line 217, in update_wan_info
response = await self._ubus.api_call(
File "/config/custom_components/openwrt/ubus.py", line 41, in api_call
return await self._api_call(rpc_method, subsystem, method, params)
File "/config/custom_components/openwrt/ubus.py", line 121, in _api_call
raise ConnectionError(f"rpc error: {result[0]}")
ConnectionError: rpc error: 2

@JorgenEvens
Copy link

In my case this was caused by entering the interface names rather than the actual device names for WAN and WLAN devices.

You can find the device names by hovering over the icons shown for an interface.
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