Power outage

Currently, if the power flickers(which is does EVERY time I’m away without fail), mymodem seems to need to come online first, then the router.

If it doesn’t(basically every time there’s a failure) i have to manually reboot the router.

When i’m away, i have no access to the network when this happens.

So i need a way to 1:detect network outage 2:reboot the router

I’m open to suggestions

2 seems harder…i’ve worked on trying to write scripts in the past to remotely reboot my router, to no avail.
I use ddwrt on my router.

If anyone has any insight into how to accomplish this, I’m all ears.

Thanks

Im not sure, I think you need to somehow probably have your modem send a reboot to the router?

What router do you have? Can you maybe update its firmware or try dd-wrt on it?

Some ideas here

I already have ddwrt on the router

router is a asus RC-AC68U

If you don’t mind spending money ($129) - get a smart power switch (I personally own 2 of these: Web Power Switch 7. Works great - has scripts and I’ve got both of them setup to do exactly what you’ve asked for. And as a side bonus - you can remotely power cycle stuff yourself

2 Likes

This is a great device!

However, if you want a DIY solution, have a UPS-ed rPi monitoring the Voltage or external ping to something, and let the pi switch a relay to power cycle either the modem or router or both… but then… trialling and mucking about with a DIY solution, and more so the time spent, this 129USD thingy seems perfect.

Hello! Theoretically, I would have done so:
https://www.itead.cc/sonoff-wifi-wireless-switch.html
or
https://www.itead.cc/smart-socket.html
flash:


+
check the availability of the Internet
http://docs.openhab.org/addons/bindings/network/readme.html
+
a rule that if the Internet outage will send a team sonoff off and after 10 seconds turn

Maybe you could solve the root cause of this problem a buy a uninterruptible power supply. It seems that it isn’t that expensive any more.

2 Likes

I second that… we have the whole house on a 20kWh UPS :slight_smile:

1 Like

Assuming oh2 is behind the router, it will show as offline. Can you use a OH2 rule with a cron job to ping a website and if not found send a reboot cmd to the router?

Or possibly have a similar script and cron job run directly on the router itself?

Everything is already on a UPS. Problem still exists.

I want to be able to run a reboot to the router; i’ve been working on doing that, but having issues.

Apparrently i need pub/priv keypairs in place…
I’ve been inquiring into that on ddwrts forum

http://www.dd-wrt.com/phpBB2/viewtopic.php?p=1069853#1069853

@milty456

Can you explain what you need keys for? Are you trying to establish an SSH connection into the router to reboot it?

I do not have dd-wrt installed on my router currently, so haven’t played in a while. But can you place a script directly on the router itself? And have that script ping a website, and if the ping fails then reboot?

Is this helpful?
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=3574#3574

Yes exactly. If you don’t set up the key pairs, it prompts for the router pw. That is not something i want to put in a script.
Even better, i think i found an answer.

There is a feature in DDWRT called watchdog.
You can have it ping a website every x seconds and reboot if it fails. Go figure.

Thanks

Rich