Skip to content

A bash script that regularly sends speedtest results to a common web API.

License

Notifications You must be signed in to change notification settings

kyletaylored/speedmob

 
 

Repository files navigation

Speed Mob

GitHub stars GitHub forks GitHub issues Inspired by natterstefan Twitter Twitter Follow

Inspired (Forked) by natterstefan's speedtest_cron on Github, Speed Mob uses the same principles of running a speedtest on a regular schedule (every 30 minutes by default) that then submits the results to our Speed Mob server (a Lumen app that writes to a MySQL database) where it will be used to aggregate and showcase all speedtest results submitted.

For anyone interested in making their own Speed Mob server, feel free to use this as a source! The installation supports both Mac OS(X) and Linux (Raspian) to use as clients that submit data to the server, and utilized as common tooling as possible for consitency (bash, python, jq, etc).

Idea

While unable to run directly on a router, it's now super simple to setup and install on a Raspberry Pi connected to your network, or even on your own laptop (Mac or Linux). We want the dynamic results, so we use randomly selected servers on a regular interval to identify trends.

The reason I started this project was because my FiOS bill increased after a promo period ended and I was considering switching to Spectrum. While FiOS is preferred for my work-from-home job, the improved download speeds from Spectrum was enticing for the price - but I also know that there have been occasional outages for Charter/Spectrum in our area, and knowing that the infrastructure relies on cable/coax and a shared node (i.e, everyone comes home after work and turns on Netflix and we all suffer).

I signed up for Spectrum, but wanted to run a regular speedtest for each FiOS and Spectrum to compare the results. Initially, I was using the IFTTT method from speedtest-cron that wrote a JSON string to a Google spreadsheet, then utilized Data Studio to showcase the results. That ran into it's limits as Google Sheets will create a new sheet after 1k or 2k rows, meaning I stopped getting new data into the dashboard.

With this update, I'm able to contribute the results to a common datastore and can let anyone else contribute their own data as well! This will give us a great visualization of ISP speeds in different areas at different times in a super cool way.

SpeedMob Data Studio SpeedMob Data Studio

System Requirements

A UNIX-like system with Python (at least 2.5) is required to run the scripts.

Installation

You can try our installation script, or install dependencies manually.

curl -fsSL https://raw.githubusercontent.com/kyletaylored/speedmob/master/installer.sh | bash

Manual install

git clone https://github.com/kyletaylored/speedmob
cd speedmob
chmod +x installer.sh
./installer.sh

Uninstall

To use the automated uninstaller, follow the steps below.

chmod +x uninstall.sh
./uninstall.sh

To manually uninstall, just remove speedmob from /usr/local.

rm -r /usr/local/opt/speedmob
rm -r /usr/local/bin/speedmob
unlink /usr/localbin/speedmob

speedtest_ifttt

After reading the "Use Raspberry Pi to Measure Broadband Speeds to Hold Your ISP Accountable" article I decided to implemented Aallan's work here too. Because I would like to get either a push notification when the internet speed drops or add the result to a Google Spreadsheet automatically. This is how you use it:

  • rename example.cfg to speedtest.cfg
  • setup the maker channel on IFTTT
  • add an Applet like this one
  • add the secret key and event name to the speedtest.cfg
  • run the script speedmob --ifttt

Development

Improvements, suggestions or bug fixes are very welcome. Just create a pull request.

Similar projects

There are other projects available, like speedtest-cli-extras by HenrikBengtsson, speedtest-cron by vwillcox or speedtest-cron by brainTrain. The last one makes use of Google Spreadsheets and IFTTT's Maker.

Support

Support obviously not guaranteed, but I'll try my best.

License and Disclaimer

By installing this software, you agree to share your speedtest result data with the speedmob server for the purpose of research and an exercise in data aggregation. We do not collect any personally identifiable information other than utilizing your public IP address to fetch GeoIP coordinates for the purpose of mapping and filtering data. You will not hold the repository owner, Kyle Taylor, or the software developers of the tools that speedmob utilizes accountable for any actions you take or damage caused.

License

About

A bash script that regularly sends speedtest results to a common web API.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 87.8%
  • JavaScript 12.2%