UniFi already rates the WAN every 5 minutes (fine, high latency, packet
loss, down), the same timeline its Network app charts. The monitor now
reads the last day of it from the dashboard API each cycle, read only,
instead of Gandalf pinging on its own.
- modem.wan_quality() turns the dashboard data into periods, drops and
current service latencies; stored as monitor_state.wan_quality.
- Needs attention: "Internet: packet loss in N of the last 12 five-minute
periods" (2+ lossy periods, red), "high latency" (3+ bad periods,
amber), and drops in the last hour. Stale copies are ignored.
- WAN / Fiber panel: a 24 hour strip with a legend and latency now,
also shown while the modem itself can't be read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>