From time to time your ISP fails and the promised Internet speed drops below what’s acceptable. If the slow internet speed isn’t caused by local network traffic, chances are it’s your ISP that is not delivering on the contractual agreements due to technical reasons (or else). Inspired by Fingbox feature and a profile I made earlier to use Google Home to measure the Internet speed, I created the Slow Internet Warning system that works with your smart home.
Bad ISP? Get a warning and Tweet at them!
I know that tweeting at ISP has been done before, but I wanted to bring something special to the table. This project will not only monitor your Internet speed 24/7 but also notifies you and your smart home in more than one way!
- Alexa notifications
- Google Home alerts
- Android Notifications
- Windows 10 Notifications
- 24h Charts
- Custom number of tests
- Tweeter alerts
The Slow Internet Warning system will periodically check your Internet speed. I could finally take advantage of the 1Gbit Ethernet on my Raspberry Pi 4 to monitor my network (I get speeds in excess of 100Mbits).
I would strongly recommend getting a 1Gbit compatible board (Raspberry Pi 4) unless your ISP contractual speed is way below 100Mbits, otherwise, your results may not be accurate. Note that even with 10/100 Ethernet it’s possible to monitor low speeds.
If the Internet speed drops below a predefined value, the Slow Internet Warning system will start measuring it X times over a shorter period of time to make sure this was not a traffic spike. If the Internet speed is still low, warnings are sent to the devices of your choice with an option to automatically tweet at your ISP to start the conversation about the possible discounts this month!
NodeRED and Slow Internet Warning
There are a couple of nodes that you need to instal to make this work. I used the following nodes in my script:
node-red-contrib-cast (for google home) node-red-contrib-join-joaoapps (for android) node-red-dashboard (for charts) node-red-contrib-alexa-notifyme node-red-contrib-speedtest
To send the notifications for Windows 10 and Android I will use Join app. It works great for simple notifications. Anything more complicated would require Perfect Notifications 2.0.
I’m taking advantage of NodeRED 1.0 release and the custom subflow variables to set the settings for the project. You will need to provide the following info:
- lowspeed set the low limit threshold
- handle provide the Twitter handle of your ISP to annoy them
- defaultspeed promised Internet speed by ISP
- tests – number of confirmation tests
Thanks to speedtest node, the entire process is very simple, trigger the speedtest node every X min, and monitor the result. It gets somehow complicated when it comes to calculating what constitutes the low Internet speed.
If the Internet speed fails to go over the set threshold, the Internet is then a subject to further evaluation. There is a smaller loop in place which will make consecutive tests.
If the average of these tests still falls below the threshold, the notifications are triggered. To break the loop, the threshold level tests have to be done X times (
tests) or the value of the subsequent test has to go over the threshold indicating that the network issue was only temporary.
A couple of words about Notifications
I’m using Alexa NotifyMe skill, to create a pending notification on my Alexa devices. For the most part, everything stays the same, but I wanted to add a timestamp to the message so I would know when the outage occurred.
To get Google Home talking, I used the Cast node. Since I cannot create a pending notification, your voice note will be played only at the time of the outage. That’s ok, we have android notifications too if you missed the announcement.
Android and Windows 10
Both, Android and Windows will use simple Join messages to receive updates about the conditions of your network. The notification is simple, but you probably want to read the trick about the icons below!
You could hardcode the API keys, but I used my credential system to serve it from global variables.
Tweet at ISP
You will have to apply for the Twitter API. It was granted quickly for my account, so I don’t expect you to wait long. Once you provide all the tokens to authorise the tweets, you will be able to tweet at your ISP about the outages.
Do not provide them with any information about your account in that tweet. Also, be very careful about scammers. My last interaction with Virgin Media on Twitter ended up with a spoof account DM me minutes after the official account responded back to me asking for card details.
Even if you don’t have a spare Raspberry Pi 4, you can use this to monitor your internet speed. You won’t get accurate results if your Internet is faster than 10/100 interface, but you will be able to tell if your ISP dropped the speed significantly!
Let me know what do you think about this project, and feel free to share your internet charts in this Reddit thread.
Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.