Files
NetAlertX/front/plugins/internet_speedtest
sebingel 4c117db463 Fix elementOptions: rename typo 'ordeable' to 'orderable'
The key 'ordeable' in elementOptions was a long-standing typo for the
correct English word 'orderable'. Since the JS check in settings_utils.js
used the same misspelled key, the feature appeared to work — but it was
relying on the consistent propagation of a typo across the entire codebase.

Two pre-existing entries in front/plugins/ui_settings/config.json already
used the correct spelling 'orderable', but these had no effect because the
JavaScript check (option.ordeable === 'true') never matched them. As a
result, orderable behavior was silently disabled for those two settings.

Changes:
- front/js/settings_utils.js: renamed option.ordeable → option.orderable
  and isOrdeable → isOrderable (6 occurrences, lines 792/823/824/880/1079/
  1192/1228). The JS key check is the authoritative definition of the
  elementOptions property name, so this must change atomically with all
  config files.

- server/initialise.py:245: renamed "ordeable" → "orderable" in the
  hardcoded JSON string for LOADED_PLUGINS setting. This string is the
  source-of-truth for that setting's elementOptions and is not auto-
  generated from the plugin config files.

- front/plugins/*/config.json (33 files, 90 occurrences): renamed all
  "ordeable": "true" entries to "orderable": "true" via sed. All plugins
  used the typo consistently; they must be updated in the same commit to
  avoid a broken intermediate state.

The two formerly broken 'orderable' entries in ui_settings/config.json
are now matched by the corrected JS check and work as intended.

Fixes netalertx/NetAlertX#1584

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 18:28:48 +00:00
..
2026-02-11 01:55:02 +00:00

Overview

A plugin allowing for executing regular internet speed tests.

Usage

This plugin supports two engines:

  1. Baseline Engine: Uses the Python speedtest-cli library (default).
  2. Native Engine (Optimized): Uses the official native Ookla Speedtest binary.

Native Speedtest Path

The plugin looks for the Speedtest binary at /usr/bin/speedtest by default. If the binary is located elsewhere, you can configure the path using the NATIVE_SPEEDTEST_PATH environment variable:

Example:

NATIVE_SPEEDTEST_PATH=/custom/path/to/speedtest

If this variable is left unset, the plugin assumes /usr/bin/speedtest.

Opt-in for Native Engine

To use the native engine, you must provide the official binary to the container. The native binary is strongly recommended for internet connections > 100 Mbps to ensure CPU bottlenecks don't affect your results.

Setup Instructions:

  1. Download: Get the official binary for your architecture from the Speedtest CLI Homepage.
  2. Place & Prepare: Place the binary on your host machine (e.g., in /opt/netalertx/) and ensure it has executable permissions:
   chmod +x /opt/netalertx/speedtest
  1. Docker Mapping: Map the host file to exactly /usr/bin/speedtest inside the container via your docker-compose.yml:
services:
  netalertx:
    volumes:
      - /opt/netalertx/speedtest:/usr/bin/speedtest:ro

Why this mapping?

Inside the container, a Python version of speedtest often exists in the virtual environment (/opt/venv/bin/speedtest). Mapping your native binary specifically to /usr/bin/speedtest allows the plugin to prioritize the high-performance native engine over the baseline library.

Data Mapping

  • watchedValue1 — Download Speed (Mbps).
  • watchedValue2 — Upload Speed (Mbps).
  • watchedValue3 — Full JSON payload (useful for n8n or detailed webhooks).

Notes

  • The native binary is recommended for connections > 100 Mbps.
  • If the native binary is not detected at /usr/bin/speedtest, or if it fails to execute, the plugin will seamlessly fall back to the baseline Python library.