At home we’ve installed a system that can log data like temperatures in different rooms, gas usage, how much energy we produce and how much we need. But one thing was missing. In this century nearly everybody uses the Internet and what’s worse than not having it work or work really slow. So that’s why I coded this little (over-complicated) program that helps us keeping track of upload and download speeds and sending them to the logging utility. And since we got a new Speedport 3 Smart this was even easier to accomplish.
Our new router is as mentioned above Telekom Speedport 3 Smart. It has a Status page where you can see interesting data about the router (only interesting for nerds not a average person). From there we read the information.
The program uses a headless Firefox to access the status page. It simply takes the values from the HTML-Elements and converts them to numbers.
To create the headless Firefox, I’m using the Python module “Selenium“. It requires a driver to work, so the install script downloads the newest version of the driver compatible with the operation system. This install script works only on Windows and Linux (i.e. Ubuntu 18.04), which may also be headless.
The program is able to:
- print the speed to a TXT-File
- print the speed to a CSV-File
- log the speed in the console
- post them to a InfluxDB databse
Install instructions are given on the GitHub page
Speedport 3 Smart Utils
Updated on 2018-12-02T14:54:02+00:00, by .