asuswrt component is the main component to connect to a ASUSWRT based router.
There is currently support for the following device types within Home Assistant:
- Presence Detection - The asuswrt platform offers presence detection by looking at connected devices to a ASUSWRT based router.
- Sensor - The asuswrt sensor platform allows you to get upload and download data from your ASUSWRT within Home Assistant.
To use an ASUSWRT router in your installation, add the following to your
# Example configuration.yaml entry asuswrt: host: YOUR_ROUTER_IP username: YOUR_ADMIN_USERNAME
(string)(Required)The IP address of your router, e.g.,
(string)(Required)The username of a user with administrative privileges, usually
(string)(Optional)The password for your given admin account (use this if no SSH key is given).
(string)(Optional)The protocol (
telnet) to use.
Default value: ssh
(integer)(Optional)SSH port to use.
Default value: 22
(string)(Optional)The operating mode of the router (
Default value: router
(string)(Optional)The path to your SSH private key file associated with your given admin account (instead of password).
(boolean)(Optional)If the router is in access point mode.
Default value: true
(list)(Optional)List of enabled sensors
You need to enable telnet on your router if you choose to use
To enable ASUSWRT sensors as part of your installation, reference the following example configuration:
# Example configuration.yaml entry asuswrt: host: YOUR_ROUTER_IP username: YOUR_ADMIN_USERNAME ssh_key: /config/id_rsa sensors: - upload - download - upload_speed - download_speed
The example above, creates the following sensors:
- sensor.asuswrt_download (unit_of_measurement: Gigabyte - Daily accumulation)
- sensor.asuswrt_download_speed (unit_of_measurement: Mbit/s)
- sensor.asuswrt_upload (unit_of_measurement: Gigabyte - Daily accumulation)
- sensor.asuswrt_upload_speed (unit_of_measurement: Mbit/s)
The rt-n56u project does not store
dnsmasq.leases which is used to track devices at
asuswrt do. However this component can still be used for the rt-n56u project by linking
dnsmasq.leases during the boot process of the router.
Follow these steps to setup the link.
- SSH or Telnet into the router. (default ssh email@example.com)
- Run the following command to find the file:
$ find / -name "dnsmasq.leases"
- Copy or remember the full path of, example:
- Create the folder if it does not exist:
$ mkdir -p /var/lib/misc
- Add the linking process to the routers started script (one line):
$ echo "/bin/ln -s /tmp/dnsmasq.leases /var/lib/misc/dnsmasq.leases" >> /etc/storage/started_script.sh
- Reboot the router or link the file:
$ /bin/ln -s /tmp/dnsmasq.leases /var/lib/misc/dnsmasq.leases
The started script is also accessible and editable in the Router’s web interface.
Advanced Settings -> Customization -> Scripts -> Custom User Script -> Run After Router Started