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?

  • K_cutt08@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    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.

    • I_Arman@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      10 months ago

      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.