⚠️ Important Notice
All scripts provided here have been tested on multiple Shelly devices and scenarios. However, every setup is unique — please proceed with caution.
📡 router-watchdog.js
This script periodically checks your internet connectivity. If a specified number of consecutive failures is reached, it automatically reboots the connected router.
- Automatic recovery: Detects internet outages and reboots your router when needed.
- Fully configurable: All thresholds and timings can be customized.
- Telegram support: Optional built-in Telegram notifications when the connection is restored.
https://raw.githubusercontent.com/And-rix/shelly-scripts/main/router-watchdog.js
🧭 script-watchdog.js
This script monitors another script by its ID and ensures it stays running. If the target script stops unexpectedly, it will be restarted automatically.
- Script monitoring: Keeps a specified script alive by checking its status periodically.
- Automatic restart: Restarts the monitored script if it crashes or is stopped.
- Optional Telegram alert: Can notify you if a restart is triggered (configurable).
https://raw.githubusercontent.com/And-rix/shelly-scripts/main/script-watchdog.js