Re: How to monitor your internet connection with virtual custom sensors
Posted: Tuesday 20 April 2021 20:22
Ah, i have to admit i do not know how to do that.
Off to google it.
Off to google it.
Open source Home Automation System
https://forum.domoticz.com/
Code: Select all
root@domoticz:/opt/domoticz/userdata/scripts# ./speedtest.sh
Traceback (most recent call last):
File "/usr/bin/speedtest-cli", line 11, in <module>
load_entry_point('speedtest-cli==2.0.2', 'console_scripts', 'speedtest-cli')()
File "/usr/lib/python3/dist-packages/speedtest.py", line 1887, in main
shell()
File "/usr/lib/python3/dist-packages/speedtest.py", line 1783, in shell
secure=args.secure
File "/usr/lib/python3/dist-packages/speedtest.py", line 1027, in __init__
self.get_config()
File "/usr/lib/python3/dist-packages/speedtest.py", line 1113, in get_config
map(int, server_config['ignoreids'].split(','))
ValueError: invalid literal for int() with base 10: ''
ping = ms
download = Mbps
upload = Mbps
Code: Select all
sudo wget https://raw.githubusercontent.com/sivel/speedtest-cli/v2.1.3/speedtest.py \
-O /usr/lib/python3/dist-packages/speedtest.py/
Code: Select all
<html><head><title>Unauthorized</title></head><body><h1>401 Unauthorized</h1></body></html>HTTP/1.1 401 Unauthorized
Content-Length: 91
Content-Type: text/html;charset=UTF-8
Access-Control-Allow-Origin: *
Set-Cookie: DMZSID=none; HttpOnly; Expires=Thu, 01 Jan 1970 00:00:00 GMT
Code: Select all
Traceback (most recent call last):
File "/usr/bin/speedtest-cli", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3260, in <module>
def _initialize_master_working_set():
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 581, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 909, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 795, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'speedtest-cli==2.0.2' distribution was not found and is required by the application
See the previous responses above mine (4 up)manjh wrote: ↑Sunday 05 March 2023 16:00 I did not pay attention to this for a while, it was measuring the speed on a daily basis but has suddenly stopped.
When I run on the console, I get this:What happened? How can I fix this?Code: Select all
Traceback (most recent call last): File "/usr/bin/speedtest-cli", line 6, in <module> from pkg_resources import load_entry_point File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3260, in <module> def _initialize_master_working_set(): File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside f(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3272, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 581, in _build_master ws.require(__requires__) File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 909, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 795, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'speedtest-cli==2.0.2' distribution was not found and is required by the application
Additional info: the logfile in which the values are stored, shows a last entry on February 9th... I have no idea what happened on that day.
Code: Select all
sudo wget https://raw.githubusercontent.com/sivel/speedtest-cli/v2.1.3/speedtest.py \
> -O /usr/lib/python3/dist-packages/speedtest.py/
/usr/lib/python3/dist-packages/speedtest.py/: Is a directory
Code: Select all
DistributionNotFound: The 'speedtest-cli==2.0.2' distribution was not found and is required by the application
Any ideas, anyone?manjh wrote: ↑Monday 06 March 2023 13:16 I ran this command:I then removed the last slash, and it runs.Code: Select all
sudo wget https://raw.githubusercontent.com/sivel/speedtest-cli/v2.1.3/speedtest.py \ > -O /usr/lib/python3/dist-packages/speedtest.py/ /usr/lib/python3/dist-packages/speedtest.py/: Is a directory
But still speedtest-c;i throws an error;Code: Select all
DistributionNotFound: The 'speedtest-cli==2.0.2' distribution was not found and is required by the application