feat: implement hybrid native/python speedtest engine

- Introduce native Ookla Speedtest binary support for Gigabit connections

- Add intelligent engine detection with automatic fallback to python-cli version

- Map full JSON payload to Watched_Value3 for n8n integration

- Add Spanish (es_es) localizations and update README instructions
This commit is contained in:
Amir
2025-12-29 12:02:36 -03:00
parent ffdde451d6
commit 3b1b853b14
5 changed files with 140 additions and 18 deletions

View File

@@ -1,11 +1,33 @@
## Overview
A simple plugin allowing for executing regular internet speed tests.
A plugin allowing for executing regular internet speed tests.
### Usage
- N/A
This plugin supports two engines:
1. **Baseline Engine**: Uses the Python `speedtest-cli` library (default).
2. **Native Engine (Optimized)**: Uses the native Ookla Speedtest binary.
#### Opt-in for Native Engine
To use the native engine:
- Provide the native `speedtest` binary in your environment: [Speedtest CLI Homepage](https://www.speedtest.net/apps/cli)
- Map the binary to `/usr/bin/speedtest` in the container.
- **Ensure the native speedtest binary is installed on the host at the source path.**
```yaml
volumes:
- /usr/bin/speedtest:/usr/bin/speedtest:ro
```
- The plugin will automatically detect and use it for subsequent tests.
### Data Mapping
- **Watched_Value1** — Download Speed (Mbps).
- **Watched_Value2** — Upload Speed (Mbps).
- **Watched_Value3** — Full JSON payload (useful for n8n or detailed webhooks).
### Notes
- N/A
- The native binary is recommended for connections > 100 Mbps.
- If the native binary is not detected, the plugin seamlessly falls back to the baseline library.