Let everyone know when there is no Internet

Vishal Roy
4 min readMay 11, 2020


Photo by Clem Onojeghuo on Unsplash

I am the IT guy in my house. I make sure that everyone’s gadgets are working properly, TVs are able to stream the content, security cameras are working, the backup server is up, Wi-Fi reaches every corner of the house, all IoT devices are working and last but not least, the Internet is working.

Well, for the rest of the things I get called once in a long while. But for the internet, it’s very more often. We do have a very good internet connection through a fibre optic network, but that also doesn’t guarantee 100% uptime. Or sometimes I mess up with the network or unplug it while doing some experiments.

And I think you must have guessed it by now. Yes, everyone comes to me to confirm if the internet is down for any reason (The frequency of poking is unpredictable). It’s not annoying, but everyone should know by themselves when there is no internet (Just how they know when there is a power cut).

So here’s what I did to solve this problem forever :)


The idea was very simple. All I needed to do was to appoint someone else to do this work for me. But that ‘someone’ should work for me just in the exchange of food for its survival. So guess who’s it ?

Photo by Harrison Broadbent on Unsplash

Yes, it’s the all-time favourite Raspberry Pi board. I already had a Raspberry Pi 3B+ working as a backup server for my security cameras, so I just gave it one more extra job to do. I attached a small piezo buzzer to the GPIO pins of the raspberry, wrote a few lines of code and handed it over to Mr Raspberry and BOOM ! It was all up and running without any issues 😎

From now, whenever the internet goes down everyone hears a not annoying and soft on ears, beep-beep sound.

How to make it ?

1. Grab any development board you want

Yes, Raspberry Pi is not the only option you have got. I used it just because I already had it. You can try your hands on some other boards like ESP8266 and Arduino. If I was already not having the Raspberry Pi or it was too busy doing some other work, I would have just bought the ESP8266. And to be very honest, raspberry is an overkill for such a simple task like this.

2. Get a Piezo Buzzer

This is the guy who is going to make that beep-beep sound for you. And there are two types of piezo buzzers, one is active and the other is passive. You can know more about it here. I just found a working buzzer in a broken toy drone remote, so I took that out and it turned out to be a passive buzzer.

Yes, the code in this tutorial is written for the passive buzzer. But you can easily make it work with an active buzzer with a little tweak in the code. And the wiring could remain the same.

3. Connect the Buzzer

Raspberry Pi’s GPIO Interface

Follow the diagram above and connect your buzzer’s positive terminal to the GPIO 23 pin and the negative terminal to any of the ground pins.

4. Flash the Code

Download the above python script and save it anywhere you want on the raspberry. Once done, run the script and make sure it’s working as expected.

python path/to/internet_down_buzzer.py

Finally, follow the above tutorial by Estefannie Explains It All to make sure that your script is up and running when your Raspberry Pi reboots.

5. Hurray, it’s done !

Raspberry Pi with Buzzer (Top-lid removed)

Here’s how my raspberry looks with the buzzer. Once you have made it, don’t forget to show me yours ;)

Thanks for reading through this article! If you enjoyed it, please click the 👏 button & feel free to leave your response below.