Speedtest-cli Internet Up-/Downlink Measurement Integration

How do I check what mine should be ?

Try to execute the following in the command line:
/usr/local/bin/speedtest-cli --simple

if it’s not working you could try to find the script with locate:
locate speedtest-cli

If the script is located somewhere else, modify the rule to execute the script with the right path

Thank you. found it. just need to get the following sorted.
Think it is permission issue ? I am still learning linx and its commands

2019-07-17 14:11:52.293 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "/usr/share/doc/speedtest-cli" (in directory "."): error=13, Permission denied)

Normally following command should fix that:
sudo chmod +x /usr/share/doc/speedtest-cli

maybe you also have to change the owner of the script to the openhab user with:
sudo chown openhab:openhab /usr/share/doc/speedtest-cli

did run both of the commands .
and tested it. I still come up with the following error

2019-07-17 14:15:59.067 [ERROR] [arthome.model.script.speedtest.rules] - --> speedtest failed. Output:
2019-07-17 14:15:59.071 [vent.ItemStateChangedEvent] - SpeedtestRunning changed from data analysis... to Error during execution
2019-07-17 14:30:13.500 [vent.ItemStateChangedEvent] - SpeedtestRunning changed from Error during execution to Measurement in progress...
2019-07-17 14:30:13.562 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "/usr/share/doc/speedtest-cli" (in directory "."): error=13, Permission denied)
2019-07-17 14:30:13.577 [ERROR] [arthome.model.script.speedtest.rules] - --> speedtest failed. Output:
2019-07-17 14:30:13.590 [vent.ItemStateChangedEvent] - SpeedtestRunning changed from data analysis... to Error during execution```

Whats the output of:
ls -l /usr/share/doc/speedtest-cli

And whats the output of:
/usr/share/doc/speedtest-cli --simple

total 16
-rw-r--r-- 1 root root  686 Feb 12  2018 changelog.Debian.gz
-rw-r--r-- 1 root root 1671 Feb  6  2018 CONTRIBUTING.md
-rw-r--r-- 1 root root 2173 Feb 12  2018 copyright
-rw-r--r-- 1 root root 1777 Feb  6  2018 README.rst.gz
bash: /usr/share/doc/speedtest-cli: Is a directory

But what is weird is this

openhab@openhab:~$ speedtest-cli --simple
Ping: 35.715 ms
Download: 4.27 Mbit/s
Upload: 2.37 Mbit/s

Got mine sorted. :scream: :partying_face: :exploding_head:

I made a very bad mistake . I am working with Team viewer from a remote location. and missed some information on the locations . and fixed it.
picked it up when I sat back and had a deep breath . now its functional

That’s worth a separate announcement thread unto itself.


Im seeing a high internet usage to speedtest related sites running twice a day - is there a way to tone down the test size? windering if this is the 120*1000 in the script?

The 120*1000 is the time-out, not the size of the test size (120 seconds * 1000 milliseconds). AFAIK the test size is automatically determined based on how fast the connection is (faster connection higher payload, slower connection lower payload)

I too had this. Found that if I only run it once a day the usage is halved :blush:

I all seriousness, run it cli to see options but as said, I think its automatic.

can’t install the Speedtest, getting this error:

[12:06:13] openhabian@openhab:~$ sudo apt-get install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-setuptools is already the newest version (40.8.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[12:06:25] openhabian@openhab:~$ sudo easy_install speedtest-cli
sudo: easy_install: command not found

Any advice?

why don’t you try:

sudo apt-get install speedtest-cli ?

1 Like

Thanks, wasn’t in my mind…

And did it work?

Yes, perfectly

1 Like

just figured out that the path is wrong if i installed speedtest with apt-get, can somebody tell me whats the right path for the rule

2019-08-18 22:00:00.050 [INFO ] [arthome.model.script.speedtest.rules] - --> speedtest executed...

2019-08-18 22:00:00.128 [WARN ] [lipse.smarthome.io.net.exec.ExecUtil] - Execution failed (Exit value: -559038737. Caused by java.io.IOException: Cannot run program "/usr/local/bin/speedtest-cli" (in directory "."): error=2, No such file or directory)

2019-08-18 22:00:00.166 [ERROR] [arthome.model.script.speedtest.rules] - --> speedtest failed. Output:

If i do sudo speedtest-cli its works in the command interface

[sudo] password for openhabian:
Retrieving speedtest.net configuration...
Testing from O2 Deutschland (
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by SysEleven GmbH (Berlin) [2.81 km]: 8.717 ms
Testing download speed................................................................................
Download: 94.17 Mbit/s
Testing upload speed......................................................................................................
Upload: 3.80 Mbit/s

On Debian10 Buster this worked for me:

sudo apt-get install python3-pip
sudo pip3 install speedtest-cli

I use speed test like this

1 Like