Skip to content
Switch branches/tags
Go to file


Failed to load latest commit information.
Latest commit message
Commit time

Speedtest Alexa-Skill and Cronjob

GitHub stars GitHub forks GitHub issues Twitter

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.

##Table of contents


Copy config.json.dist to config.json and setup the values.


  • Install pip packages
pip install -r requirements.txt
  • Install python-tk
sudo apt install python-tk

Start the Speedtest

Run python to measure the speed. It will automatically create a sqlite database if not already existing.

Plot a diagram

Run to plot the last 60 days.

Example Plot

Import CSV

Run 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)

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/ /path/to/config.json

Installation Speedtest Alexa Skill

Installation of Flask-Ask and Ngrok

First you need to install Flask-Ask with:

pip install flask-ask

In the next step you need to go to and download the latest Linux ARM build with:

wget https://.../

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.

ngrok Example

Setup Alexa Skill

Follow the instructions here (starting from Configure the Skill) and copy the necessary code snippets from speech_assets folder into the necessary places.

If you want to create more Utterances you'll find a useful tool to expand utterances here. An example of how you would write them is shown below.

MeasureSpeedIntent messe die (upload / internet / download) (/geschwindigkeit)
MeasureSpeedIntent nimm eine messung (/vor)
MeasureSpeedIntent starte eine (/neue/weitere) Messung

Start Alexa Skill

All you need to do now is to make sure you have at least one record in the speedtest.db and then run python

Setup Twitter

Once you have setup your Twitter App you should udpate the twitter_* values in the config.json. Then it should tweet automatically. Do not forget to set the twitter_enabled value in your config to true.


How to setup the path to the *.db on a Raspberry Pi?

Keep in mind that the cronjob has a different working directory and therefore its best to use absolute paths in your config.json file for the database.



Python Speedtest that saves file into sqlite database, plots the results and provides an alexa skill for asking for the result




No packages published