Problem Speedtest

I installed the speed test sensor component correctly but keep getting “unknown” as values for Ping, Download and Upload speeds.

What I did was the following.

I have installed speedtest-click 0.3.4 on my Raspberry which runs the latest HASS 0.13.0 update.
From the command line I did a “speedtest-cli --simple” to confirm it working.

Results:

pi@HASS-1:~ $ speedtest-cli --simple
Ping: 25.441 ms
Download: 94.87 Mbit/s
Upload: 7.05 Mbit/s

After I updated my configuration.yaml with the following entries

sensor:
  platform: speedtest
  minute:
    - 0
    - 15
    - 30
    - 45
  monitored_conditions:
    - ping
    - download
    - upload

After saving and rebooting (I feel it’s better then simply restarting) HASS I get as results

Speedtest Ping                 Unknown Ms
Speedtest Download       Unknown Mbit/S
Speedtest Upload            Unknown Mbit/S

[attachment=0]hass-speedtest.jpg[/attachment]

No matter how many changes, clean installs, bootstrapped configuration.yaml I throw at it Speed test is not showing results in HASS.

What am I missing if anything?

Do you have any other sensors in your configuration files? Then either group all sensors, or add a number to each sensor (sensor 1: sensor 2: etc).

sensor:
  - platform: speedtest
    minute:
      - 0
      - 15
      - 30
      - 45
    monitored_conditions:
      - ping
      - download
      - upload
  - platform: forecast
    api_key: <xyz>
    monitored_conditions:
      - precip_intensity
      - wind_speed
      - cloud_cover
    units: si

So I solved it myself.

I found that HASS was looking for speedtest_click.py in /var/opt/homeassistant/lib/ while this file is installed in /usr/local/lib/python3.4/dist-packages/

A cp /usr/local/lib/python3.4/dist-packages/speedtest_cli.py /var/opt/homeassistant/lib/ solved my issue.

Is the speedtest reliable?
The test done from the HASS speedtest interface on my RPI with ethernet connection is much less than I can get from my phone with wireless connection.
I’ve 60Mbit/s up and down speed on my line, speedtest on HASS shown around 8Mbit/s down and 6Mbit/s up speed.
If I run the test at speedtest webpage from my phone or tablet I get close to 60Mbit/s as my line is.

This is your hero

jeffgeerling.com/blogs/jeff- … networking

benchmarks on all the interfaces and found the following results:
[color=#0040BF]•Internal LAN (10/100): 94.4 Mbits/sec (11.8 MB/sec)
•USB 802.11n WiFi: 44.5 Mbits/sec (5.6 MB/sec)
•USB Gigabit LAN (10/100/1000): 222 Mbits/sec (27.8 MB/sec)[/color]

I did this and worked for me. Make sure you set the GPU memory to 16 (minimum.)

github.com/geerlingguy/raspberr … t-76218148

some more success stories

mikronauts.com/raspberry-pi/ … t-howto/3/

Thank you for your reply!
I will look more into it details.
As I can see from the first link that B+ version of RPI does have a lover ethernet speed than RPI 2, I’m using B+ so that might be the thing.
Mainly I don’t think there is any problem, then the speedtest is at the moment useless for me since my RPI does the limitation, it is just nice to log it since HASS had the feature.

It is strange that I’m also using a RPI B+ for media center running kodi, but I don’t have any problems with streaming 1080P movies with 5.1 sorround from my NAS over ehternet.

Yeah mine is the 2 so your on the money there.

1 Like

Mine states Unknown as well.

My log shows this however:

subprocess.CalledProcessError: Command '['/usr/bin/python3', '/usr/local/lib/python3.4/dist-packages/speedtest_cli-0.3.4-py3.4.egg/speedtest_cli.py', '--simple']' returned non-zero exit status 1

Any ideas?

Did you read this first?

Looks like you can solve it same way.

got the same issues but no folder /var/opt/homeassistant/lib/