v2 Hub resetting modem when offline

(RC) #1

I’ve searched high and low but haven’t found a thread on this yet, so will start one here…

I have a V2 hub, cable internet, and separate netgear modem and routers…

I’d like to detect a modem or router issue and automatically reboot one or both in sequence. Its no biggie when home, but I need ST the most when I’m NOT at home, so when something on comcast changes and the router has to be rebooted, I am stuck until I get home unless I can have the reboot triggered automatically from ST.

There is a web UI for netgear to reboot both modem and router, and I am wondering if there’s a way to trigger these directly via st smartapp, or less desirably though possibly a wifi connected outlet?


(Dennis ) #2

Chances are if you need to reboot the router without internet connection this is going to be a chore. Web based applications will not work.

(Dylon Sease) #3

This would likely need to be handled by a computer rather than the hub. I did some quick research on how you might accomplish this so let me see if I can explain it.
This StackOverflow link contains information on a batch file that changes the background of the computer screen when a ping test is failed. You can cut out all the additional checks after google.com since you are only concerned about your external internet connectivity. Then you would change the part where it changes the background color to instead call the scripts from the next link.

You would change where it says “COLOR 47” near the bottom of the script to “REBOOT.BAT”. This would make it so when the computer failed to ping google it activates the reboot script to reboot your router. One thing this script doesn’t have is a threshold for failed attempts before triggering, you’ll want to add a limit of about five consecutive failed attempts before rebooting your router or else you will be triggering a lot of reboots when you didn’t really need to. Ping tests regularly fail and one failed ping doesn’t mean the internet is down, just like driving across country you may get lost every now and then.


The cons of this would be the necessity of having a computer on at all times running the first script and the lack of a threshold for failed pings may lead to quite a few reboots that were not necessary.

SUMMARY: For those that don’t want to read text wall… Combine scripts from the two links to auto-restart router when internet is down.

(RC) #4

Thanks for the input!

I was hoping it would be possible to just write an app to run locally on the ST hub to do the ping and then make the https call to the router and/or model to do the reboot, wait, then retry… Looks like I will probably need to bite the bullet and get a raspberry pi or other server going to do this and I also have an existing hardwired DSC alarm system I need to get connected (and what I have read so far, that also will require a server along with other 3rd party connectors to do)…

I’m still getting up to speed on what ST will and won’t do, so thanks for the information and patience.


(Larry) #5

im trying to find an innexpensize 3g 4g to wifi device less than 15 per month if possible and put a wifi switch on this on my wifi router and cable modem, so I can still reboot them remotely when the normal internet is down… any suggestions the ones that use the sprint network will not work as it is not avail. in the part of the country I need it


Can you use a cheap prepaid android phone with tasker? Ringplus and Freedompop both offer free cell and data service but they both use Sprint network. There must be some provider that has a barebone service plan for less than $15/month and does not use Spring.

(Larry) #7

getting the att wifi (unite pro)
we already have 15 gig shared data plan of which we use 3-4 per month…
it will be an extra 20 per month… but I think worth it… att works in both locations I need it so I will put it in whichever house is empty at the time and put a couple of wifi switches on it… 1 for router and one for cable modem…

I will have one on the smartthings hub also but that probably can be on my main wifi because if that is not up than rebooting it will do no good anyway.

hopefully I can change the channel to not compete with the other wifi and zigbee… or even better find some good wifi switches that work on 5gig bands

(Michael K) #8

you could just get a plug in appliance module and use smartlighting to create a local smart app to turn the router and modem off each night at 2:00am and another to turn back on at 2:02 am.

then go to

and make sure smart apps are there so you know they will run locally on the hub. (last i read, currently only smartlighting and a little big of the smart home monitor stuff runs locally and then only with built in zwave and zigbee device types.)

wouldn’t be instant when there is a problem but at least every night you know it would try to get back on.

(Derrek Krasnicki ) #9

Anybody try this device http://resetplug.com/index.html