An experiment to publish speedtest results to MQTT.
docker run -d --name="speedtest2mqtt" -v /etc/localtime:/etc/localtime:ro mannkind/speedtest2mqtt
Please note: you have have mosquitto_pub
, jq
, and speedtest-cli
available.
git clone https://github.com/mannkind/speedtest2mqtt
cd speedtest2mqtt
./speedtest2mqtt
Configuration happens via environmental variables
SPEEDTEST_SERVER - [OPTIONAL] The speedtest server to use, defaults to ""
SPEEDTEST_LOOKUPINTERVAL - [OPTIONAL] The interval in seconds to speedtest, defaults to "21600" (6 hours)
MQTT_TOPICPREFIX - [OPTIONAL] The MQTT topic on which to publish the collection lookup results, defaults to "home/speedtest"
MQTT_DISCOVERY - [OPTIONAL] The MQTT discovery flag for Home Assistant, defaults to false
MQTT_DISCOVERYPREFIX - [OPTIONAL] The MQTT discovery prefix for Home Assistant, defaults to "homeassistant"
MQTT_DISCOVERYNAME - [OPTIONAL] The MQTT discovery name for Home Assistant, defaults to "speedtest"
MQTT_CLIENTID - [OPTIONAL] The clientId, defaults to "DefaultSpeetest2MqttClientID"
MQTT_BROKER - [OPTIONAL] The MQTT broker, defaults to "test.mosquitto.org"
MQTT_USERNAME - [OPTIONAL] The MQTT username, default to ""
MQTT_PASSWORD - [OPTIONAL] The MQTT password, default to ""