An easy to use script test the speed (down-, upload and ping) of your ISP regularly (cronjob) and return the results with an Alexa Skill.
- Install pip packages
pip install -r requirements.txt
- Install python-tk
sudo apt install python-tk
Run python speedtest.py
to measure the speed.
It will automatically create a sqlite database if not already existing.
Run plot.py
to plot the last 60 days.
Run import.py filename.csv
to import your existing data into your database.
The CSV format to import is as follows:
date,time,timezone,ping,download (MBit/s),upload (MBit/s)
2017-02-19,18:45,CET,47.126,4.07,1.90
2017-02-19,19:00,CET,66.101,3.94,0.86
You might adapt the script to import your own files.
To measure your speed all 15 minutes, add the following line to your crontab.
*/15 * * * * python /path/to/speedtest.py
First you need to install Flask-Ask with:
pip install flask-ask
In the next step you need to go to https://ngrok.com/download and download the latest Linux ARM build with:
wget https://.../ngrok-stable-linux-arm.zip
Now you can run your ngrok Server with:
./ngrok http 5000
Your Localhost-Server with a ngrok-Subdomain is now running. The output of this command looks similar to this. To use this Alexa-Skill you need to copy the HTTPS-Address into the Amazon Developer Console later.
Follow the instructions here (starting from Configure the Skill) and copy the necessary code snippets from speech_assets
folder into the necessary places.
All you need to do now is to make sure you have at least one record in the speedtest.db
and then run python alexa.py
.
- Philip Heimböck
- Stefan Natter (Fork)