JavaScript is required to view this page.
Solving Internet Outages with Shelly: The Router Watchdog Script

Solving Internet Outages with Shelly: The Router Watchdog Script

In the digital age, Internet connections are crucial. When your Internet connection suddenly drops, it can be frustrating to get all your equipment back online. But what if there was a smart solution to automatically reboot your modem and get you back online? Enter the Router Watchdog script: A powerful feature of Shelly devices that can help you regain connectivity seamlessly.

Note: Not all Internet modems have an integrated router, so think of this script as a "Modem Watchdog" script. If your modem also has a built-in router, this will also reboot the router. If you have a separate router, you may have to employ another Shelly device to reboot it after a delay long enough to allow your Internet modem to get back online.

The Shelly Script: An Overview

The Router Watchdog script is a handy tool created by Allterco Robotics, the makers of Shelly devices. It's designed to detect Internet outages and trigger a modem reboot to restore your connection. Let's dive into how it works and how you can use it to your advantage.

How Does it Work?

1. Monitoring Connectivity

The Router Watchdog script continuously monitors your Internet connection. It does this by sending HTTP GET requests to predefined endpoints. These endpoints are websites or services known for their high availability.

2. Detecting Failures

If the script encounters a failure in fetching data from an endpoint, it counts it as a potential sign of an Internet outage. These failures could be due to a variety of factors, such as network issues or server unavailability.

3. Determining the Severity

To avoid unnecessary reboots, the script sets a threshold for the number of consecutive failures (configurable by the user). Once this threshold is reached, it takes action.

4. Rebooting the Modem

When the number of failures surpasses the threshold, the Router Watchdog script initiates a modem reboot. It does this by toggling the connected Shelly device off and back on. This action is triggered after a set amount of time to ensure a proper reset.

Why Use the Router Watchdog Script?

  • Automatic Recovery: You no longer have to manually reset your modem when an outage occurs. The script automates the process, saving you headaches, time and effort.

  • Configurability: The script's parameters are customizable. You can adjust the number of failures required to trigger a reboot, the timeout for detecting Internet issues, and the time delay for the modem reset.

  • Reliability: By using trusted endpoints for monitoring, the script is efficient in distinguishing between genuine outages and minor hiccups.

  • Shelly Devices Compatibility: Shelly devices are known for their versatility and ease of use. The Router Watchdog script seamlessly integrates with these devices.

How to Get Started

You can access the Router Watchdog script and detailed instructions on Allterco Robotics' GitHub page. The script, available at this link, can be utilized to set up your Shelly device for automated modem reboots.

In Conclusion

Say goodbye to the frustration of recovering from Internet outages. With the Router Watchdog script and Shelly devices, you can make life less of a hassle when your Internet service comes back online. The script's intelligent monitoring and automated rebooting capabilities make it a valuable addition to your home network.

It's even possible to reboot other devices by utilizing additional Shelly units such as your standalone router, network switches and other devices that could impact your ability to connect to the Internet.

Don't let Internet outages get you down—let Shelly and the Router Watchdog script get you reconnected.

Previous article Chamberlain MyQ Garage Doors Lock Out Customers From Full Control
Next article ODROID-GO Advance, Super & Ultra Special Price

Comments

Dane - February 27, 2024

This sounds great but in my case my internet is fine, but often 1 or 2 shelly devices become unavailable or offline and I have to walk out to the circuit breaker to reboot all of them. A smarter fix would to be to use this ping example you have written and software reboot the device if the ping fails. Is this something you could help me out with? I see a lot of requests for it online and in forums. And there are even a few examples already written but they seem heavy handed or outdated.
Thanks in advance,
kind regards
Dane

Leave a comment

Comments must be approved before appearing

* Required fields

x