Inspiration

Always felt my home internet speed was slow at times however I didn't have the empirical data to back it up. While randomly browsing the web I came across a post where someone had developed an application to monitor broadband and it gave me the idea to develop something similar and put my underutilized pi to use.

What it does

The client script deployed on raspberry-pi is triggered by a cron job which is scheduled to run four times a day. When triggered the client script runs a speedtest using the speedtest-net npm package and uploads the test results to MongoDB Atlas cluster using a stitch function. I have also integrated MongoDB charts with the collection to visualize the upload and download speeds over time to get a sense of how my broadband speed varies at various times of the day.

How I built it

The project is divided into three different parts:

  1. The client script deployed on raspberry-pi: I used node.js to develop the client script and used 'speedtest-net' and 'mongodb-stitch-server-sdk' NPM packages to run the speed test and upload results to MongoDB databases respectively. The script is triggered by a cron job which is scheduled to run four times a day.
  2. MongoDB Stitch function: I developed a simple stitch function to receive data from raspberry-pi and insert it into a collection.
  3. MongoDB charts: I integrated charts with the speed test collection to visualize the broadband speeds over time

Challenges I ran into

There weren't many challenges being familiar with the MongoDB ecosystem made it quite easier also the amount of code required was minimal due to integrations with Stitch and Charts

Accomplishments that I'm proud of

Developing something that was actually useful and also learning something at the same time.

What I learned

How to write a stitch function and also integrate MongoDB charts to visualize data

What's next for Internet speed monitor

Try to extend it by adding hooks with various services possibly twilio to send a text message to me if the speed drops below a certain threshold so I can log a ticket with my ISP

Built With

Share this project:

Updates