To prevent router from hanging up while you are far from home 3 measures are implemented 1) Hardware watchdog on Arduino. If does not receive command via serial interface then relay disconnects router power for 5 s. 2) 24 h timer disconnects router power every 6 h for 1 min (or once a day in the night) 3) if ping google does not work then network has hanged up and need to reboot. Put in crontab if ping -c 1 google.com > /dev/null ; then echo "ok host is up" pingfail=0 else pingfail=$(($pingfail+1)) echo $pingfail " ping failures" if [ $pingfail -gt 10 ]; then echo "more than 10 ping failures." reboot fi fi