ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

Need hardware (and software) to reset power when internet connection is lost

(1/4) > >>

Deozaan:
Hi all,

I have a few Raspberry Pis functioning as media servers or whatnot, including running other things (such as self-hosted version control) that require an external internet connection or allow other people connect to my devices remotely. But the problem is that my modem frequently stops communicating with the outside world and the only fix seems to be to reboot it. Otherwise it will happily sit there for hours without an internet connection and never self-recover.

If I'm home when it happens, it's annoying to have the frequent interruptions to streaming Netflix or YouTube or whatever, but it's not a huge ordeal to fix it. I just walk over and pull the power cord and plug it back in. But when I'm not home, which is ostensibly when I really need my internet to be reliable for accessing my files/devices, I obviously can't remotely reboot the modem. So hours go by without an internet connection at home because no one is around to reboot the modem.

What would be nice would be to have a "smart" power switch that could detect the lack of an internet connection, cut and restore power to an external device (the modem) and then wait a few minutes for the modem to finish rebooting before going back into internet connection detection mode and being ready to do it all again if/when necessary.

If something like this already exists and is fairly inexpensive, I'd love to hear about it. Otherwise, I'm thinking it must be possible somehow as a kind of DIY Raspberry Pi project. And as mentioned, I already have a few Raspberry Pis sitting around that I could use if needed.

Does anyone have any tips or suggestions--or even better: links to hardware and/or instructions--on how to get the desired result of rebooting my modem any time it loses its connection to the internet, so I don't have to babysit it all the time or be afraid of leaving my house for extended periods of time?

Thanks!

wraith808:
I had this problem a while ago and looked into this solution:

http://whatimade.today/make-an-automatic-router-re-starter-for-3-with-an-esp8266-01-and-single-relay/

I ended up getting in on a Kickstarter project that basically packaged that without me having to do it.  They still sell those items.

https://shop.wireboot.com/

4wd:
https://shop.wireboot.com/
-wraith808 (February 13, 2021, 03:19 PM)
--- End quote ---

Another perspective with this device:
It depended on a server running under the control of the creator to set it up, (I don't even know if it's still running).
It was a Kickstarter project run by someone who apparently has a history of thinking up good ideas but then never fully follows through with them after an initial run. There are a ton of reports of people not receiving anything or that they didn't work properly.

Source: I had one and it's operation was "iffy".
https://www.kickstarter.com/projects/786298545/wireboot-keep-your-wifi-on-24-7-automatically-rebo/comments
(As of 14 days ago there's still a comment about not receiving a product, the creator has not logged into Kickstarter for 14 months, and the project has never been updated from Pre-order - not updated since almost the time it was created.)

You could have had mine for free but I threw it out last year :)
I had the version with a 433MHz module for controlling respective power switches.

I was going to use it for when I'm overseas for 3-6 months at a time. In the end I set the computer up with a shutdown schedule, had it automatically boot on power on, and then used a timer switch to shut down the power to it and the modem for 15 mins every day at a time I wasn't likely to be using it.
It ran flawlessly this way for years.

Another alternative would be a ZigBee adapter for a RasPi along with a ZigBee controlled power switch, then you're not reliant on WiFi if it's provided by the modem/router.

Otherwise I would think an appropriately rated relay connected to the RasPi GPIO to switch the power to the modem would be easy enough.
eg. https://www.electronicshub.org/control-a-relay-using-raspberry-pi/

Remember, you only need to switch the 12v DC, (usually), for the modem, not the 110v AC of the mains, so mains isolation is not a problem.
It should then be as simple as pinging Google every few minutes and triggering the GPIO on a run of 3 failures, (for example).

Also, you didn't mention, if your modem takes alternative firmware then maybe there's a facility in that to test/reboot.

x16wda:
Well whatever you end up with, be sure to check "this" out first... Don't trust the title, check product description!  ;D

x16wda:
So that said, looks like this unit might actually do what you want. Seems a little pricey but depends on how bad you want it.

Navigation

[0] Message Index

[#] Next page

Go to full version