External integration - Speedtest.net

[External Integration] Speedtest.net — Monitor Your Internet Speed from Gladys

Hello everyone :waving_hand:

I present to you Speedtest.net for Gladys, the equivalent of the famous Home Assistant integration: scheduled speed tests against Speedtest.net servers, directly from Gladys.

What it looks like: a « Speedtest » device with four historical sensors, to be displayed on the dashboard and used in scenes:

Sensor Unit
Download / Upload Mbit/s
Ping / Jitter ms

Typical use cases: check what your ISP actually delivers, trigger a notification when the speed drops below a threshold, or detect a switch to a 4G backup link.

How it works:

  • automatic test at adjustable intervals (default: 1 hour, disableable), plus a « Run a Speed Test » button;
  • automatic selection of the nearest and healthy server (the Ookla catalog lists dead servers!), or forced server by ID via the « List Nearby Servers » button;
  • 100 % JavaScript, no Ookla binary included (its license prohibits redistribution), no account or API key;
  • parallel connections and measurement duration adjustable.

:warning: A test saturates the connection for ~25 s and transfers several hundred MB on a fast line — keep this in mind if your plan is capped.

Independent project, not affiliated with Ookla. Speedtest® is a trademark of Ookla, LLC.

And there you go, another function I was hacking together in Node-red that I can now replace! Thanks @guim31

We’re all going to end up deleting Node Red soon

I’ve already done that :sweat_smile:

Wouldn’t an iperf3 be better for the tests?

We can create an iperf3 integration if you want lol

I won’t go that far :joy:

:rocket: Speedtest.net 1.1.0 is available, with a dashboard widget: the four live measurements (download, upload, ping, jitter), a graph of the throughput or latency over the period of your choice, the date of the last test, the server used and a Run a test button.

:warning: This version requires Gladys 5.1 minimum: update Gladys first, otherwise the integration update will not be offered to you.

Gladys offers the update in Integrations. Your devices and your scenes do not change; you just need to add the widget from the dashboard editor. Your feedback is welcome :slightly_smiling_face:

issue: changing the time period setting for the chart does not work. The chart remains on 24h even if you select « last week »

Thanks for the feedback @Chris75! :folded_hands:

I looked into it, and I think the setting works, but the chart doesn’t show it: it aligns its dates with the available measurements, not with the selected period. So if you installed Speedtest a day or two ago, „24 h“ and „last week“ show exactly the same thing :sweat_smile:

How long have you had it installed? And when you hover over the curve, when does the first measurement date from?

If that’s the case, the curve will lengthen on its own with the days. And I’ll suggest that the chart always shows the full period, even if it’s empty at the beginning: that’s on the Gladys core side, not in the integration.

Ok, you’re right: I installed speed test on October 6th, so 4 days ago, and today it works very well! Thanks