In this video we show you how to create a “watchdog” for your Internet connection using a Raspberry Pi. If the Raspberry Pi can’t reach Google, it will reboot your cable modem and router. I also show you how to start the script on boot, and a few things you’ll want to watch out for.
Video Link: https://youtu.be/u2ySB-xfd-o
0:25 – What do we need?
1:32 – How does it work?
4:24 – Using Raspberry Pi GPIO Pins (a primer)
6:05 – Why this specific relay board?
8:30 – Test code walk through – testing the relay board
11:56 – See the test code in action
12:27 – Full code walk through with Internet test
17:55 – Making the script run every time the RPi boots
20:40 – Wiring it up using two extension cords for parts
43:50 – Live test with two lamps
46:39 – Outtake with Maddox the Airedale!
(Note – As of October 2021 Amazon prices are quite high. You may want to search elsewhere)
Raspberry Pi 4 – https://amzn.to/3mxKpJw
Relay Board – https://amzn.to/2ZObEqL
Dupont Wires – https://amzn.to/3bpH8po
Brown Extension Cord: https://amzn.to/3BrUg85
White Extension Cord: hhttps://amzn.to/3nHYZO5
Relay Demo Code: https://planetadkins.com/wp-content/uploads/2021/10/relay_demo.txt
Relay Production Code: https://planetadkins.com/wp-content/uploads/2021/10/router_relay.txt