Follow-up to #51, using more of what the gateway shows.
Changes
Uptime (bug fix, no login needed): firmware 6.40 shows "Time Since Last Reboot" as D:HH:MM:SS (e.g. 03:06:29:34). The parser expected plain seconds, as older firmware sent, so uptime was blank on the panel ("Uptime -") and restart detection, which relies on uptime going backwards, never fired. parse_uptime now reads both formats.
This would have caught the modem's own reboot on Nov 16 at about 17:17 UTC. That was the 90 second outage UniFi recorded that day.
Firewall drops (logged in, every 5 minutes): the gateway's Logs page, counted per hour (gateway local time) for a day. The counts are split into:
flood: new incoming connections over the firmware's fixed 50 per second limit, which has no setting to change it;
invalid packets.
The log keeps about ten minutes and records at most one drop every 2 s, so the counts are a lower bound. Only rows newer than the last read are counted, and gap notes when rows aged out before they could be read. This is shown on the panel only and is not added to Needs attention, because it runs near the log's cap all the time.
AT&T's own speed tests (logged in, read with the NAT check every 30 minutes): the latest down and up results run by the modem (1167 / 1243 Mbps on Nov 6), as a reference for what the line itself delivers.
README updated.
Tested on the real gateway
Uptime: 282,698 s (3 d 6 h), read without logging in.
Firewall log: 214 rows covering 11 minutes, of which 192 were flood and 22 invalid.
Speed tests: parsed.
Screenshots (preview data)
Checks
575 tests pass (new: uptime formats, the firewall log and speed parsers, hourly counting with overlap, rollover and a 24 hour cap, and the scheduling).
flake8 and bandit are clean; eslint is at the 21-warning baseline.
Follow-up to #51, using more of what the gateway shows.
## Changes
- **Uptime (bug fix, no login needed)**: firmware 6.40 shows "Time Since Last Reboot" as `D:HH:MM:SS` (e.g. `03:06:29:34`). The parser expected plain seconds, as older firmware sent, so uptime was blank on the panel ("Uptime -") and restart detection, which relies on uptime going backwards, never fired. `parse_uptime` now reads both formats.
This would have caught the modem's own reboot on Nov 16 at about 17:17 UTC. That was the 90 second outage UniFi recorded that day.
- **Firewall drops** (logged in, every 5 minutes): the gateway's Logs page, counted per hour (gateway local time) for a day. The counts are split into:
- *flood*: new incoming connections over the firmware's fixed 50 per second limit, which has no setting to change it;
- *invalid* packets.
The log keeps about ten minutes and records at most one drop every 2 s, so the counts are a lower bound. Only rows newer than the last read are counted, and `gap` notes when rows aged out before they could be read. This is shown on the panel only and is not added to Needs attention, because it runs near the log's cap all the time.
- **AT&T's own speed tests** (logged in, read with the NAT check every 30 minutes): the latest down and up results run by the modem (1167 / 1243 Mbps on Nov 6), as a reference for what the line itself delivers.
- README updated.
## Tested on the real gateway
- Uptime: 282,698 s (3 d 6 h), read without logging in.
- Firewall log: 214 rows covering 11 minutes, of which 192 were flood and 22 invalid.
- Speed tests: parsed.
## Screenshots (preview data)

<img src="https://code.lotusguild.org/LotusGuild/gandalf/raw/branch/modem-extras-screenshots/wan-panel-phone.png" width="390">
## Checks
- 575 tests pass (new: uptime formats, the firewall log and speed parsers, hourly counting with overlap, rollover and a 24 hour cap, and the scheduling).
- flake8 and bandit are clean; eslint is at the 21-warning baseline.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Uptime: firmware 6.40 shows "Time Since Last Reboot" as D:HH:MM:SS,
which the parser (expecting seconds) read as nothing, so uptime was
blank and restart detection never fired. Both formats are read now.
- Firewall drops (logged in, every 5 minutes): the Logs page counted
per hour for a day, split into incoming connections over the
firmware's fixed flood limit (50 per second) and invalid packets. A
lower bound, since the log keeps one entry per 2 s. Panel only.
- The modem's own speed test history (logged in, every 30 minutes):
latest down and up results on the panel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jared
scheduled this pull request to auto merge when all checks succeed 2026-11-19 18:52:07 -05:00
jared
merged commit f097e4882c into main2026-11-19 18:52:13 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to #51, using more of what the gateway shows.
Changes
Uptime (bug fix, no login needed): firmware 6.40 shows "Time Since Last Reboot" as
D:HH:MM:SS(e.g.03:06:29:34). The parser expected plain seconds, as older firmware sent, so uptime was blank on the panel ("Uptime -") and restart detection, which relies on uptime going backwards, never fired.parse_uptimenow reads both formats.This would have caught the modem's own reboot on Nov 16 at about 17:17 UTC. That was the 90 second outage UniFi recorded that day.
Firewall drops (logged in, every 5 minutes): the gateway's Logs page, counted per hour (gateway local time) for a day. The counts are split into:
The log keeps about ten minutes and records at most one drop every 2 s, so the counts are a lower bound. Only rows newer than the last read are counted, and
gapnotes when rows aged out before they could be read. This is shown on the panel only and is not added to Needs attention, because it runs near the log's cap all the time.AT&T's own speed tests (logged in, read with the NAT check every 30 minutes): the latest down and up results run by the modem (1167 / 1243 Mbps on Nov 6), as a reference for what the line itself delivers.
README updated.
Tested on the real gateway
Screenshots (preview data)
Checks
🤖 Generated with Claude Code