[OH3] New Binding - Speedtest

The binding uploaded to market place received some additional improvements and incompatible changes:

  • rebased to openHAB 3.4.0 Snaphot
  • channel names in lowerCamelCase
  • introduced UOM
  • improved Docu

When I try to install speedtest, as per Ookla’s instructions for Debian (rpi 4), I get errors:

openhabian@openhabian:~ $ sudo apt-get install speedtest
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package speedtest

The previous steps were all successful.

Please advise. Thx!

Solved!
I downloaded the Linux armhf binary from the bottom of the Ookla instructions page, ran speedtest once to accept the T&Cs, stop/started the speedtest binding and it’s now Online!

I am getting the same result

The repository is setup! You can now install packages.
openhabian@openhabian:~ $ sudo apt-get install speedtest
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package speedtest

Speedtest Binding is not working for me. The Thing stays UNKNOWN.
Please help

did you run sudo apt update before running sudo apt-get install speedtest
according to the error message the package was not found. Reason for this might be that the package indexes were not updated locally.

openhabian@openhabian:~ $ sudo apt update
Get:1 http://davesteele.github.io/comitup/repo comitup InRelease [4,659 B]
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org/debian bullseye InRelease [23.6 kB]
Hit:4 https://deb.nodesource.com/node_14.x bullseye InRelease
Hit:5 https://repos.influxdata.com/debian bullseye InRelease
Ign:6 https://packagecloud.io/ookla/speedtest-cli/raspbian bullseye InRelease
Hit:7 https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable InRelease
Err:8 https://packagecloud.io/ookla/speedtest-cli/raspbian bullseye Release
  404  Not Found [IP: 2600:1f1c:2e5:6900:b931:927:7098:932c 443]
Get:9 http://archive.raspberrypi.org/debian bullseye/main armhf Packages [308 kB]
Reading package lists... Done
E: The repository 'https://packagecloud.io/ookla/speedtest-cli/raspbian bullseye Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
openhabian@openhabian:~ $ curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | sudo bash
Detected operating system as raspbian/bullseye.
Checking for curl...
Detected curl...
Checking for gpg...
Detected gpg...
Detected apt version as 2.2.4
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/ookla_speedtest-cli.list...done.
Importing packagecloud gpg key... Packagecloud gpg key imported to /etc/apt/keyrings/ookla_speedtest-cli-archive-keyring.gpg
done.
Running apt-get update... done.

The repository is setup! You can now install packages.
openhabian@openhabian:~ $ sudo apt-get install speedtest
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package speedtest
openhabian@openhabian:~ $

I am having this problem as well

Just did a test on a Debian Bullseye VM - not a Pi and it worked.

Folder /var/lib/apt/lists/ should contain two files. Their names start with packagecloud.io_ookla_speedtest-cli_debian_dists_bullseye_* .

One of the files is called packagecloud.io_ookla_speedtest-cli_debian_dists_bullseye_main_binary-amd64_Packages on the VM - the Pi version has a different name.
That file contains the information about where to find the speedtest package on the remote server:
pool/bullseye/main/s/speedtest/speedtest_1.2.0.84-1.ea6b6773cf_amd64.deb

Is this information available in your case, too ( will look slightly different for a Pi ) ?

I have nearly the same setup. DS918+, docker. But openHAB 3.3 and it is unable to find the speedtest executable.

I am running the binding installed through the market place.

Trying this I end up in an error command not found
image

I was able to run the speedtest using a SSH session.

  • Speedtest is placed in /usr/bin/speedtest - or do I need a folder /usr/bin/speedtest where I place the speedtest file into?
  • access rights are pretty “forgiving”
  • execPath from the binding is empty execPath: ""

image

How can docker access those folders? Do I need to mount something?

Also I am not 100% sure which user is used to startup my OH container. I accepted the licence aggreement now with user admin, openhab and docker.

Hello,

since speedtest version 3.4 I install under openhab 3.3 as follows:

Copy org.openhab.binding.speedtest-3.4.0-SNAPSHOT.jar to openhab/addons
Copy the Speedtest program to /usr/bin

Adding to Docker Compose:

version: '2.2'

services:
  openhab3:
    image: "openhab/openhab:3.3.0"
    container_name: openhab3
    restart: always
    network_mode: host

    volumes:
      - "/volume1/docker/localtime:/etc/localtime:ro"
      - "/etc/TZ:/etc/timezone:ro"
      - "/volume1/docker/openhab/addons:/openhab/addons"
      - "/volume1/docker/openhab/conf:/openhab/conf"
      - "/volume1/docker/openhab/userdata:/openhab/userdata"
      - "/volume1/docker/openhab/speedtest:/usr/bin/speedtest" // <- <- <- <- <- <- Add this entry to the file

    environment:
      OPENHAB_HTTP_PORT: "xxxxx"
      OPENHAB_HTTPS_PORT: "yyyyy"
      CRYPTO_POLICY: "unlimited"
      EXTRA_JAVA_OPTS: "-Xms1024m -Xmx2048m -Duser.timezone=${TZ}"
      USER_ID: "9001"
      GROUP_ID: "9001"
      LC_ALL: "de_DE.UTF-8"
      LANG: "de_DE.UTF-8"
      LANGUAGE: "de_DE.UTF-8"

  frontail-openhab:
    container_name: "frontail-openhab"
    restart: unless-stopped
    image: "welteki/frontail-openhab"
    ports:
      - "9001:9001"
    volumes:
      - "/volume1/docker/openhab/userdata/logs:/openhab/userdata/logs:ro"

After that everything should work again.

root@DS918:/usr/bin# ll -s speedtest
2560 -rwx------ 1 root root 2613400 Nov  6 04:24 speedtest
root@DS918:/usr/bin# 
1 Like

Works like a charm. I was unable to see any effect placing the speedtest jar in openhab/addons. The thing was missing it’s handler.

So I reinstalled the Ookla speedtest binding through Marketplace again and added the mounting of the speedtest file as described by you using the standard Docker GUI.

This solved my issue:
/volume1/docker/openhab/speedtest:/usr/bin/speedtest

In case a message appears the next time you restart the container, I recommend moving the “speedtest” file to /volume1/docker/openhab/.

Sorry, I have same issue of @DivineJimmi and there not two files indicated by @Wolfgang_S , how I can to install speedtest on RPI Raspbian GNU/Linux 11 (bullseye)?

Download application from its site:
https://install.speedtest.net/app/cli/ookla-speedtest-1.2.0-linux-armhf.tgz
and copy extracted binary executable file in: /usr/bin/speedtest

1 Like

Following those instructions I was able to install it:

https://pimylifeup.com/raspberry-pi-internet-speed-monitor/

sudo apt install speedtest

:+1: