The following link should get you started.
Speedtest-cli Internet Up-/Downlink Measurement Integration - Tutorials & Examples - openHAB Community