[OH3] New Binding - Speedtest

I’m not having any trouble with it. The latest version of the binding is here:

I think it’s the one you’re using, but the filename you stated is slightly different. Saying that, if it worked for awhile and then stopped working, I’m doubtful that the binding is the problem. I have mine set to refresh every six hours.

You keep saying “the binding goes offline”, but I assume you mean “the thing goes offline”, since bindings don’t have states. You could try making another thing, as there shouldn’t be anything preventing you from having two of them for Speedtest. I’m curious if you get the same behaviour.

It’s right, the thing keeps going offline. I implemented your proposal, unfortunately with the same behavior.
Oh3 runs in Docker for me, so I can only work with the .jar file. I also checked the rights and made the speed test executable.
I’m still missing some more ideas …screenshot_3

I tried a little and found that the binding version 0.2 remains online, but does not output any values (NULL). In my opinion, it has to be the bond. Is it possible to create an update for openhab in Docker?

I found a solution for myself by extracting the files org.openhab.binding.speedtest-3.1.0-SNAPSHOT.jar and Speedtest from a data backup from 08/20/2021. The installation is then carried out again as described above.
However, I am unable to say exactly where the fault was to be found.
However, I still have one question: can the binding org.openhab.binding.speedtest-3.1.0-SNAPSHOT.jar also be downloaded for openhab 3.2?

Mine is also not working, did someone find a solution for?

2021-12-04 10:47:25.859 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.speedtest-3.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.speedtest [43]

Hello Community,

I am using the org.openhab.binding.speedtest-3.1.0-SNAPSHOT.jar v0.5 binding, which worked well under Openhap 3.1. However, since the installation of OH 3.2 it no longer works, it is constantly offline. Are there any indications as to whether something needs to be changed in the binding? Perhaps, as a user, you can make changes yourself if you get help.

Thanks in advance.

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)

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!