Build and fire up the container stack with docker-compose up --build -d.
Configuration can be done through environment variables in docker-compose.yml:
MQTT_HOST- mqtt server, defaults tolocalhostMQTT_ID- id to use for connecting to mqtt server, defaults tospeedtestMQTT_TOPIC- topic to push data to, defaults tospeedtest/statusMQTT_OPTIONS- additional mqtt options, defaults to-V mqttv311MQTT_USER- user for mqtt serverMQTT_PASS- password for mqtt serverSPEEDTEST_OPTIONS- additional options forspeedtest-rsSPEEDTEST_INTERVAL- interval in which to run speedtest, in seconds, defaults to 60
Configuration of sensors in Home Assistant:
sensor:
- platform: mqtt
state_topic: speedtest/status
unit_of_measurement: ms
icon: mdi:speedometer
name: Speedtest Ping
value_template: "{{ value_json.ping }}"
- platform: mqtt
state_topic: speedtest/status
unit_of_measurement: Mbit/s
icon: mdi:speedometer
name: Speedtest Download
value_template: "{{ value_json.download }}"
- platform: mqtt
state_topic: speedtest/status
unit_of_measurement: Mbit/s
icon: mdi:speedometer
name: Speedtest Upload
value_template: "{{ value_json.upload }}"