ESP32 internet down indicator: the $10 box that knows who broke the internet
The most useful network tool in my office is not the rack gear. It is a ten dollar microcontroller with two lights on it. Green and green means all good. If the first light goes red, my own router is the problem. If the first stays green and the second goes red, the outage is on the provider's side and rebooting the router fixes nothing. One glance answers the first question of every outage: is it my gear or is it them. Here is what this ESP32 internet down indicator is, the logic inside it, and how to build one in an afternoon.
The first question of every outage
"The internet is down" is two different problems wearing the same complaint. Either something inside your four walls has fallen over, the router, the WiFi, a switch, or your gear is fine and the fault is on the provider's network where you cannot touch it. The fix for one is useless for the other, and until you know which one you have, you are guessing.
Most people do not diagnose, they reboot the router, because that is the ritual. If the router really was the problem, you got lucky. If the outage was the provider's, you just dropped every device in the building for five minutes and learned nothing. In a shop that ritual has a real cost: the payment terminal drops, the phones re-register, and someone sits on hold describing a fault they never identified. The trick of this little box is that it splits the problem at exactly that seam, automatically, all day long.
What the box actually is
Nothing exotic. The shopping list:
- An ESP32 development board. Around $8 delivered, cheaper in a three pack. A tiny computer with WiFi built in, absurdly capable for the money.
- Two LEDs and two resistors. Bi-colour red and green LEDs give a proper red or green per light, or use a single RGB LED module for one light that changes colour. A couple of dollars either way.
- Any old USB phone charger and a cable for power. It draws next to nothing.
- Optionally a breadboard or a small case. A blob of Blu Tack on a shelf is honestly fine.
That is the whole build, and it lands right around ten dollars. No soldering if you go the breadboard route: each LED runs from an output pin through its resistor to ground, and that is the entire circuit.
The logic inside it
The ESP32 joins your WiFi like any other device, then runs one loop forever: ping two addresses every few seconds and set the lights to match. The first ping goes to your router, the gateway, usually something like 192.168.1.1. If it answers, your own network is alive. The second goes to a public address like 1.1.1.1. If that answers, the path through your provider is working. In plain terms:
every 5 seconds:
router_ok = ping the gateway (192.168.1.1)
internet_ok = ping a public IP (1.1.1.1)
light 1 = green if router_ok, otherwise red
light 2 = green if internet_ok, otherwise red
only flip a light red after 3 failures in a row,
so one dropped packet does not cause a false alarm
Ping libraries for the ESP32 already exist, so the real sketch is a few dozen lines: join WiFi, ping, set pins, wait, repeat. The three-strikes rule matters. A single lost packet is normal on any network, and a light that cries wolf gets ignored.
Reading it is the payoff:
- Green, green. Everything is fine. Go back to work.
- First light red. The problem is inside the building. The router or WiFi is down, and a reboot is now a reasonable move instead of a superstition.
- First green, second red. Your gear is fine and the outage is the provider's. Do not reboot anything. Check their outage page, log a fault, make a coffee.
Put it where eyes already are
A monitoring tool nobody looks at is decoration. The box earns its keep by being ambient: the reception desk, the shelf above the payment terminal, on top of the server cabinet, the kitchen bench at home. Anywhere people already glance a dozen times a day. The moment someone says "is the internet down?", the answer is already sitting in their eyeline. No app, no login, no asking the one person who knows the router password.
Worth adding once it works
The two-light version is the one to build first. Once it has lived on the shelf for a week, the upgrades suggest themselves:
- A buzzer on state change. One short chirp when a light flips, so an outage announces itself. Chirp on change only, not continuously, or the box will be in a drawer by Friday.
- A third light for DNS. The ping to 1.1.1.1 goes by number, so it can succeed while name lookups are broken. That is the classic "internet is up but nothing loads" failure. A third light that checks a name lookup catches it.
- A cheap smart plug on the router. Some builders let the box power-cycle a genuinely hung router through a smart plug. Trigger it only when light one says the router itself has stopped answering, never during a provider outage, or it will spend the afternoon rebooting a healthy router.
The serious point hiding in the toy
A ten dollar box, built in an afternoon, permanently answers "whose fault is it?" for the most common IT complaint there is. It never sleeps, never guesses and never reboots things out of superstition. That is what monitoring is: encoding a diagnostic question into something that checks it constantly so a human never has to wonder.
Now scale the idea. A business network has dozens of questions like that one. Is the backup running, is the disk filling, is the UPS on battery, is the back office WiFi degrading? Every one can be watched the same way and answered before anyone feels the pain. That is the difference between IT that reacts and IT that already knew, and it is most of what you are buying with proper managed IT. The little box is the same philosophy with the price tag removed. And if the first light on yours goes red more often than it should, the fault is inside your walls, so start with your network and firewall setup or, at home, the three WiFi settings most people never touch.
Building one and want a hand, or would rather the grown-up version watching your whole setup? Tell us what keeps falling over and we will give you the straight answer on what is worth monitoring.
Frequently asked questions
What parts do I need to build an ESP32 internet down indicator?
An ESP32 development board, around $8 delivered, two LEDs with resistors, or a single RGB LED if you prefer one light that changes colour, and any old USB phone charger for power. A breadboard and jumper wires make it a no-solder job. All up you land right around ten dollars, and the finished box sits happily in a mint tin or on a shelf.
How does it tell a router problem from an ISP outage?
It pings two addresses that sit either side of the boundary. The first is your own router, the gateway, so a failure there means the problem is inside your building. The second is a public address like 1.1.1.1. If the router answers but the public address does not, your gear is fine and the fault is on the provider's side. That split is exactly what decides whether rebooting the router is useful or pointless.
Do I need to be a programmer to build one?
No. The sketch is a few dozen lines, and every piece of it, joining WiFi, pinging an address, switching a pin on and off, is covered by well-worn examples and existing libraries. If you can follow a recipe you can follow a tutorial. Budget an afternoon for your first one, and most of that is waiting on parts, not fighting code.
Why not just look at the lights on the router?
Router lights answer the wrong question. The WAN light reports the link to the wall, not whether traffic actually reaches the internet, so it can glow a healthy colour right through a provider outage. They are also cryptic, different on every model, and usually in a cupboard. Two plain lights in plain sight, tested against a real address every few seconds, beat a blinking riddle behind the printer.
Will pinging every few seconds cause any problems?
No. A ping is a few dozen bytes, so one every few seconds is a rounding error on the slowest connection, and public resolvers like 1.1.1.1 are built to shrug it off. Keep the interval to seconds rather than milliseconds and nobody will notice it running. The box should be silent and boring right up until the moment it is not.