Speedtest Integration No longer loading

Please go easy on me… I am a beginner!
Until today I had the official Speedtest integration working well, set to update every 20 minutes.

Logbook was not loading, so I cleared home-assistant_v2.db, then I noticed when restarting:

2021-04-08 00:13:41 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SpeedTest for speedtestdotnet
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/speedtestdotnet/__init__.py", line 75, in async_setup_entry
    await coordinator.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/speedtestdotnet/__init__.py", line 194, in async_setup
    self.api = await self.hass.async_add_executor_job(speedtest.Speedtest)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/speedtest.py", line 1091, in __init__
    self.get_config()
  File "/usr/local/lib/python3.8/site-packages/speedtest.py", line 1173, in get_config
    ignore_servers = list(
ValueError: invalid literal for int() with base 10: ''

If I attempt to click Options on Speedtest.net Integration, I get “Error. Config flow could not be loaded”

I am running Home Assistant OS 5.13, Core 2021.4.0, which I updated all these while trying to get Speedtest to work again. I also restored last daily snapshot, but still I see this error not able to load on core restart.

What was I doping before, I was trying to add a new broadlink RM4C mini, which was not working, I tried two ways, within the integration adding the IP, to be told it is not supported, and also by adding to configuration.yaml (which then gave not supported within the logs)… I have removed this from configuration.yaml currently, and there are no Broadlink errors with the existing / already working ones.

I am now completely lost on what to do to try to get Speedtest working again. Any ideas?

Full Core restart log

2021-04-08 00:49:11 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /homeassistant/restart request
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] udev.sh: executing... 
[00:49:18] INFO: Using udev information from host
[cont-init.d] udev.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2021-04-08 00:49:19 WARNING (MainThread) [homeassistant.loader] You are using a custom integration sonoff which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-08 00:49:19 WARNING (MainThread) [homeassistant.loader] You are using a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-08 00:49:19 WARNING (MainThread) [homeassistant.loader] You are using a custom integration alexa_media which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-08 00:49:20 WARNING (MainThread) [homeassistant.loader] You are using a custom integration average which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-08 00:49:21 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 819c3b83026a41504a1c6ed8913c3fbacbfe3ce2359d13437b7e6f2c7353e7bd from 192.168.1.59
2021-04-08 00:49:21 WARNING (MainThread) [homeassistant.components.webhook] Received message for unregistered webhook 819c3b83026a41504a1c6ed8913c3fbacbfe3ce2359d13437b7e6f2c7353e7bd from 192.168.1.59
2021-04-08 00:49:21 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/alexa/state_report.py", line 189, in async_send_add_or_update_message
    alexa_entity = ENTITY_ADAPTERS[domain](hass, config, hass.states.get(entity_id))
  File "/usr/src/homeassistant/homeassistant/components/alexa/entities.py", line 262, in __init__
    self.entity_conf = config.entity_config.get(entity.entity_id, {})
AttributeError: 'NoneType' object has no attribute 'entity_id'
2021-04-08 00:49:21 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/alexa/state_report.py", line 189, in async_send_add_or_update_message
    alexa_entity = ENTITY_ADAPTERS[domain](hass, config, hass.states.get(entity_id))
  File "/usr/src/homeassistant/homeassistant/components/alexa/entities.py", line 262, in __init__
    self.entity_conf = config.entity_config.get(entity.entity_id, {})
AttributeError: 'NoneType' object has no attribute 'entity_id'
2021-04-08 00:49:23 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SpeedTest2 for speedtestdotnet
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/speedtestdotnet/__init__.py", line 75, in async_setup_entry
    await coordinator.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/speedtestdotnet/__init__.py", line 194, in async_setup
    self.api = await self.hass.async_add_executor_job(speedtest.Speedtest)
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.8/site-packages/speedtest.py", line 1091, in __init__
    self.get_config()
  File "/usr/local/lib/python3.8/site-packages/speedtest.py", line 1173, in get_config
    ignore_servers = list(
ValueError: invalid literal for int() with base 10: ''
1 Like

This has been mentioned in the 2021.4 release notes topic. Likely to be a bug.

1 Like

Thanks, interesting. However I actually had this issue before updating to 2021.4 I wonder how it is possible.

I have the same issue right after updating to 2021.4.0

1 Like

I am having the same problem, also starting after the upgrade to 2021.4.0 (along with a trashed MariaDB but that’s another story). I deleted the speediest integration and attempted to re-add it from HACS, but I don’t see it listed anymore. Was it removed?

Terry

Its an issue with upstream component speedtest-cli. just coincidence it happened around the same time as HA version released

Some people on earlier version of HA having issues after a restart.

For reference, the upstream component repo ValueError: invalid literal for int() with base 10: ‘’ by ligrevx · Pull Request #769 · sivel/speedtest-cli (github.com)

2 Likes

It is official integration, not HACS, maybe why you can’t find.

I had this before upgrade and reinstall makes no difference.

1 Like

The upstream component has just been fixed and a PR to fix HA has just been submitted, should be in next ha update

Is there any way for us to ‘beta’ test that PR (I’d like to get my speediest sensors back)?

Thanks for the info on this.
Yeah looks like ookla is returning a null ignoreids in my case which caused the failure. I made the change as per the Pull Request mentioned above and the errors no longer occur (both core and hassio instances).
If interested in what I did for hassio, go into the console or ssh to hassos:
docker exec -it homeassistant /bin/bash
cd /usr/local/lib/python3.8/site-packages/
save a copy of speedtest.py just in case, then edit this file at line 1173
Mine looks like:

        ignore_servers = list(
            map(int, [server_no for server_no in server_config['ignoreids'].split(',') if server_no])
        )
           #map(int, server_config['ignoreids'].split(','))

exit out and restart HA.

3 Likes

Also speedtest integration not working for me also.

Yep, thanks. I’ve had it so long I had forgotten where it installed from… :-/

Terry

can confirm on 2021.4.1 Speedtest is still not working

Just updated to 2021.4.1 about an hour ago and my speedtest.net integration started working again. Configurable from the GUI.

1 Like

I’ve also just updated to 2021.4.1 and it’s working again.

Thanks for the hint on the update - also done the same and working :slight_smile:

Still on 2021.3.x, planning to go to 2021.4.x this weekend. Reports above state it’s now working again on 2021.4.1 …so fair to conclude speedtest is broken for every HA version below 2021.4.1? Half question, half clarifier for anyone reading this thread after my post…

I think it will be broken for all old HA versions prior to the fix in 2021.4.1 - as all of them will have the bug in the CLI due to an issue with Ookla now fixed in 2021.4.1 +.

Thanks, pretty much what I figured.

@wmaker : Thanks, Tommy! Your fix worked for me.