Looking for USB controlled plug recommendations.
Looking for a way to reboot my ISP equipment when a failure is detected.
I was thinking of running an old raspberry Pi 1 pinging and on failure turn off the power to the routers, wait a minute, and turn on the power again. Given that the wireless component might be the cause of the failure, I would like to have a wired connection to control the power.
What I am thinking of is something like a kasa smart plug but controlled by USB by the Pi.
I am a plug and play person and world not feel comfortable soldering something that uses 120v. Especially as it would be running 24/7.
Any recommendations?
What I am thinking of is something like a kasa smart plug
That will work.
but controlled by USB by the Pi.
Now you made it difficult. I’m not aware of any smart plug that can be controlled via USB. They are either WiFi and you make an API call or ZigBee/Thread/Zwave and you need a controller like SmartThings/Alexa/HomeAssistant to send the command to the device.
Why not keep it simple with a WiFi plug? Plenty of local solutions that don’t require internet. If your internet goes down you can still use WiFi to toggle the switch for the modem. You could probably automate it too, if google doesn’t respond to a ping for 5 minutes automatically reboot the modem
Use the GPIO of the RPi to fire a relay for a set duration with a timer.
The relay would be wired NC with your router’s plug. Once the timer is done, it releases the relay and power is restored to the router.
Make the duration whatever you need to sufficiently let the router be off before plugging it in again. Usually like 30 seconds.
Control the RPi with whatever you want for an input command to fire the relay, then trigger the output.
If you really wanna make this easy, have an electrician wire a light switch to the outlet and make it a switched outlet. Router on, router off, easy as a lamp.
This is the way to do it. I made a simple relay plus outlet where any 5v signal would turn the outlet off, and used it to control my router.
Eventually I got a better modem that I could reboot with a software command, then later an even better one that would auto sense problems and recover.
you could see if you can root your router, and then just do this as a cronjob, or install openwrt.
also if you are scared of high voltages (fair enough) maybe the dc one that comes out of the power supply might be more friendly.
or (i am clearly full of bad ideas today) maybe you can get a managed switch and power (and hence power cycle) via PoE