# \[OH3\] New Binding - Speedtest

**URL:** <https://community.openhab.org/t/oh3-new-binding-speedtest/114242>\
**Category:** Bindings\
**Tags:** binding\
**Created:** [January 15, 2021, 2:01pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242 "2021-01-15T14:01:38Z")\
**Posts on this page:** 20\
**Page:** 7

<div class="post-metadata">

**Author:** ![rpwong](https://community.openhab.org/user_avatar/community.openhab.org/rpwong/32/36036_2.png) [@rpwong](https://community.openhab.org/u/rpwong)\
**Post date:** [December 24, 2021, 12:24am UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/122 "2021-12-24T00:24:22Z")

</div>

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.

> **[openhab-addons/bundles/org.openhab.binding.speedtest at speedtest ·...](https://github.com/bigbasec/openhab-addons/tree/speedtest/bundles/org.openhab.binding.speedtest)**
>
> Add-ons for openHAB. Contribute to bigbasec/openhab-addons development by creating an account on GitHub.

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.

---

<div class="post-metadata">

**Author:** ![adm105](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adm105](https://community.openhab.org/u/adm105)\
**Post date:** [December 24, 2021, 12:33am UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/123 "2021-12-24T00:33:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![adm105](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adm105](https://community.openhab.org/u/adm105)\
**Post date:** [January 6, 2022, 11:42pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/124 "2022-01-06T23:42:44Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![michaeljoos](https://community.openhab.org/user_avatar/community.openhab.org/michaeljoos/32/108036_2.png) [@michaeljoos](https://community.openhab.org/u/michaeljoos)\
**Post date:** [January 7, 2022, 5:14am UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/125 "2022-01-07T05:14:40Z")

</div>

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

- Copy “org.openhab.binding.speedtest-3.1.0-SNAPSHOT.jar” to addon folder
- Download “[https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-armhf-linux.tgz](https://install.speedtest.net/app/cli/ookla-speedtest-1.0.0-armhf-linux.tgz)”
- Extract files (e.g. tar xvfz ookla-speedtest-1.0.0-armhf-linux.tgz)
- Copy file “speedtest” to /usr/bin
- **Start speedtest once in command line to accept license**

```auto
cd /usr/bin
speedtest

```

- Create Thing from Speedtest Binding

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

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b01dcd16ec4c84a74e8b800a266bb1855f186d08.png)

---

<div class="post-metadata">

**Author:** ![RicardoSJ](https://community.openhab.org/letter_avatar_proxy/v4/letter/r/c68b51/32.png) [@RicardoSJ](https://community.openhab.org/u/RicardoSJ)\
**Post date:** [January 7, 2022, 7:01pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/126 "2022-01-07T19:01:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![adm105](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adm105](https://community.openhab.org/u/adm105)\
**Post date:** [January 8, 2022, 3:20am UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/127 "2022-01-08T03:20:14Z")

</div>

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)

 ![screenshot_5](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/1/e/1e695c5b2d496889086360a306e3f4c7b6572ae6.png)

---

<div class="post-metadata">

**Author:** ![foruny](https://community.openhab.org/letter_avatar_proxy/v4/letter/f/7993a0/32.png) [@foruny](https://community.openhab.org/u/foruny)\
**Post date:** [January 9, 2022, 10:02am UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/128 "2022-01-09T10:02:01Z")

</div>

Thank you. This solution worked for me too.

---

<div class="post-metadata">

**Author:** ![Alexollon](https://community.openhab.org/user_avatar/community.openhab.org/alexollon/32/85562_2.png) [@Alexollon](https://community.openhab.org/u/Alexollon)\
**Post date:** [January 22, 2022, 4:54pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/129 "2022-01-22T16:54:45Z")

</div>

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:

```javascript
    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"

    when

        //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

    then

        logInfo(ruleId, "--> Execute a speedtest...")
        logInfo(ruleId, "--> Download speed= " + Speedtest_DownloadBandwidth.State.toString)
        // WHAT is the COMMAND TO TRIGGER A SPEEDTEST
        sendcommand(Speedtest_Trigger,ON)
    end

```

But the send command does not work.

And why does

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

```

not work?

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

```

yields the following output in the log:

```javascript
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:

 ![image](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/4/e/4e52f73d504d5eb064ce634593f13266acc25f78.png)

---

<div class="post-metadata">

**Author:** ![tommycw10](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/4491bb/32.png) [@tommycw10](https://community.openhab.org/u/tommycw10)\
**Post date:** [January 25, 2022, 6:00pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/130 "2022-01-25T18:00:21Z")

</div>

> [@Alexollon](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![tommycw10](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/4491bb/32.png) [@tommycw10](https://community.openhab.org/u/tommycw10)\
**Post date:** [January 25, 2022, 6:04pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/131 "2022-01-25T18:04:31Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Alexollon](https://community.openhab.org/user_avatar/community.openhab.org/alexollon/32/85562_2.png) [@Alexollon](https://community.openhab.org/u/Alexollon)\
**Post date:** [January 25, 2022, 8:35pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/132 "2022-01-25T20:35:18Z")

</div>

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;)

br  
a

---

<div class="post-metadata">

**Author:** ![tommycw10](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/4491bb/32.png) [@tommycw10](https://community.openhab.org/u/tommycw10)\
**Post date:** [January 25, 2022, 8:45pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/133 "2022-01-25T20:45:33Z")

</div>

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.

```auto
rule "Speedtest last run"
	when
		Item downlinkRate received update
	then
		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))
	end

```

---

<div class="post-metadata">

**Author:** ![Alexollon](https://community.openhab.org/user_avatar/community.openhab.org/alexollon/32/85562_2.png) [@Alexollon](https://community.openhab.org/u/Alexollon)\
**Post date:** [January 25, 2022, 9:44pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/134 "2022-01-25T21:44:32Z")

</div>

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

BR  
a

---

<div class="post-metadata">

**Author:** ![adm105](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adm105](https://community.openhab.org/u/adm105)\
**Post date:** [April 4, 2022, 12:29am UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/135 "2022-04-04T00:29:28Z")

</div>

@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!

---

<div class="post-metadata">

**Author:** ![Taurus](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/dbc845/32.png) [@Taurus](https://community.openhab.org/u/Taurus)\
**Post date:** [July 7, 2022, 4:29pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/136 "2022-07-07T16:29:35Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![adm105](https://community.openhab.org/letter_avatar_proxy/v4/letter/a/ba8739/32.png) [@adm105](https://community.openhab.org/u/adm105)\
**Post date:** [August 10, 2022, 1:14am UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/137 "2022-08-10T01:14:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MikeTheTux](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@MikeTheTux](https://community.openhab.org/u/MikeTheTux)\
**Post date:** [October 7, 2022, 6:13am UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/138 "2022-10-07T06:13:08Z")

</div>

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![MikeTheTux](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@MikeTheTux](https://community.openhab.org/u/MikeTheTux)\
**Post date:** [October 9, 2022, 2:04pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/139 "2022-10-09T14:04:39Z")

</div>

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

old:  
`/openhab/conf/scripts/speedtest/speedtest -f json --accept-license`

new:  
`/openhab/conf/scripts/speedtest/speedtest -f json --accept-license --accept-gdpr`

> **[Dropbox](https://www.dropbox.com/s/71498nuk8bsq2wl/org.openhab.binding.speedtest-3.1.0-snapshot.jar.zip?dl=0)**

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

---

<div class="post-metadata">

**Author:** ![MikeTheTux](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@MikeTheTux](https://community.openhab.org/u/MikeTheTux)\
**Post date:** [October 13, 2022, 6:04pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/141 "2022-10-13T18:04:53Z")

</div>

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

> [@Ookla's Speedtest Binding \[3.2.0;3.9.0)](https://community.openhab.org/t/ooklas-speedtest-binding/139924):
>
> Speedtest Binding The Speedtest Binding can be used to perform a network speed test for your openHAB instance. It is based on the command line interface (CLI) version of Ookla’s Speedtest ([Speedtest CLI: Internet speed test for the command line](https://www.speedtest.net/apps/cli)). The Ookla CLI Speedtest application MUST be installed on your openHAB instance when using the Speedtest Binding. Why Ookla’s Speedtest? Fully supported and maintained by Ookla with the latest Speedtest technology for best results: Co…

---

<div class="post-metadata">

**Author:** ![rpwong](https://community.openhab.org/user_avatar/community.openhab.org/rpwong/32/36036_2.png) [@rpwong](https://community.openhab.org/u/rpwong)\
**Post date:** [October 13, 2022, 6:11pm UTC](https://community.openhab.org/t/oh3-new-binding-speedtest/114242/142 "2022-10-13T18:11:14Z")

</div>

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.

[Previous page](https://community.openhab.org/t/oh3-new-binding-speedtest/114242.md?page=6)

[Next page](https://community.openhab.org/t/oh3-new-binding-speedtest/114242.md?page=8)
