[OH3] New Binding - Speedtest

If you’ve got the coding skills, you could look at the binding on Github. Perhaps there’s a dependency that needs to be updated.

Otherwise, we’ll have to wait for @bhomeyer to update it and perhaps upload it to the Marketplace. They haven’t visited the community since August, so I hope they’re alright given the ongoing pandemic.

Another alternative would be to use the speedtest built into the Network Binding.

You’re right about @bhomeyer. We all hope he’s fine.
My programming skills are rather poor. It may be enough for snippets of code.
Since I would like to continue using this binding, I am waiting for an update.

1 Like

I would like to ask everyone: Are there OH3 users who have version 3.2 with the binding org.openhab.binding.speedtest-3.1.0-SNAPSHOT.jar v0.5 running successfully and if so, what changes have been made made them?

Yes. I’m on 3.2 and speedtest is working fine for me on openhabian system (Raspi4). Here are the steps I have done:

cd /usr/bin
  • Create Thing from Speedtest Binding

No extra settings needed → /usr/bin/speedtest is default path with executable

1 Like

Mine was working fine for ages as well. I’m using X64-based system so @michaeljoos option will not work as this is for ARM. However, after a lot of uninstalling everything and trying again, I was still getting the “Not returning valid results” until I tried @RGroll 's option of running sudo -u openhab /usr/bin/speedtest which asks you to accept the license agreement. Did this, and now it is all working again! If this doesn;t work for you, try removing and re-adding the Ookla repo and speedtest version, then try the above.

Ookla speed test finally works under OH3.2! I run openhab in Docker, so I had to go this way:

1.) Copy “org.openhab.binding.speedtest-3.1.0-SNAPSHOT.jar” into the add-on folder

2.) Download the file “ookla-speedtest-1.1.1-linux-x86_64.tgz”, extract it and copy “speedtest” to /usr/ bin

3.) Under Docker → Container → Openhab3 → Terminal start Speedtest once in the command line to accept the license (see screenshot)

1 Like

Thank you. This solution worked for me too.

Hi, I installed the binding org.openhab.binding.speedtest-3.1.0-SNAPSHOT.jar, it works fine. Can you pls help me and post a rule that triggers the test. Basically I dont know how to access the results. And I want to get the speedtest working with a rule. Running on Raspi4b with OH3.2.

I tried this:

    val String ruleId = "Speedtest"
    // Speedtest init placeholder
    val Number lDownloadSpeedThresholdSLA = 80 // If the speedtest shows a download speed below 80mbps then measure more often

    rule "Speedtest"


        //Time cron "0 0 5,13 * * ?" or
        Time cron "0 0/2 * * * ?" or //was set to 15min
        Item Speedtest_Trigger changed from OFF to ON or
        Item Speedtest_Trigger received command ON


        logInfo(ruleId, "--> Execute a speedtest...")
        logInfo(ruleId, "--> Download speed= " + Speedtest_DownloadBandwidth.State.toString)

But the send command does not work.

And why does

        logInfo(ruleId, "--> Download speed= " + Speedtest_DownloadBandwidth.State.toString)

not work?

        logInfo(ruleId, "--> Download speed= " + Speedtest_DownloadBandwidth.toString)

yields the following output in the log:

2022-01-22 17:48:00.420 [INFO ] [.openhab.core.model.script.Speedtest] - --> Download speed= Speedtest_DownloadBandwidth (Type=NumberItem, State=92.326, Label=Download Bandwidth, Category=, Tags=[Point], Groups=[Speedtest])

My item looks like this:

You don’t need a rule to trigger a test.

First, I see you are trying to trigger your rule on a regular time basis. The binding already does this on its own. Go to Settings->Things->Speedtest Binding->Configuration->Refresh Rate and select how often you want it to run.

Second, I see you also have an item called “Speedtest_Trigger” to manually trigger tests. If you do want to run it manually, there is a channel under the Speedtest Binding item called “Test Trigger” that you can connect to your Speedtest_Trigger item (needs to be a switch type). Turning that switch on or off will manually trigger a test to run. No rules needed.

Just came here to say thank you to @bhomeyer for making this binding. I tried the old speedtest binding back in OH2 and it broke many many times. Then when I moved to OH3 I tried using the network binding speedtest and it has no documentation on how to configure it to make it work, but seemingly doesn’t work for me. This binding simply dropped in, downloaded and installed speedtest, connected my already existing items from previous tried and it just worked out of the box. No fuss. Quickly reading through this thread it appears that nearly all of the people who have issues didn’t understand how to set the exec permissions correctly for the speedtest binary.

@bhomeyer - is this eventually going to become a released binding rather than having to manually install? Thanks for putting this together!

Thx Tom for your feedback. It does not help tough as I need a rule to do more stuff than just triggering a speedtest measurement. The item “Speedtest_Trigger” is part of the binding. With this you can manually trigger a rule.

I will use a rule to trigger extra measurements when a certain speed threshold is not met, trigger other actions/calculations/monitoring actions. Basically I want to work on a more elaborate “measurement” tool to identify issues in my home network or at the network provider side… just that you get more insights why I am seaching for a possibility to trigger a rule based on when a measurement actually has happened. BTW, I tried also the trigger “item Speedtest_DownloadBandwidth changed” which fired the rule but unfortunately endlessly every 0.1 of a second…not what I want as you can imagine;)


Hi @Alexollon

Yes, I do things after speedtests are run too. In my example below, I trigger on the download rate being updated, I then create a datetime item to timestamp when the test was run, and I calculate the 7 day averages.

rule "Speedtest last run"
		Item downlinkRate received update
		postUpdate(speedTestLastCompleted, new DateTimeType())	//sets new date/time stamp
		postUpdate(downlinkRate7DAve, downlinkRate.averageSince(now.minusDays(7), "influxdb")as Number)
		postUpdate(uplinkRate7DAve, (uplinkRate.averageSince(now.minusDays(7), "influxdb")as Number))

Thx Tom, that worked - “received update” is the key!


1 Like

@tommycw10, reading through your post #129, I get the impression that you read this thread very quickly and superficially. @bhomeyer was last here in August last year and we are very concerned!

I get an “CONFIGURATION_ERROR” after the bundle was running for a few weeks with no problems. The speedtest is located in usr/bin

-rwxr-xr-x 1 root root 2219064 Jul 7 18:23 speedtest

As far as I know the permissions should be finde. I can even find nearby Servers in the Thing in the configuration.

Anybody any idea?

There can be various reasons for this. Your information is a bit flimsy. Did you update openhab? Which Speedtest version are you using?
I have provided instructions above. There you can read about the installation again.
My Speedtest now runs under Openhab 3.3 in Docker.

I need to start ./speedtest manually from time to time in order to accept the license terms:

Do you accept the license? [type YES to accept]: YES
License acceptance recorded. Continuing.

Be aware, that you need to use the right user, e.g. openhab and not your default user.

I compiled a new version of the binding which is now automatically accepting also GDBR in addition to the license terms only.

/openhab/conf/scripts/speedtest/speedtest -f json --accept-license

/openhab/conf/scripts/speedtest/speedtest -f json --accept-license --accept-gdpr

I hope that solves the repeatedly raised issues arround that reported CONFIGURATION_ERROR.

1 Like

The latest version of this Binding is now also available on MarketPlace:

1 Like

I don’t have your GDBR issue using OH3.3 and the 3.1 snapshot. I wonder if it’s due to something changing in Speedtest, which I haven’t updated in awhile.

Whatever the case, thanks for picking this up and adding it to the Marketplace. It doesn’t look like bhomeyer will be back, so I hope they’re alright and have just decided to move on from OH.