Skip to content

Latest commit

 

History

History
63 lines (40 loc) · 1.16 KB

README.md

File metadata and controls

63 lines (40 loc) · 1.16 KB

Router Watchdog

Router Watchdog script for Raspberry Pi using rpi-rf.

This script checks periodically a list of hosts and tries to connect to them, either via HTTP request or ICMP ping.

If there is repeatedly no working connection detected, the Raspberry Pi uses an 433Mhz sender to first disable and then re-enable a wireless socket.

Install

cd router_watchdog/

Install dependencies (in venv)

sh install_dependencies.sh

Run

Manually (without service)

python3 router_watchdog.py

Service

Setup service

Create a soft-link to systemd directory:

sudo ln -sf $(/bin/readlink -f router-watchdog.service) /etc/systemd/system/router-watchdog.service
sudo systemctl daemon-reload

Enable and start service

sudo systemctl enable router-watchdog.service
sudo systemctl start router-watchdog.service

Helpful resources:


Developer Notes:

Upgrade dependencies

python3 -m pip freeze > requirements.txt