https://github.com/healeycodes/bandwidth-checker
⚡ Test and graph your internet bandwidth over time
https://github.com/healeycodes/bandwidth-checker
bandwidth bandwidth-monitor bandwidth-test raspberry-pi
Last synced: 9 months ago
JSON representation
⚡ Test and graph your internet bandwidth over time
- Host: GitHub
- URL: https://github.com/healeycodes/bandwidth-checker
- Owner: healeycodes
- License: mit
- Created: 2019-08-15T14:30:52.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-08T19:04:44.000Z (about 6 years ago)
- Last Synced: 2025-04-30T07:05:39.034Z (9 months ago)
- Topics: bandwidth, bandwidth-monitor, bandwidth-test, raspberry-pi
- Language: Python
- Homepage: https://healeycodes.com/webdev/javascript/python/opensource/2019/08/22/bot-vs-isp.html
- Size: 6.84 MB
- Stars: 86
- Watchers: 3
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⚡ Bandwidth Checker ⚡
> My blog post: [I Built a Bot to Try and Get Money Back From My Internet Provider](https://healeycodes.com/webdev/javascript/python/opensource/2019/08/22/bot-vs-isp.html)

Some ISPs promise money back if your bandwidth goes below a certain level.
This project includes two automated methods of testing download speed.
- Speedtest's CLI.
- Headless Chromium browser via Netflix's fast.com.
A Node server displays a scatter graph of the recent bandwidth results via Chart.js.
I run my own setup on a Raspberry Pi connected to my router via ethernet.
## Install
### Client
`cd client`
`pip install requests`
and one of the following
**Speedtest CLI**:
`pip install speedtest-cli`
**Headless browser**:
`pip install selenium`
### Server
`cd server`
`npm install`
## Run
### Client
Setup a cron job to run either version.
**Speedtest CLI**:
```
cd client
python clitest.py 'https://server-location/save' 'password'
```
Where the arguments are:
- Path to the endpoint to save the results.
- Password for that endpoint.
**Headless browser**:
`python browsertest.py '/usr/lib/chromium-browser/chromedriver' 'https://server-location/save' 'password'`
Where the arguments are:
- Path to the ChromeDriver executable (watch out for version clashes).
- Path to the endpoint to save the results.
- Password for that endpoint.
### Server
Setup password, and port (default: 3000):
```
Unix Bash (Linux, Mac, etc.):
$ export SECRET=hello
$ export PORT=3000
Windows CMD:
> set SECRET=hello
> set PORT=3000
Windows PowerShell:
> $env:SECRET = "hello"
> $env:PORT = "3000"
```
```
cd server
npm start
```
Visit the root path `/` to view bandwidth results.
Bandwidth results are stored by the client via `/save`
### Contributing
Feel free to raise any issues and submit any reasonable pull requests.
### License
MIT (see LICENSE.md).