AsusRouter
is a custom integration for Home Assistant to monitor and control your AsusWRT (and AsusWRT-Merlin)-powered router using the AsusRouter python library.
The integration uses the native HTTP(S) API (the same way as WebUI) and relies on direct communication with your device.
Firmware versions 3.0.0.4.x
are fully supported (older versions might have a limited amount of sensors available). When talking about the FW, 3.0.0.4
might be missed since it is the same all the time. Important is only the last part, e.g. 386.48631
for the stock or 386.7
for Merlin FW.
Firmware 5.x.x
(some DSL models) is NOT supported (not AsusWRT).
You can add this repository to your HACS:
HACS -> Integrations -> Explore & Download Repositories -> AsusRouter
Copy content of the stable branch custom_components/asusrouter/
to custom_components/asusrouter/
in your Home Assistant folder.
After AsusRouter is installed, you can add your device from Home Assistant UI.
To connect to the device you need to provide the following data:
- IP address or hostname
- Username (the one you use to log into the WebUI)
- Password
- Whether to use an SSL connection
Our Setup documentation may provide you with detailed information on the configuration flow and all the possible options.
Almost all the integration settings can be reconfigured later via the Configure
button on the Integrations page without the need to remove your device and add it again.
OpenVPN Client (non-control mode only)
(enabled by default)
- name:
openvpn_client_x
- attributes:
error_code
status
- status of the connection (disconnected
,connecting
,connected
)
- attributes (FW: Merlin-only):
auth_read
local_ip
post_compress_bytes
post_decompress_bytes
pre_compress_bytes
pre_decompress_bytes
public_ip
server_auth
server_ip
server_port
tcp_udp_read_bytes
tcp_udp_write_bytes
tun_tap_read_bytes
tun_tap_write_bytes
update_time
- description: Sensor value represents the current state of the OpenVPN client. Please, note, that both
connected
andconnecting
status will correspond to the switch being in theOn
state
WAN status
(disabled by default)
- name:
wan
- attributes:
dns
gateway
ip
ip_type
- type of the IP (can bestatic
,dhcp
and more)mask
private_subnet
- description: Sensor value represents the internet connection of the device
WiFi (non-control mode only)
(enabled by default)
- name:
wireless_{}
, where{}
can be2_4_ghz
,5_ghz
,5_ghz_2
,6_ghz
- attributes:
auth_method
channel
channel_bandwidth
chanspec
country_code
gmode_check
group_key_rotation
hidden
maclist_x
macmode
mbo_enable
mfp
mode
password
radius_ipaddr
radius_key
radius_port
ssid
wpa_encryption
xbox_optimized
- description: Sensor value represents the current value of the WiFi network
Device trackers are disabled by default if HA doesn't know the device. The generated device_tracker.device_name
entities include device_name
as reported by AsusRouter library according to the priority list:
- Friendly name of the device (if set in the router admin panel)
- Name as reported by the connected device
- MAC address if neither of the above is known
Attributes
connection_time
- time of connection to the router (only wireless devices)connection_type
- type of connection (Wired
,2.4 GHz
,5 GHz
). Implementation of6 GHz
requires a test device.host_name
- the name of the connected device as stated beforeinternet
- internet connection of the device, boolean:true
- connected,false
- disconnectedinternet_mode
- internet mode of the device:allow
- internet access alowed,block
- internet access blocked,time
- parental control is enabled with scheduleip
ip_type
- (Manual
,DHCP
and other)last_activity
- last time the device was seen online in HAmac
rssi
- (only wireless devices)rx_speed
- (only wireless devices)tx_speed
- (only wireless devices)
If the connected device's MAC address is known to Home Assistant (e.g. it was set up by another integration ABC
), its device_tracker
will be added to that device in the enabled state. Moreover, this device will be showing for both integrations: AsusRouter
and ABC
Boot time sensor
(disabled by default)
- name:
boot_time
- units:
- description: The sensor represents the last time the device was rebooted.
Connected devices sensor
(enabled by default)
- name:
connected_devices
- units:
- attributes:
devices
- represents a list of all connected (active) devices as theirMAC/IP/Hostname
- description: The sensor shows the total number of devices connected.
CPU usage sensor
(disabled by default)
- name:
cpu
- units:
%
- attributes:
core_X
- usage by corerx
- description: Sensor shows average CPU usage.
Load average sensors (FW: Merlin-only)
(disabled by default)
- names:
load_average_{}_min
for1
,5
and15
minutes - description: Sensors represent average load in the usual Linux way. Sensors rely on the
sysinfo
, available only with the Merlin firmware.
Network traffic and speed
(enabled by default)
- Traffic:
- names:
{}_download
/{}_upload
- units:
GB
[^units] (default) (important note). Can be selected during/after the integration configuration. - attributes:
bytes
- raw data from the device
- names:
- Speed:
- names:
{}_download_speed
/{}_upload_speed
- units:
Mb/s
(default). Can be selected during/after the integration configuration. - attributes:
bits/s
- raw data from device
- names:
Possible network interfaces (can be changed via the Configure
button for the configuration):
WAN
- traffic to your ISP (Some of the devices do not report WAN data, refer to the issue. If your device also doesn't show such sensors, please add your information to this issue)USB
- traffic to the USB modem / mobile phone connected via USB. Will be showing the correct values when USB WAN is connected andunknown
when a phone / USB modem is disconnected.LAN
- local wired trafficWLANx
- wireless traffic:0
- 2.4 GHz WiFi,1
and2
- 5 GHz WiFi- and more
Ports connection sensors
(disabled by default)
- names:
lan_speed
/wan_speed
- units:
Mb/s
- attributes:
lan_X
/wan_X
- represents speed of each portx
inMb/s
- description: Sensor value represents the total speed on all the connected LAN / WAN ports. E.g. if 2 ports are connected in
1 Gb/s
mode and 1 - in100 Mb/s
mode, this value will be2100 Mb/s
.
RAM usage sensor
(disabled by default)
- name:
ram
- units:
%
- attributes (all in
KB
, as device reports):free
total
used
- description: Sensor represents RAM usage of the device. In most cases, it slowly increases with time. On reboot, RAM usage drops.
Temperature sensors
(disabled by default)
Availability of sensors depends on your device and firmware
- names:
temperature_{}
forcpu
(CPU),2_4_ghz
(2.4 GHz module),5_ghz
(5 GHz module) - units:
°C
(native) - description: Sensors represent the temperature value of the corresponding module. Entities are created only for the sensors available for your device and firmware.
WAN IP sensor
(disabled by default)
- name:
wan_ip
- attributes:
dns
gateway
ip_type
- type of the IP (can bestatic
,dhcp
and more)mask
private_subnet
- description: Sensor value represents the current external IP address of the device
- If your device supports the dual-WAN feature, the corresponding sensors for traffic and speed can be created. They will be showing the correct values when USB WAN is connected and
unknown
, when a phone / USB modem is disconnected. - AsusWRT firmware calculates traffic as an N-digit HEX, so it overflows and resets to zero. On older devices, it can overflow at only 4 294 967 296 bytes (4 GB). The newer devices have limits between 100 and 1000 GB, depending on the interface. One can either use Long-term statistics or create a
utility_meter
for more control and the possibility to monitor traffic above the limitation. - The integration uses
2^10
conversion factors in calculations - the same way as native Asus software. If you would like to use10^3
factors, all the sensors provide raw data in bytes or bits/s.
All the following entities require Device control
to be enabled in the integration settings. Some of the entities may not be available for your device because of their firmware limitation.
Please, keep this in mind. Some lights
/ switches
might require processing time (especially for older devices). In the Home Assistant, this may look like the switch didn't work and clicked back to the initial state. But it will get the correct value on the next state update (mostly not more than several seconds).
LED
(enabled by default)
- name:
led
- description: Light entity allows user to control LED state of the device
- not available for:
RT-AC66U
OpenVPN Client
(enabled by default)
- name:
openvpn_client_x
- attributes:
error_code
status
- status of the connection (disconnected
,connecting
,connected
)
- attributes (FW: Merlin-only):
auth_read
local_ip
post_compress_bytes
post_decompress_bytes
pre_compress_bytes
pre_decompress_bytes
public_ip
server_auth
server_ip
server_port
tcp_udp_read_bytes
tcp_udp_write_bytes
tun_tap_read_bytes
tun_tap_write_bytes
update_time
- description: Switch entity allows turning on / off available OpenVPN client. Please, note, that both
connected
andconnecting
status will correspond to the switch being in theOn
state
WiFi
(enabled by default)
- name:
wireless_{}
, where{}
can be2_4_ghz
,5_ghz
,5_ghz_2
,6_ghz
- attributes:
auth_method
channel
channel_bandwidth
chanspec
country_code
gmode_check
group_key_rotation
hidden
maclist_x
macmode
mbo_enable
mfp
mode
password
radius_ipaddr
radius_key
radius_port
ssid
wpa_encryption
xbox_optimized
- description: Switch entity allows turning on / off WiFi network
The integration supports virtually any AsusWRT-powered device with firmware 3.0.0.4.x
.
This list provides only the models tested by me or other users. If your device is not listed yet but works well, please open a Device Support ticket with the device model and it will be added to the list.
Group | Devices | Firmware | Limitation |
---|---|---|---|
Full support |
802.11ax: | Stock: Any Merlin: Any | |
Limited support |
802.11ac: | Stock: Latest available Merlin: 380.70+ | no LED control |
Non-Asus devices |
Netgear: | Merlin: 380.70+ | |
Not supported |
|
If you have found an issue working with the integration or just want to ask for a new feature, please fill in a new issue.
You are also welcome to submit pull requests to the repository!
This integration is a free-time project. If you like it, you can support me by buying a coffee.
The initial codebase for this integration is highly based on Home Assistant core integration AsusWRT and ollo69/ha_asuswrt_custom.