HomeHome AutomationSlow Internet Warning

Slow Internet Warning

Where is my Internet???

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)

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.

Function Node: Investigate
var count = context.get("count");
var total = flow.get("lowAverageSpeed");
var download = msg.payload.speeds.download;
var targetspeed = flow.get("lowSpeed");
var tests = flow.get("tests");
var defaultspeed = flow.get("defaultspeed");
var handle = flow.get("handle");

//check if array exists
if(!total || !total.length || total === undefined){
        total = [];

var z = isNaN(count);

if(z === true){
    count = 0;
    context.set("count", count);

if(download <= targetspeed){

    if(z === false){
        if(count <= tests){
            count = count + 1;
            context.set("count", count);
            //push element
            //remove X elementh
            if(total[tests] === undefined) {
                flow.set("lowAverageSpeed", total);
            else {
                total.splice(tests, 1);
                flow.set("lowAverageSpeed", total);
    //if speed is still below the target    
        if(count > tests){
            context.set("count", 0);
            //calculate average
            var sum = total;
            var average = Math.round(sum.reduce(add)/tests);
            if(average <= targetspeed){
                msg.info = {
                    "isp": msg.payload.client.isp,
                    "average": average,
                    "lastDL": msg.payload.speeds.download,
                    "lastUL": msg.payload.speeds.upload
                return[null, msg];
if(download > targetspeed){
    context.set("count", 0);
    return [null, null];

function add(accumulator, a) {
            return accumulator + a;

msg.payload = average;

return [msg, null];

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.

Function Node: Alexa Notification
var handle       = flow.get("handle");
var defaultspeed = flow.get("defaultspeed");
var average      = msg.info.average;
var isp          = msg.info.isp;

//get HH:MM
var time = new Date();
var timestamp = time.getHours() +":"+ time.getMinutes();

msg.payload = "The Internet speed at "+ timestamp + "was "+average+"Mbps out of "+defaultspeed+"Mbps. Looks like "+isp+ " sucks again";
return msg;
Google Home

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.

Function Node: Google Notification
var handle       = flow.get("handle");
var defaultspeed = flow.get("defaultspeed");
var average      = msg.info.average;
var isp          = msg.info.isp;

msg.payload = "The Internet speed is "+average+"Mbps out of "+defaultspeed+"Mbps. Looks like "+isp+ " sucks again";
return msg;
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.

Function Node: Compose Push
var handle       = flow.get("handle");
var defaultspeed = flow.get("defaultspeed");
var average      = msg.info.average;
var isp          = "msg.info.isp;

var id1 = global.get('JOINmi9');
var id2 = global.get('JOINdesktop');

msg.push = {
    "deviceIds": id2,
    "title":"The Internet speed warning",
    "text":"The Internet speed is " +average+"Mbps out of "+defaultspeed+"Mbps. Looks like "+isp+ " sucks again",

return msg;
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.

Function Node: Compose Tweet
var handle       = flow.get("handle");
var defaultspeed = flow.get("defaultspeed");
var average      = msg.info.average;

msg.payload = "Hey " + msg.payload.client.isp + 
               " ("+handle+") what's going on with my Internet, the speed dropped to " + 
               average + "Mbps from " + defaultspeed + "Mbps.";
return msg;


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.

Project Download

Download project files here. Bear in mind that Patreon supporters have early access to project files and videos.


Nothing says "Thank you" better than keeping my coffee jar topped up!


Support me on Patreon and get an early access to tutorial files and videos.


Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services


Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

Nest-ing up your older thermostat under $5

Nora – Google Assistant in NodeRED

Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

Sonoff Zigbee Bridge – review

Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

DIY Smart Washing Machine – for about 15 bucks!

Learn how to add washing machine notifications to your Google Home on the cheap

Smart Home

Sonoff ZigBee Bridge U isn’t what you think!

I expected Sonoff ZB Bridge U to be a next gen ZigBee bridge with Matter support. Turns out, there is much more to talk about!

Aqara “Everything” M3 Hub

When I started my home automation adventure, the current problem was the number of ecosystems needed to outfit your smart home. Aqara M3 Hub has a long list of protocols to match that!

Sonoff ZB Micro did it! (and bonus ZigBee device)

A long time ago, I took an angle grinder to the humble Sonoff Micro, will I do this again? Meet Sonoff ZB Micro and Sonoff ZB Contact (SNZB-04P) - the latest devices from the ZigBee ecosystem.

This keyless entry is PRO: SwitchBot Lock Pro

SwitchBot Lock Pro offers comprehensive upgrades over the original, combining enhanced design, stronger performance, and a faster mechanism for keyless entry

I damaged the cheapest Smart Socket with power metering for you

Sonoff S60 has an exeptional price for a smart socket with a power meter - I decided to check it out and see how flashable it is