Skip to content

Commit

Permalink
Updated asuswrt.markdown for new update (home-assistant#11426)
Browse files Browse the repository at this point in the history
This describes the use of the two new configuration parameters: `interface` and `dnsmasq` and how this improves use with rt-n56u project
  • Loading branch information
pkishino authored Feb 25, 2020
1 parent c3badda commit 6e5f830
Showing 1 changed file with 12 additions and 29 deletions.
41 changes: 12 additions & 29 deletions source/_integrations/asuswrt.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,16 @@ require_ip:
required: false
type: boolean
default: true
interface:
description: "The interface of the router that you want statistics from (e.g. eth0,eth1 etc)"
required: false
type: string
default: eth0
dnsmasq:
description: "The location of the dnsmasq.leases files"
required: false
type: string
default: /var/lib/misc
sensors:
description: List of enabled sensors
required: false
Expand Down Expand Up @@ -115,32 +125,5 @@ The example above, creates the following sensors:

## Padavan custom firmware (The rt-n56u project)

The [rt-n56u project](https://bitbucket.org/padavan/rt-n56u) does not store `dnsmasq.leases` which is used to track devices at `/var/lib/misc/` as `asuswrt` do. However this integration 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.

1. SSH or Telnet into the router. (default ssh [email protected])
2. Run the following command to find the file:

```bash
$ find / -name "dnsmasq.leases"
```
3. Copy or remember the full path of, example: `/tmp/dnsmasq.leases`
4. Create the folder if it does not exist:

```bash
$ mkdir -p /var/lib/misc
```
5. Add the linking process to the routers started script (one line):

```bash
$ echo "/bin/ln -s /tmp/dnsmasq.leases /var/lib/misc/dnsmasq.leases" >> /etc/storage/started_script.sh
```

6. Reboot the router or link the file:

```bash
$ /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`
The [rt-n56u project](https://bitbucket.org/padavan/rt-n56u) does not store `dnsmasq.leases` which is used to track devices at `/var/lib/misc/` as `asuswrt` do. However this integration can still be used for the rt-n56u project by changing the dnsmasq location using the `dnsmasq` variable to `dnsmasq: '/tmp'`
Also, to get the statistics for the `WAN` port, specify `interface: 'eth3'` as this is the interface used in the rt-n56u project

0 comments on commit 6e5f830

Please sign in to comment.