DD-WRT smart home integration, free and open source

DD-WRT routers: presence of your devices, Wi-Fi signal, WAN link and rates, router uptime.
Follow your DD-WRT router or access point from Gladys, over your local network: who is at home (the phones connected to the Wi-Fi), the Wi-Fi signal and the IP address of each device you follow, the state and the rates of the internet link, the uptime and the load of the router. No cloud, no account.
The integration reads the status pages of the DD-WRT web interface
(Status_Lan.live.asp, Status_Wireless.live.asp,
Status_Internet.live.asp), the very pages your browser refreshes under
Status, with the login of the router. It never changes anything on
the router.
Developed without the hardware: feedback welcome. The integration is built and tested against pages written the way the DD-WRT web server writes them (read in its source code), not against a real router. Tell us what works and what does not in the issues.
This project is not affiliated with the DD-WRT project. DD-WRT is a trademark of its owner.
What you needβ
- Gladys Assistant 5.1.0 or later.
- A router or access point running DD-WRT (a build of the last ten years), reachable from Gladys.
- The login of its web interface (
rootby default, with the password you chose at the first start).
Set upβ
The configurationβ
In Gladys, Integrations β DD-WRT β Configuration:
- Router address: the IP address or name of the router, e.g.
192.168.1.1, with:portif its web interface does not use the default port. An address copied from the browser (https://192.168.1.1/) works too. - Use HTTPS: encrypts the password on your network. Enable HTTPS first on the router, under Administration β Management β Web Access.
- Accept a self-signed certificate: DD-WRT serves HTTPS with a certificate made on the router. Tick it for your own router only.
- User name and Password: the login of the web interface.
- Refresh interval: 10 s to 1 min (30 s by default). The rates are averages over this interval.
- WAN interface: the interface whose counters give the WAN rates. Leave it
empty: the integration reads it on the Status β Bandwidth page, where
the graph is named e.g.
WAN (eth1). If the rates stay empty, type the name shown there (eth1,vlan2,ppp0β¦). - Departure delay (minutes): a device no longer seen counts as away only after this delay (5 min by default): a phone asleep leaves the Wi-Fi for a few minutes.
- Count the ARP table as present (off by default): sees the wired devices, but Linux can keep an ARP entry long after the device left. Use it for devices that stay connected (a NAS, a TV), not for phones.
- Count a DHCP lease as present (off by default): a lease lasts until it expires (a day by default), long after the device left.
- Language of the names: the language of the device and feature names, set when a device is added to Gladys (French by default).
Then Test the connection: the report says what the router shows (Wi-Fi clients, ARP entries, leases, WAN, rates). A failure is shown in red with its reason (address, password, certificate).
Adding the devicesβ
The Discovery tab lists the router and the devices it sees (Wi-Fi clients, DHCP leases, ARP table), named by their DHCP host name. Add the router, and each device you want to follow.
The devicesβ
The routerβ
- Uptime (hours).
- System load (1 min): the load average, in percent of one core.
- Wi-Fi clients: the devices associated with all its access points.
- WAN link: 1 while the WAN has an address, 0 when it lost it (a router without WAN, as an access point, has no WAN feature).
- WAN download and WAN upload (Mbit/s): when the WAN interface is known.
Followed devicesβ
- Presence: 1 while the router sees the device on its Wi-Fi (and, with the options, in its ARP table or its leases), 0 once the departure delay has passed. Usable with the presence features of Gladys and the scenes.
- IP address.
- Wi-Fi signal (dBm): for a device seen on the Wi-Fi, from -120 (none) to 0. Sent when it moves by 3 dBm or more.
When the router cannot be read, nobody is sent away: the presence stays as it was until the router answers again.
Dashboardβ
- DD-WRT router: the load, the WAN rates, the Wi-Fi clients, the WAN link and the uptime. The Hide setting removes the blocks you do not need.
- Devices at home: the followed devices under their names in Gladys, present first, then away with the time since they were last seen. Setting: all of them, or the present ones only.
Scenesβ
Triggersβ
- Followed device arrived: a followed device is seen again. Choose the device, or leave it empty for any of them. Variables: name, MAC address, IP address.
- Followed device left: a followed device is away (departure delay passed). Same device filter. Variables: name, MAC address.
- Unknown device connected: a MAC address never seen before joined the Wi-Fi or got a DHCP lease. The first reading learns the network as it is, without firing. Filter: seen through Wi-Fi or DHCP lease. Variables: MAC address, IP address, host name, Wi-Fi interface.
- WAN link down: the WAN lost its address.
- WAN link restored: the WAN has an address again, with the outage length in minutes.
Scene ideasβ
- Send a message when an unknown device joins the guest Wi-Fi.
- Turn the heating to eco when the last phone left, back to comfort when the first one arrives.
- Notify the length of an internet outage once it is over.
How often the router is readβ
The integration reads three status pages (four with the WAN rates) at the chosen interval, the way an open Status page of the browser does every few seconds. Gladys is never asked to poll the devices.
Troubleshootingβ
- "user name or password refused by the router": check the login of the web interface. After a refusal, the integration waits 5 minutes before the next try (each try is a failed login in the router log); Test the connection tries at once.
- "certificate refused": tick Accept a self-signed certificate, or use HTTP.
- "no DD-WRT status page at this address": the address points to another device or firmware.
- No WAN rates: type the WAN interface shown on Status β Bandwidth.
- No Wi-Fi client listed: untick Mask MAC addresses if your build has it (Administration β Management): masked addresses cannot be followed.
Limitsβ
- Read only: no reboot, no Wi-Fi switch, no blocking.
- One router per integration. Several DD-WRT access points: follow the main router (its leases name every device), or the one the phones join.
- A Wi-Fi presence follows the device's MAC address: a phone that uses a private (random) address per network keeps the same one on your Wi-Fi, but a reset changes it.
- The status pages of DD-WRT are not an official API: their format changed across builds. The integration reads both the long format of the recent builds and the short one of the older ones; tell us if yours differs.
- Tomato and other firmwares are not supported.
- If the Wi-Fi page of a router that had one stops answering, the presence waits (nobody is sent away) until it answers again.
Configuration settingsβ
These are the settings DD-WRT asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| Your DD-WRT router | section | No | The integration reads the status pages of the web interface (Status β LAN, Wireless, WAN), with the login of the router. It never changes anything on it. |
| Router address | string | Yes | IP address or name of the router, with :port if its web server does not use the default port. |
| Use HTTPS | boolean | No | Encrypts the password on your network. Enable HTTPS under Administration β Management first. A router that redirects to HTTPS is followed anyway. |
| Accept a self-signed certificate | boolean | No | DD-WRT serves HTTPS with a certificate made on the router. Tick it only for your own router. |
| User name | string | Yes | The login of the web interface (root by default). |
| Password | secret | No | |
| Refresh interval | select | No | How often the router is read. The rates are averages over this interval. |
| WAN interface | string | No | For the WAN rates: the name shown under Status β Bandwidth, e.g. WAN (eth1). Empty: read from that page. |
| Presence | section | No | Add the devices to follow from the Discovery tab: each one becomes a presence sensor, present while the router sees it. |
| Departure delay (minutes) | number | No | A device no longer seen counts as away only after this delay: a phone asleep leaves the Wi-Fi for a few minutes. |
| Count the ARP table as present | boolean | No | For wired devices only: Linux can keep an entry long after the device left. Untick it to follow phones by their Wi-Fi. |
| Count a DHCP lease as present | boolean | No | A lease lasts until it expires (a day by default), long after the device left: tick it only for devices nothing else sees. |
| Language of the names | select | No | Language of the device and feature names, set when a device is added to Gladys. |
How to install DD-WRT in Gladysβ
- In Gladys, open Integrations: DD-WRT appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/guim31/gladys-ddwrt:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/guim31/gladys-ddwrt.
DD-WRT requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrationsβ
DD-WRT is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub β source of this documentation