Elk rule to remote control output

sbwright

Member
A little background.
 
We have 2 locations our main residence and a remote location, approx. 40 minute drive. The 2 sites are connected via VPN over the internet. On occassion the internet connection at the remote site hangs dropping the connection, requiring a drive to reboot the modem and router. I have spent several hours trying to track down the issue with no success(lots of finger pointing). Thankfully with rules provided by Ultrajones and help from others on this site ELK/HomeSeer notify me when this situation occurs.
 
So moved on and connected the modem and router power to 2 outputs on the ELK so they can be rebooted via the phone line. To begin with I would like to manually initiate the reboot via the phone line however ultimately I would like ELK to manage this its self upon noticing the dropped connection.
 
Here is a first stab at the rules I put together to form a Task that can be initiated over the phone. I have limited experience at writing rules in the ELK and hoping others here with more experience may contribute any corrections, thoughts, or improvements?
 
rule.png
 
I was surprised that it was going to take 4 rules to complete the task as in the ELK rules turning an output ON has attributes for a time length option but turning an output OFF does not. What's up with that ELK? 
 
All help appreciated,
Brian
 
You sure you want "every 1 minute".  Its going to take 2 hours to reboot.
 
If you want to interrupt the power on something, connect the power to the output board such that the power is always on, i.e. leads to the output relay's common and n/c.  
 
then burp the power with
 
whenever task 4 is activated
   turn output 23 on 90 seconds
   turn output 24 on 120 seconds
 
This toggles the relay, thereby shutting off the power, for the given duration.
 
I don't think the Elk by itself has the smarts to detect a dropped connection via rules. 
 
You'd have to have "something else" on site that would monitor the internet connection then trip an input zone configured as non-alarm when it drops, then
 
when zone 99 is violated
  (reset modem/router)
  
 
 
Good catch on the 1 minute, changed to 1 second
 
I have the leads on the common and N/C leads, which I thought meant power is on when output is on,
 
BUT I think you are saying power is on when output is off?
 
I have some communication rules between the Elk and HomeSeer that identify the lost connection.
 
Thanks for the help
 
When the relay is OFF, the COM is connected to N/C.   Think of this as the default (output off) state.
When the relay is ON, the COM is connected to N/O.  Think of this as the triggered (output on) state.
 
So yes, when you connect the power leads to Com-N/C, the power is on when the output is -off-.
 
You don't need all the counter mumbo-jumbo, just turn each of the outputs -on- for the number of seconds you want the power off.
 
But you probably want something more like
   turn output 23 off 15 seconds  #  this turns off the modem for 15 seconds
   turn output 24 off 15+(modem reboot) seconds #  this turns off the router for 15 seconds plus the time it takes to reboot the modem
 
I have no experience with Homeseer, but if it can detect the internet drop and tell the elk to start task 4, then you've got it.
 
FYI, you may not want to spend $105, but there is a device that does all of this automatically.  I believe it even delays turning on the power of one outlet so you can plug the cable modem in one and the router in the other, then have the cable modem power cycle first (to obtain a connection and acquire a WAN IP address), then after a timed delay, cycle the router.
 
I first saw this unit at a CES show a couple of years ago and did THIS report on it.
 
Thanks sda for straightening me out on the output operation.
 
BraveSirRobbin, that is a cool device may have to order a couple. Thanks for the heads up.
 
The other one that's popular is the Web Power Switch (although their web designer should be fired) if you need more outlets.  I have a couple of them at customer installations to reboot equipment remotely.
 
One other thing to note - if there's a legitimate outage on your internet, that thing is going to get constantly rebooted - most watchdog type devices have a manual counter to pay attention and if they've rebooted 3 times or so they'll stop trying.  I'd probably add a few extra rules so that if it reboots, it doesn't try to reboot again for 30 minutes.
 
Back
Top