A Better Way to Monitor Internet Speed in Home Assistant

Replace inconsistent Home Assistant Speedtest.net readings with Ookla capacity snapshots, then separate WAN reachability, quality, capacity, and freshness.

Home Assistant reported 31.8 Mbps down and 21.2 Mbps up on my gigabit fiber connection. The WAN dashboard treated that result as a severe problem. A desktop test on the same network returned 929 Mbps down and 918 Mbps up.

A Better Way to Monitor Internet Speed in Home Assistant

The mismatch made the dashboard less useful than having no speed test at all. It displayed a believable number, attached a severe label to it, and pointed me toward an outage that did not exist.

Check the measurement path before changing thresholds

Home Assistant runs inside Docker on a virtual machine in my environment, so I checked that path first. Continuous latency stayed near 10 milliseconds and packet loss remained at zero. Those signals did not support the 32 Mbps result.

The built-in Home Assistant Speedtest.net integration uses the Python speedtest-cli project. The Home Assistant documentation warns that the integration can produce inconsistent readings. Instead of multiplying the old result or lowering the dashboard threshold, I replaced the measurement source.

Use the same Ookla test family for comparison

I installed the community Ookla Speedtest integration for Home Assistant through HACS. It runs Ookla’s Speedtest CLI, exposes download, upload, latency, jitter, server, and last-test sensors, and lets you choose a specific server.

My configuration tests against the CenturyLink server in Orlando. The integration tries that server first and falls back to the closest available server if Ookla reports the preferred target as unavailable. That gives me a stable comparison without turning one server into a single point of failure.

The first unattended run after the migration measured 943 Mbps down, 862 Mbps up, 12.36 milliseconds of idle latency, and 0.25 milliseconds of jitter. Both throughput numbers landed within 7 percent of the desktop result and restored confidence in the capacity sensor.

Give each WAN signal one job

A speed test consumes the connection and measures one moment. It cannot tell you why a result changed, and it should not declare the internet down. I rebuilt the WAN logic around four separate jobs.

SignalQuestionHome Assistant behavior
ReachabilityCan independent internet targets answer?Four ICMP and HTTPS probes must fail for two minutes before Home Assistant reports an outage.
Continuous qualityAre latency or packet loss bad for long enough to affect service?Moderate problems persist for six hours; severe problems persist for 30 minutes before escalation.
CapacityHow much throughput did the latest controlled test measure?Ookla runs twice per day and creates an advisory below 300 Mbps down or up.
FreshnessCan I still trust the latest capacity snapshot?A separate sensor warns when the latest successful test is more than 14 hours old.

This split keeps a slow capacity sample from painting the whole WAN red. Reachability can stay online while the dashboard marks capacity as degraded. A stale test can surface without pretending that the connection failed.

Build the dashboard around decisions

The updated WAN page starts with reachability, continuous quality, Ookla capacity, and test freshness. The detail section shows download and upload speed, idle and loaded latency, jitter, packet loss, probe count, and the server used for the test. A rule panel explains the threshold behind each state.

I use the same evidence-first approach in my Home Assistant entity cleanup workflow: compare the dashboard symptom with the system that owns the data before removing or renaming anything. My Tugtainer monitoring setup follows a similar pattern by keeping routine status separate from exceptions that need attention.

Copy the Home Assistant implementation

Treat the files as patterns. Your bandwidth thresholds, preferred server, probe targets, and persistence windows should match your connection and tolerance for alerts. The Ookla component is a third-party HACS integration, so review its code and back up Home Assistant before adding it to a production system.

Watch the full troubleshooting path

The video shows the original 32 Mbps dashboard result, the 929 Mbps desktop comparison, the first unattended Ookla run, and the rebuilt WAN page.

TAGS