Speedtest-cli Internet Up-/Downlink Measurement Integration

Does anyone have a working OH3 rule version - perhaps the original post could be updated, thanks

You should have a look at the Ookla impementation of the speedtest. The speedtest-cli was build with very old libraries and is more than outdated.

Great, just found your speedtest how to so ill progress that way, thank you!

Here’s the fix for OH 3 on this script to avoid → The constructor Float(String) is deprecated.

			        var String[] results = speedtestCliOutput.split("\\r?\\n")
			        // var float ping = new java.lang.Float(results.get(0).split(" ").get(1))
			        // var float down = new java.lang.Float(results.get(1).split(" ").get(1))
			        // var float up   = new java.lang.Float(results.get(2).split(" ").get(1))
					
			        var float ping = Float.valueOf(results.get(0).split(" ").get(1))
			        var float down = Float.valueOf(results.get(1).split(" ").get(1))
			        var float up   = Float.valueOf(results.get(2).split(" ").get(1))

Best, Jay