Categories
Infrastructure

Play a sound when the Internet is down

We have a Windows machine recording frames from a time lapse camera, and we want the computer to play a sound when the camera is unavailable, because of either the camera or the network. We figured out a way to do this. We can also use it to let us monitor the house internet so we can restart our modem sooner if it goes down. We like reliable internet.

We installed bping – here’s the website.

Bping does some neat things, but the three neatest are:

  1. Makes your computer beep when it is able to ping a given web address,
  2. makes your computer beep when it is NOT able to ping a given web address (the -dd option), and
  3. lets you scan your local addresses to get a simple list of what’s available and what’s not (the -s option).

The reason why this is mind-blowing is because, while it’s easy to do on a linux box, doing it on Windows is new for us.

Step one: download bping

  1. Download bping from http://gizmoware.net/bping/
  2. Open the zip and move the file to your C:\Program Files (x86) directory.
  3. Optionally get a sound like attention.wav from any arbitrary source (we used http://penguinradio.dominican.edu/Sound%20FX%20Collection/) and put it someplace reliable like your Music directory.

Test it by opening a CMD window and typing bping. Without any arguments, it should ping Google’s DNS and beep. Adjust your PC

Add arguments until you get what you want. I suggest adding -dd last. Use CTRL+C to stop.

Here’s our command to ping our Spectrum DNS server:

"C:\Program Files (x86)\bping.exe" -v=10 -t=5 -dd -f="C:\Users\SS\Music\say-attention.wav" 209.18.47.62

Try disconnecting and reconnecting your network to prove to yourself that it works.

Next step: create a shortcut

In our Windows “Documents” folder, we did a right-click and chose “New Shortcut.” We pasted in our command and on the next screen named it “bping spectrum.”

Click on it to test it.

Final step: start automatically

To finish it off, we need to start it automatically when our computer does. Microsoft says

Press the Windows logo key + R, type shell:startup, then select OK

This opens the startup folder. Hold the Ctrl key while you drag the scripts into the startup script window.

Restart your machine to test it.

Good luck!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x