Skip to content

Latest commit

 

History

207 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ookla Speedtest Integration for Home Assistant

HACS Default GitHub Release GitHub Stars GitHub Issues Downloads Support Development Support via PayPal

Logo

Ookla Speedtest for Home Assistant

A comprehensive, local-first integration for monitoring your internet performance.

Open in HACS Add Integration

Features

📊 Sensors

  • Ping (ms) – Network latency
  • Download (Mbit/s)
  • Upload (Mbit/s)
  • Jitter (ms) – Network stability
  • Bufferbloat Grade – Latency stability rating (A+ to F)
  • Download/Upload Plan Compliance (%) – Speed vs. ISP rated plan
  • Last Test – Timestamp of the last successful test
  • Server – Name and location of the test server
  • ISP – Detected Internet Service Provider

⚙️ Flexible Testing

  • Automatically select the closest server
  • Choose from the 10 nearest servers
  • Manually specify a server ID
  • Optional fallback to closest server if a specified server is temporarily unavailable
  • Optional source interface binding for the speedtest CLI
  • Optional source IP binding for the speedtest CLI
  • Precise Scheduling: Run tests at a specific time (e.g., "every hour on the hour")
  • Automatic testing at a configurable interval
  • Manual-only mode for on-demand testing

🧭 User-Friendly Setup

  • Full UI-based setup and reconfiguration
  • Clear descriptions for every option
  • Automatic integration reload on configuration changes
  • No YAML required

▶️ Service Support

  • Run tests on demand via:
service: ookla_speedtest.run_speedtest
  • Optionally pass entity_id (recommended for cards) or device_id to run one configured test; if omitted, the service runs all configured tests.

Installation

This integration is designed to be installed via HACS.

1️⃣ Add the Repository

  • Go to HACS → Integrations → ⋮ → Custom repositories
  • Add: https://github.com/soulripper13/hass-speedtest-ookla
  • Category: Integration

2️⃣ Install

  • Search for Ookla Speedtest in HACS
  • Click Download

3️⃣ Restart Home Assistant

  • Go to Settings → System → Restart

4️⃣ Add the Integration

  • Go to Settings → Devices & Services → Add Integration
  • Search for Ookla Speedtest

Configuration

All configuration is handled through the Home Assistant UI.

Options

Speedtest Server

  • Closest server (automatic)
  • Select from 10 nearest servers
  • Manual server ID

Tip: Server IDs can be found at
https://www.speedtest.net/speedtest-servers-static.php

Manual Server ID

  • Required only when manual mode is selected

Fall Back to Closest Server

  • Optional
  • Only applies when using a specific server ID
  • Each test still tries the configured server first
  • If Ookla reports that server unavailable, the integration retries with the closest server for that run

Source Interface

  • Optional
  • Bind the test command to a specific local network interface, such as eth0 or wlan0

Source IP Address

  • Optional
  • Bind the test command to a specific local source IP address, such as 192.168.1.10

Manual Mode

  • Enabled: Tests run only when triggered manually
  • Disabled: Tests run automatically
  • Default: Enabled

Scan Interval

  • How often to run automatic tests
  • Configurable via Duration Selector (e.g., 1 hour, 30 minutes)
  • Default: 24 hours
  • Note: Lower values consume more bandwidth.

Start Time

  • Optional: Set a specific time for the schedule to start (e.g., 14:00:00)
  • Useful for aligning tests (e.g., set Start Time to 00:00:00 and Interval to 1 hour to run exactly on the hour)

Reconfiguring

  1. Go to Settings → Devices & Services
  2. Select Ookla Speedtest
  3. Click Configure
  4. Update options
  5. Integration reloads automatically

Usage

📊 Sensors Created

The integration creates a comprehensive set of sensors. Some are enabled by default, while others can be enabled via the Home Assistant UI.

Enabled by Default

  • sensor.ookla_speedtest_download (Mbps)
  • sensor.ookla_speedtest_upload (Mbps)
  • sensor.ookla_speedtest_ping (ms)
  • sensor.ookla_speedtest_jitter (ms)
  • sensor.ookla_speedtest_bufferbloat_grade (A-F)
  • sensor.ookla_speedtest_isp
  • sensor.ookla_speedtest_server
  • sensor.ookla_speedtest_last_test
  • sensor.ookla_speedtest_result_url

Bufferbloat grades are based on the additional latency under load: A+ (0-5 ms), A (6-30 ms), B (31-60 ms), C (61-120 ms), D (121-300 ms), E (301-600 ms), and F (over 600 ms).

Extended Metrics (Disabled by Default)

Go to Integration Settings → Entities to enable these.

