kvj / hass_openwrt Goto Github PK
View Code? Open in Web Editor NEWHome Assistant integration with OpenWrt devices
License: MIT License
Home Assistant integration with OpenWrt devices
License: MIT License
Hi @kvj,
Thank you for your integration. When trying to set it up I get the bellow error.
The device is GL iNET GL-MT300N-V2 running OpenWrt 19.07.8 r11364-ef56c85848.
Home Assistant 2023.1.2
Supervisor 2022.12.1
Thanks in advance for your help.
This error originated from a custom integration.
Logger: custom_components.openwrt.coordinator
Source: custom_components/openwrt/ubus.py:99
Integration: OpenWrt (documentation, issues)
First occurred: 10:37:02 (36 occurrences)
Last logged: 11:18:27
Device [Climate Control Bridge] async_update_data error: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 525, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 372, in decode
obj, end = self.raw_decode(s)
File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 402, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/openwrt/coordinator.py", line 245, in async_update_data
self._apis = await self.load_ubus()
File "/config/custom_components/openwrt/coordinator.py", line 234, in load_ubus
return await self._ubus.api_call("*", None, None, "list")
File "/config/custom_components/openwrt/ubus.py", line 44, in api_call
await self._login()
File "/config/custom_components/openwrt/ubus.py", line 48, in _login
result = await self._api_call(
File "/config/custom_components/openwrt/ubus.py", line 99, in _api_call
json_response = response.json()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I have two OpenWrt-based managed switches with 24/48 PoE ports. I would like to monitor the power consumption within Home Assistant, thus it makes a lot of sense to integrate them into this project.
My switches are Realtek-based and require the realtek-poe package to support PoE. This package provides a ubus call poe info
command to get, amongst others, power statistics.
Is this enough to create a HA sensor for it?
Thanks
Hello, I have a problem successfully restarting a service. I think my configuration is not good.
Besides, with the addition of the file lines I lose access. API error
hass.json
{
"hass": {
"description": "Home Assistant OpenWrt integraion permissions",
"read": {
"ubus": {
"network.wireless": ["status"],
"network.device": ["status"],
"iwinfo": ["info", "assoclist"],
"hostapd.*": ["get_clients", "wps_status"],
"system": ["board"],
"mwan3": ["status"]
},
},
"write": {
"ubus": {
"system": ["reboot"],
"hostapd.*": ["wps_start", "wps_cancel"]
"file": ["exec"]
},
"file": {
"/etc/init.d/presence-detector": ["exec"]
}
},
}
}
command test homeassistant
service: openwrt.exec
data:
command: service presence-detector restart
target:
entity_id: binary_sensor.openwrt_wifiap_02
Using v0.1.0 of the custom integration, and OpenWRT v23.05.2
I've configured the router with ubus/uci and it was working for a while. I did find that creating a new user called hass didn't seem to 'take' on the router, so I've ended up using the root user/password for now (I know, I know). I did have the integration working and things were great - I was able to create some firewall rules and control the 'enabled' flag using commands through the service. However, usually when HASS is updated or restarted, the integration seems to lose connections, and even if I delete and re-add, I get errors in the log.
This is an example of the error once I recreate the integration:
This error originated from a custom integration.
Logger: custom_components.openwrt.ubus
Source: custom_components/openwrt/ubus.py:105
Integration: OpenWrt (documentation, issues)
First occurred: 21:19:46 (5 occurrences)
Last logged: 21:20:21
api_call rpc error: {'code': -32000, 'message': 'Object not found'}
along with this one:
This error originated from a custom integration.
Logger: custom_components.openwrt.coordinator
Source: custom_components/openwrt/coordinator.py:298
Integration: OpenWrt (documentation, issues)
First occurred: 21:19:46 (5 occurrences)
Last logged: 21:20:21
Device [HomeNetRouter] async_update_data error: Object not found
Traceback (most recent call last):
File "/config/custom_components/openwrt/coordinator.py", line 298, in async_update_data
result['wireless'] = await self.update_ap(wireless_config['ap'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/openwrt/coordinator.py", line 225, in update_ap
result[item['ifname']] = await self.update_hostapd_clients(item['ifname'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/openwrt/coordinator.py", line 123, in update_hostapd_clients
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 109, in _api_call
raise NameError(message)
NameError: Object not found
It looks like it cannot find the ap entries in the interfaces ... but I wonder if the issue is that, for some reason, I have two mode keys:
Anyway - happy to set up some debugging if you have a guide on how to setup an integration with HASS for debugging :) Or I can just litter the code with logging statements if that would help ... I have some Python experience but am not an expert.
Trying to set up the integration, I get this error:
2021-10-24 10:22:17 WARNING (MainThread) [homeassistant.config_entries] Config entry 'OpenWRT Router - 192.168.0.1' for openwrt integration not ready yet: OpenWrt communication error: rpc error: 3; Retrying in background 2021-10-24 10:22:22 ERROR (MainThread) [custom_components.openwrt.coordinator] Device [OpenWRT Router] async_update_data error: rpc error: 3 Traceback (most recent call last): File "/config/custom_components/openwrt/coordinator.py", line 207, in async_update_data result['wireless'] = await self.update_ap(wireless_config['ap']) File "/config/custom_components/openwrt/coordinator.py", line 154, in update_ap result[item['ifname']] = await self.update_hostapd_clients(item['ifname']) File "/config/custom_components/openwrt/coordinator.py", line 114, in update_hostapd_clients 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: 3
I followed the installation instructions, and I seem to be able to authenticate using the http method here
curl -d '{ "jsonrpc": "2.0", "id": 1, "method": "call", "params": [ "00000000000000000000000000000000", "session", "login", { "username": "root", "password": "secret" } ] }' http://your.server.ip/ubus
I note the discussion around creating sensors here #9 , and also that commit aaddd2b implemented capture of the openwrt.exec
service call stdout return on the event bus.
The resulting event from calling the /usr/bin/uptime
command example from the readme is:
event_type: openwrt_exec_result
data:
address: 192.168.1.1
id: Ntgr-X4S-R7800
command: /usr/bin/uptime
code: 0
stdout: |2
09:50:44 up 3 days, 16:23, load average: 0.21, 0.19, 0.16
origin: LOCAL
time_fired: "2023-08-18T23:50:44.891336+00:00"
context:
id: 01H85GXXWV1VG59SAMTENB3HBH
parent_id: null
user_id: null
For those with a moderate amount of Home Assistant knowledge, it should therefore be possible to setup an automation to periodically call the openwrt.exec
service (https://www.home-assistant.io/docs/automation/trigger/#time-pattern-trigger), and capture the output within a template trigger sensor (https://www.home-assistant.io/integrations/template/#trigger-based-template-binary-sensors-buttons-images-numbers-selects-and-sensors). I haven't tried it yet; capturing and reformatting the output looks a little tricky, but doable.
However I have confirmed that the terminal command ubus call system info | jsonfilter -e "@['uptime']"
directly returns OpenWRT system uptime in seconds, and suggest that implementing this as a sensor within the integration is a more elegant and user friendly solution.
Thank you for your work on this in any case; it is already very useful in monitoring OpenWRT connectivity within Home Assistant.
With HA 2024.8 I'm get the following warning:
Detected that custom integration 'openwrt' calls async_forward_entry_setup for integration, openwrt with title: viki-slave - 192.168.210.1 and entry_id: f34dd94cda759320765f67074352e2ff, which is deprecated and will stop working in Home Assistant 2025.6, await async_forward_entry_setups instead at custom_components/openwrt/init.py, line 34: hass.async_create_task(, please create a bug report at https://github.com/kvj/hass_openwrt/issues
Hi,
I am having some trouble creating Sensors.
I have followed the steps and I can see the below:
I would like to create sensors for different things such as system uptime, how many dhcp leases, public ip address, etc.
I've done a bit of research but haven't had much luck.
I was able to use the openwrt.reboot service to restart OpenWRT. Can I possibly parse the output from openwrt.exec command to a sensor?
Thanks!
Hi all,
latest HomeAssistant docker release 2023.1.7 and 0.1.0 of openwrt. On restart, i got this error:
Setup failed for custom integration openwrt: Unable to import component: cannot import name 'SupportsResponse' from 'homeassistant.core' (/usr/src/homeassistant/homeassistant/core.py)
Any hint?
https://developers.home-assistant.io/blog/2022/07/08/config_entry_forwards/
Replace this block with await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
Hi folks,
can somebody shortly point out, which file has to edit here?
thanks in advance and best
Andy
Hi and thanks for this great integration, on my OpenWRT instance I don't have WPS so I hade to disable this part in the code:
macs = dict()
for key, value in response['clients'].items():
macs[key] = dict(signal=value.get("signal"))
#response = await self._ubus.api_call(
# f"hostapd.{interface_id}",
# 'wps_status',
# dict()
#)
return dict(
clients=len(macs),
macs=macs,
# wps=response["pbc_status"] == "Active"
)
I just have normal AP clients cause running in AP mode, like:
ubus call hostapd.wlan1 get_clients
{
"freq": 2462,
"clients": {
"xx:xx:xx:xx:xx:xx": {
"auth": true,
"assoc": true,
"authorized": true,
"preauth": false,
"wds": false,
"wmm": true,
"ht": true,
"vht": false,
"wps": false,
"mfp": false,
"rrm": [
0,
0,
0,
0,
0
],
"aid": 2,
"bytes": {
"rx": 148449402,
"tx": 8522063
},
"airtime": {
"rx": 0,
"tx": 0
},
"packets": {
"rx": 153853,
"tx": 99111
},
"rate": {
"rx": 72200,
"tx": 72200
},
"signal": -55,
"capabilities": {
}
}
}
}
would be great if we could add support also for this use case, thanks;)
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
hi, firstly thank you for excellent plugin you've created, been using it for awhile on openwrt 19.07 without a problem. recently upgraded to by openwrt 21.02 and the error showed up.
device : Linksys WRT1900AC v2
on openwrt 19.07 it works fine.
on openwrt 21.02 it gives error.
might be caused by transition to DSA? it is giving error " OpenWrt communication error: 'ifname'"
checked the output from ubus, it indeed does not have ifname anymore.
any idea how to fix this?
Thanks
Since this issue was going in a complete different direction, i start a new one here:
I want to add new Sensors/Entities to the integration. for example ubus call dsl metrics
For sure i have to add this to the ACL File.. like this and restart rpcd.
{
"hass": {
"description": "Home Assistant OpenWrt integration permissions",
"read": {
"ubus": {
"network.wireless": ["status"],
"network.device": ["status"],
"iwinfo": ["info", "assoclist"],
"hostapd.*": ["get_clients", "wps_status"],
"system": ["board"],
"dsl": ["metrics"]
},
},
"write": {
"ubus": {
"system": ["reboot"],
"hostapd.*": ["wps_start", "wps_cancel"],
"file": ["exec"]
},
"file": {
"/usr/bin/uptime": ["exec"]
}
}
}
}
but since i did not find anything new to the integrations-tab in hassio.. i was trying to understand the code of this addon.. i am not a coder =)
So.. do i understand it correctly, that adding new sensors/entities - for example as an ubus-call - there is no automatism to integrate it?
Are all Sensors hard-coded? Do i need to clone the repo and change code for myself to add?
If i am wrong.. what is the correct way to add new sensors/entities?
`{
"radio0": {
"up": true,
"pending": false,
"autostart": true,
"disabled": false,
"retry_setup_failed": false,
"config": {
"path": "1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0",
"channel": "1",
"band": "2g",
"htmode": "HT20",
"cell_density": 0
},
"interfaces": [
{
"section": "default_radio0",
"ifname": "wlan0",
"config": {
"mode": "ap",
"ssid": "OpenWrt",
"encryption": "none",
"macfilter": "deny",
"maclist": [
"abc"
],
"network": [
"lan"
],
"mode": "ap"
},
"vlans": [
],
"stations": [
]
},
{
"section": "wifinet3",
"ifname": "wlan0-1",
"config": {
"mode": "ap",
"ssid": "Iot Devices",
"encryption": "sae",
"hidden": true,
"key": "xyz",
"mode": "ap"
},
"vlans": [
],
"stations": [
]
}
]
},
"radio1": {
"up": true,
"pending": false,
"autostart": true,
"disabled": false,
"retry_setup_failed": false,
"config": {
"path": "1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0",
"channel": "36",
"band": "5g",
"htmode": "VHT80",
"cell_density": 0
},
"interfaces": [
{
"section": "default_radio1",
"ifname": "wlan1",
"config": {
"mode": "ap",
"ssid": "OpenWrt",
"encryption": "none",
"macfilter": "deny",
"maclist": [
"abc"
],
"network": [
"lan"
],
"mode": "ap"
},
"vlans": [
],
"stations": [
]
}
]
}
}`
It stucks at finding network in config.
hello
i have this error in home-assistant.log
2022-10-19 22:10:21.835 ERROR (MainThread) [custom_components.openwrt.ubus] api_call rpc error: {'code': -32002, 'message': 'Access denied'}
this command with my user and password return
curl -d '{ "jsonrpc": "2.0", "id": 1, "method": "call", "params": [ "00000000000000000000000000000000", "session", "login", { "username": "hass", "password": "homeassistant" } ] }' http://192.168.0.254/ubus
{"jsonrpc":"2.0","id":1,"result":[0,{"ubus_rpc_session":"c95800fca267a2bf9d90c772ccfd458f","timeout":300,"expires":299,"acls":{"access-group":{"unauthenticated":["read"]},"ubus":{"luci":["getFeatures"],"session":["access","login"]}},"data":{"username":"hass"}}]}
on my openwt router
/etc/config/rpcd
`config rpcd
option socket /var/run/ubus/ubus.sock
option timeout 30
config login
option username 'root'
option password '$p$root'
list read ''
list write ''
config login
option username 'hass'
option password '$p$hass'
list read hass
list read unauthenticated
list write hass`
the file hass.json in /usr/share/rpcd/acl.d/
{ "hass": { "description": "Home Assistant OpenWrt integration permissions", "read": { "ubus": { "network.wireless": ["status"], "network.device": ["status"], "iwinfo": ["info", "assoclist"], "hostapd.*": ["get_clients", "wps_status"], "system": ["board"], "mwan3": ["status"] }, }, "write": { "ubus": { "system": ["reboot"], "hostapd.*": ["wps_start", "wps_cancel"] "file": ["exec"] }, "file": { "/usr/bin/uptime": ["exec"] } }, } }
the result of command "ubus call session list"
{ "ubus_rpc_session": "c95800fca267a2bf9d90c772ccfd458f", "timeout": 300, "expires": 116, "acls": { "access-group": { "unauthenticated": [ "read" ] }, "ubus": { "luci": [ "getFeatures" ], "session": [ "access", "login" ] } }, "data": { "username": "hass" } }
many thanks for your help
At least allow rules to be enabled/disabled, and maybe times changed.
Hi!
First seems like a great intergration! Would like to test this. But not able to complete the config. Did al the steps but getting a SSL error.
Logger: custom_components.openwrt.ubus
Source: custom_components/openwrt/ubus.py:92
Integration: OpenWrt (documentation, issues)
First occurred: 16:10:27 (2 occurrences)
Last logged: 16:10:47
api_call exception: HTTPSConnectionPool(host='192.168.1.1', port=443): Max retries exceeded with url: /ubus (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)')))
Logger: custom_components.openwrt.coordinator
Source: custom_components/openwrt/ubus.py:93
Integration: OpenWrt (documentation, issues)
First occurred: 16:10:27 (2 occurrences)
Last logged: 16:10:47
Device [Test] async_update_data error:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1040, in validate_conn
conn.connect()
File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 414, in connect
self.sock = ssl_wrap_socket(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/ssl.py", line 453, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "/usr/local/lib/python3.9/site-packages/urllib3/util/ssl.py", line 495, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "/usr/local/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/usr/local/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/usr/local/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 440, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.1.1', port=443): Max retries exceeded with url: /ubus (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/openwrt/ubus.py", line 90, in _api_call
response = await self.executor_job(post)
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/openwrt/ubus.py", line 84, in post
return requests.post(
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 117, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 529, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 645, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 517, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='192.168.1.1', port=443): Max retries exceeded with url: /ubus (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1129)')))
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/openwrt/coordinator.py", line 243, in async_update_data
self._apis = await self.load_ubus()
File "/config/custom_components/openwrt/coordinator.py", line 232, in load_ubus
return await self._ubus.api_call("*", None, None, "list")
File "/config/custom_components/openwrt/ubus.py", line 44, in api_call
await self._login()
File "/config/custom_components/openwrt/ubus.py", line 48, in _login
result = await self._api_call(
File "/config/custom_components/openwrt/ubus.py", line 93, in _api_call
raise ConnectionError from err
ConnectionError
Logger: homeassistant.config_entries
Source: config_entries.py:370
First occurred: 16:10:47 (1 occurrences)
Last logged: 16:10:47
Config entry 'Test - 192.168.1.1' for openwrt integration not ready yet: OpenWrt communication error: ; Retrying in background
I don't use any certificate, no HTTPS. What am i doing wrong? Can u help :)?
Error on setup: Setup erneut versuchen: OpenWrt communication error: 'ifname'
well, yes, that's right for 19.07 and newer:
root@c2600_2-OpenWrt:~# ifname
-ash: ifname: not found
root@c2600_2-OpenWrt:~#
root@c2600_2-OpenWrt:~# grep ifname /etc/config/*
/etc/config/network: option ifname 'lo'
/etc/config/network: option ifname 'bat0 eth0 eth0.2 eth1 eth1.1 lan6 wan6'
/etc/config/network: option ifname '@wan'
/etc/config/network:# option ifname '@lan'
/etc/config/network: option ifname @lan
/etc/config/network: option ifname 'eth0.3'
/etc/config/network: option ifname 'eth1.3'
/etc/config/wireless: option ifname 'mesh0'
/etc/config/wireless: option ifname 'mesh1'
so, what's wrong?
I followed the tutorial, but I can't understand this line, where, and how to do it.
Change password: passwd hass
Is default password "hass"
https://github.com/kvj/hass_openwrt#ubus-configuration
I regularly disable Wifi on some of my access points (via ubus). When HA restarts and Wifi is disabled the extension fails to reconnect those access points. I have to manually reenable Wifi to reconnect them.
Error:
Traceback (most recent call last):
File "/config/custom_components/openwrt/coordinator.py", line 297, in async_update_data
wireless_config = await self.discover_wireless()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/openwrt/coordinator.py", line 57, in discover_wireless
conf = dict(ifname=iface['ifname'],
~~~~~^^^^^^^^^^
KeyError: 'ifname'
Hello, first thanks a lot for your integration. I am planning to build a script to simplify the router configuration for this integration, so that it can be easily ran through something like SSH.
I have a suggestion for you: refactor openwrt.reboot
service into a button entity.
Some other router integrations have this as well, and I think it fits the purpose more nicely and they are simpler to integration in the dashboard.
Could you please add an example to the documentation, how to execute custom commands from Home Assistant?
I am asking because I tried a lot of things to archive this without success. Since I don't even know what the exact steps are, it is difficult to search for an error.
Here is what I thought would be working:
`
alias: New Script
sequence:
Home Assistant answers with: Unknown error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.