{"id":71,"date":"2021-10-29T23:45:47","date_gmt":"2021-10-30T04:45:47","guid":{"rendered":"https:\/\/planetadkins.com\/?p=71"},"modified":"2021-11-02T14:10:27","modified_gmt":"2021-11-02T19:10:27","slug":"raspberry-pi-router-relay","status":"publish","type":"post","link":"https:\/\/planetadkins.com\/?p=71","title":{"rendered":"Raspberry Pi Router Relay"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In this video we show you how to create a &#8220;watchdog&#8221; for your Internet connection using a Raspberry Pi. If the Raspberry Pi can&#8217;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&#8217;ll want to watch out for.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Video Link: <a href=\"https:\/\/youtu.be\/u2ySB-xfd-o\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/youtu.be\/u2ySB-xfd-o<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Times:<br>0:25 &#8211; What do we need?<br>1:32 &#8211; How does it work?<br>4:24 &#8211; Using Raspberry Pi GPIO Pins (a primer)<br>6:05 &#8211; Why this specific relay board?<br>8:30 &#8211; Test code walk through &#8211; testing the relay board<br>11:56 &#8211; See the test code in action<br>12:27 &#8211; Full code walk through with Internet test<br>17:55 &#8211; Making the script run every time the RPi boots<br>20:40 &#8211; Wiring it up using two extension cords for parts<br>43:50 &#8211; Live test with two lamps<br>46:39 &#8211; Outtake with Maddox the Airedale!<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Parts used:<br>(Note &#8211; As of October 2021 Amazon prices are quite high. You may want to search elsewhere)<br>Raspberry Pi 4 &#8211; https:\/\/amzn.to\/3mxKpJw<br>Relay Board &#8211; https:\/\/amzn.to\/2ZObEqL<br>Dupont Wires &#8211; https:\/\/amzn.to\/3bpH8po<br>Brown Extension Cord: https:\/\/amzn.to\/3BrUg85<br>White Extension Cord: hhttps:\/\/amzn.to\/3nHYZO5<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Files:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Relay Demo Code: <a href=\"https:\/\/planetadkins.com\/wp-content\/uploads\/2021\/10\/relay_demo.txt\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/planetadkins.com\/wp-content\/uploads\/2021\/10\/relay_demo.txt<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Relay Production Code: <a href=\"https:\/\/planetadkins.com\/wp-content\/uploads\/2021\/10\/router_relay.tx\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/planetadkins.com\/wp-content\/uploads\/2021\/10\/router_relay.tx<\/a>t<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this video we show you how to create a &#8220;watchdog&#8221; for your Internet connection using a Raspberry Pi. If the Raspberry Pi can&#8217;t reach Google, it will reboot your cable modem and router. I also show you how to<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[5,6,4],"tags":[],"class_list":["post-71","post","type-post","status-publish","format-standard","hentry","category-electronics","category-internet","category-raspberry-pi"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"elegant_blocks_team_1":false,"elegant_blocks_blog_1":false,"elegant_blocks_slider_1":false,"1536x1536":false,"2048x2048":false,"small-thumb":false,"large-thumb":false},"uagb_author_info":{"display_name":"Garry Adkins","author_link":"https:\/\/planetadkins.com\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"In this video we show you how to create a &#8220;watchdog&#8221; for your Internet connection using a Raspberry Pi. If the Raspberry Pi can&#8217;t reach Google, it will reboot your cable modem and router. I also show you how to","_links":{"self":[{"href":"https:\/\/planetadkins.com\/index.php?rest_route=\/wp\/v2\/posts\/71","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/planetadkins.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/planetadkins.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/planetadkins.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/planetadkins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=71"}],"version-history":[{"count":15,"href":"https:\/\/planetadkins.com\/index.php?rest_route=\/wp\/v2\/posts\/71\/revisions"}],"predecessor-version":[{"id":108,"href":"https:\/\/planetadkins.com\/index.php?rest_route=\/wp\/v2\/posts\/71\/revisions\/108"}],"wp:attachment":[{"href":"https:\/\/planetadkins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=71"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/planetadkins.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=71"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/planetadkins.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=71"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}