Latency Metrics:

  • sensor.ookla_speedtest_ping_low (Idle Min)
  • sensor.ookla_speedtest_ping_high (Idle Max)
  • sensor.ookla_speedtest_ping_during_download (Avg)
  • sensor.ookla_speedtest_ping_low_during_download (Min)
  • sensor.ookla_speedtest_ping_high_during_download (Max)
  • sensor.ookla_speedtest_ping_during_upload (Avg)
  • sensor.ookla_speedtest_ping_low_during_upload (Min)
  • sensor.ookla_speedtest_ping_high_during_upload (Max)

Stability & Compliance:

  • sensor.ookla_speedtest_download_percent (Plan Compliance %)
  • sensor.ookla_speedtest_upload_percent (Plan Compliance %)
  • sensor.ookla_speedtest_jitter_during_download (ms)
  • sensor.ookla_speedtest_jitter_during_upload (ms)

Automation Example

Run a speed test every day at midnight:

automation:
- alias: Daily Speedtest
  trigger:
    - platform: time
      at: "00:00:00"
  action:
    - service: ookla_speedtest.run_speedtest

🎨 Lovelace Cards (Auto-Setup!)

This integration includes beautiful, custom Lovelace cards that work out of the box - no external dependencies required!

✨ New in v1.1.0: Glassmorphism Design

The cards have been completely redesigned with a modern Glassmorphism aesthetic, featuring:

  • 🌫️ Frosted Glass Effect: Semitransparent backgrounds with blur
  • 🌈 Gradient Gauges & Charts: Beautiful, smooth color transitions
  • 📱 Responsive Layouts: Looks great on mobile and desktop
  • 🖱️ Visual Editor: Configure settings directly in the UI!

📦 Built-in Cards

Card Description Preview
ookla-speedtest-card Full Interface with radial gauges, "GO" button, and Glassmorphism design. Best for main dashboards. Ookla Speedtest Card
ookla-speedtest-dashboard Dashboard view with sparkline area charts and detailed metrics. Perfect for network overviews. Dashboard Card
ookla-speedtest-minimal Clean design with large typography. Ideal for minimalist setups. Minimal Card
ookla-speedtest-compact Small single-line card. Great for side panels or dense views. Compact Card
ookla-speedtest-card-simple Basic simplified version for testing and quick setups. Simple Card

🚀 Zero-Config Setup

Cards are automatically registered when Home Assistant starts!

  1. Install the integration
  2. Restart Home Assistant
  3. Go to your Dashboard → Edit Dashboard → Add Card
  4. Search for "Ookla"
  5. Select a card and configure it visually!

Note: If cards don't appear immediately, you can force registration by calling the ookla_speedtest.register_card_resources service in Developer Tools, or simply refresh your browser cache.

🎯 Visual Configuration

The Ookla Speedtest Card now supports the visual editor! You can easily adjust:

  • Max Download Speed (for gauge scaling)
  • Max Upload Speed (for gauge scaling)

No YAML required! Just add the card and use the form.

# Minimal YAML example if you prefer code
type: custom:ookla-speedtest-card
max_download: 1000 
max_upload: 500

📖 Full Card Documentation

Alternative: Custom Card Combinations

If you prefer building cards from existing components, here's an example using apexcharts-card and layout-card:

Required: Install apexcharts-card, layout-card, and card-mod via HACS.

type: custom:layout-card
layout_type: custom:vertical-layout
layout:
  width: 320
  card_margin: 0px
cards:
  - type: custom:apexcharts-card
    chart_type: radialBar
    header:
      show: true
      title: Speedtest
    series:
      - entity: sensor.ookla_speedtest_download
        name: Download
        min: 0
        max: 1000
      - entity: sensor.ookla_speedtest_upload
        name: Upload
        min: 0
        max: 500

Troubleshooting

  • Setup fails: Check logs at Settings → System → Logs
  • Configure button error: Fixed in v2.0.0
  • No server list: Try closest server or manual ID
  • Card not displaying: Ensure required custom cards are installed

Debug Logging

logger:
  default: info
  logs:
    custom_components.ookla_speedtest: debug

Support the Project

This project is developed and maintained in spare time and is provided free to the community.

If you find it useful and would like to support ongoing development, maintenance, and improvements, any contribution is appreciated — but never required ❤️

Ways to Support

You can also help by:

  • Reporting bugs
  • Submitting pull requests
  • Suggesting features
  • Helping other users
  • Starring the repository ⭐

Thank you for being part of the community.

About

Home Assistant integration for measuring internet speed using ookla speedtest-cli.

Topics

Resources

Stars

44 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages