Page 1 of 3

Can Indigo power cycle my Airport / DSL Modem / Router?

PostPosted: Fri May 23, 2003 7:40 am
by zwheeloc
I have been thinking about buying Indigo for a problem that I (and many other people) are currently having with the Airport. Many times, I would be online and then the base station crashes. Looking at the status, it cannot find the base station at all on the network. I was thinking if it were possible to set up an Applescript that would ping known addresses (and secondary addresses) every few minutes and when the addresses did not ping back, then send an off code to power off the airport, wait 30 seconds and power it back on. Currently, I dial up, so this would not do me any good currently, but I expect to be on a cable modem soon and thought this might automate the connection on the Internet and take steps to reboot the airport if it goes down. Is this scenerio possible?
Zeff Wheelock

PostPosted: Fri May 23, 2003 8:14 am
by dalenis
This is very easy to do with Indigo and AppleScript. I set up this very thing last week, except I am resetting a router on a dial-up connection. So far this has worked great. I can post the script if you are interested.

PostPosted: Fri May 23, 2003 12:40 pm
by Guest
Defintely. I will probably be buying the software in a couple of weeks once I come online. Thanx!

PostPosted: Tue May 27, 2003 9:05 am
by dalenis
Here is the script I am using to check the Internet connection....it might not be pretty but it works!

I created a Time/Date Action with a Time/Date Trigger to check the connection every 5 minutes to Execute AppleScript listed below.

Code: Select all
property this_URL : "www.apple.com"

--This script is based on a shell script from Apple's website called Qwik Ping
try
   set this_result to do shell script ("/sbin/ping -c 1 " & this_URL) as string
   if this_result does not contain "0%" then
--The above line checks for package loss if there is reset modem

      turn off "Modem"
      delay 3
      turn on "Modem"
      log "Connection failure!"
   end if

--If error is returned also reset modem

on error error_message
   turn off "Modem"
   delay 3
   turn on "Modem"
   log "Connection failure!"
end try

Hello, not an apple scripter, How do we edit this script?

PostPosted: Wed Jun 11, 2008 10:43 am
by rcts
Hello, and thanks for this info. I have a house in Az and I want to be able to reset my router & cable modem.

I don't know how to do the scripts yet, as I have never tried, how do we edit this to work with an airport extreme rather than with a dial as your doing? Or what are you actually doing with this script with your hardware.

Can you help us newbee's that don't know about this stuff?

Thanks in advance.

Reg

:oops:

Re: Hello, not an apple scripter, How do we edit this script

PostPosted: Wed Jun 11, 2008 3:34 pm
by fyellin
I'm assuming that the script writer is using a LampLinc or something like that which just plugs into an outlet, and that the Airport is plugged into the LampLinc. The LampLinc is named "Modem" and just happens not to have a lamp plugged into it at all.

This script should work fine with any sort of router. Just change "Modem" to be whatever device name you've given to your LampLinc.

(Make sure to use the switched socket of the LampLinc, the one on the bottom, and not the pass through socket on the front).

PostPosted: Fri Jun 13, 2008 11:28 am
by bjojade
You should use an appliance linc, not a lamp linc. If you inadvertently dimmed the lamp linc, you could damage the gear plugged into it.

PostPosted: Fri Jun 13, 2008 12:26 pm
by fyellin
bjojade wrote:
You should use an appliance linc, not a lamp linc. If you inadvertently dimmed the lamp linc, you could damage the gear plugged into it.

Absolutely. Thanks for the important correction.

PostPosted: Fri Jun 13, 2008 12:41 pm
by ebsubman
Great post ! .... now can someone think of a way to verify if a 2414U is functioning properly ? and if not, automatically upload the internal program and settings ! This is somewhat satire (unless it CAN be done) because I just happen to be one of those who seem to be having trouble with flakey 2414U interface running in standalone mode. Seems that every week or so I come home a dark house and have to reload the 2414U to get things running again. :(

PostPosted: Fri Jun 13, 2008 8:24 pm
by bobeast
ebsubman wrote:
Great post ! .... now can someone think of a way to verify if a 2414U is functioning properly ? and if not, automatically upload the internal program and settings ! This is somewhat satire (unless it CAN be done) because I just happen to be one of those who seem to be having trouble with flakey 2414U interface running in standalone mode. Seems that every week or so I come home a dark house and have to reload the 2414U to get things running again. :(


You can do it, but you'll need to buy another 2414U to control it all ;)

PostPosted: Sat Jun 14, 2008 12:12 pm
by bjojade
ebsubman wrote:
Great post ! .... now can someone think of a way to verify if a 2414U is functioning properly ? and if not, automatically upload the internal program and settings ! This is somewhat satire (unless it CAN be done) because I just happen to be one of those who seem to be having trouble with flakey 2414U interface running in standalone mode. Seems that every week or so I come home a dark house and have to reload the 2414U to get things running again. :(


If your problem is the 2141U running in standalone mode, why not just leave your computer running?

Thank you for the applescript

PostPosted: Wed Jun 25, 2008 11:38 am
by stevewco
I have done exactly as you have written except I delayed the power cycle by 10. I know that chips need time to reset and I have been thought to wait at least 10 sec to 15 sec to let them reset. Anyway the script works great and I commend you for it!

Thanks

steve :D

Wish I knew what you meant

PostPosted: Sat Dec 20, 2008 3:42 pm
by sblinder
I was just today trying to address the issue of my airport and router locking up and having my wife and son go ballistic on me. I have always had to crawl under a desk and start unplugging everything. So today I thought I would try programming the letter C on my 6 keypad Link. I may have done things backwards but I plugged the appliance module in with everything attached and then pushed the C button to put it into linking mode. I hit the little button on the side of the appliance link and got the little click and thought all was well. I tried it and by pressing the C button once in a great while it will turn my configuration off, my question is to turn it back on do I just hit the C button again?

What you guys are doing would be a dream come true for me, I don't even know where to input this script data you speak of. I start confusing the directions for the script and then the script makes no sense because I dont see how you are identifying Insteon modules with no addresses. If anybody would like to help me make this easy I would appreciate it. The button idea my wife thought was a GREAT idea until she saw it didn't work, having it be an automatic thing would be SO NICE, I might even have a peaceful afternoon of learning instead of listening to the yelling.

Thanks
Steve :?

Indigo Power Cycles Modem, Routers, Server, and 2414U USB?

PostPosted: Sat Jan 17, 2009 9:22 pm
by gadgetnut
Hello, everyone. I've been thinking about this and the concept is starting to look like an MC Escher drawing in my brain. Can anyone help?

I have a server running 24/7 doing various functions including Indigo 3 operations connected to home's power supply via 2414U. I want to be able to reliably log into this unattended remote server remotely from hundreds of miles away. Any number of things can go wrong on the server, at different times requiring rebooting the cable modem, routers, the server computer itself (Mac Pro) and sometimes even unplugging and plugging in again the 2414U to get Indigo working again. After doing any or all the above, my server environment has always been put back to normal.

How can I make all this happen? I began with the script earlier in this topic, which as I understand it keeps looking for a working internet connection every 5 minutes and if it doesn't get it, it power cycles the cable modem. I could batch the cable modem and the routers power supplies together, but what happens if the server computer is hung and needs power cycling? (Without that computer I don't have any control of Indigo.) I could make this same script also cut off the Mac Pro's power supply, and with preferences set properly the computer should restart after a "power outage," but with Indigo down, how will I turn the Appliance Module that the computer is plugged into back on?

I have an extra 2414U USB module... could I upload say just one trigger to it, where if it receives a Mac Pro Appliance Module off command, it turns that module on? I tried this, but it seems the 2414U is not able to upload and process time delays and I wanted the computer to stay off for 15 seconds, not just 1 second, etc.

In thinking back eight years ago, I had an X-10 Telecommander device on the phone line and with some codes you could control X-10 modules. That would be another, internet-independent way to power cycle all these things, but I'm thinking about moving towards VOiP telephone, see problem 1: who turns everything back on? Would appreciate any help. Thanks.

PostPosted: Sun Jan 18, 2009 6:54 am
by BillC
gadgetnut:

There are a number of commercial solutions available (google "remote power switch") ranging from a couple hundred bucks to a thousand or so. These are power strips with outlets that are relay controlled on, off, and off-pause-on. They have their own web interface and IP address in your network.

To be completely bulletproof, as you seem to be realizing, you will need two separate paths into your network: internet service from two different providers, with two remote switches in cross connect: Switch A is on IP A and controls the equipment on IP B, and vice versa for Switch B. (all you need on the second IP provider is the cable or dsl modem and the switch).

You could conceivably get by with one ip address and a separate (i.e., non-voip) telephone line. There are some remote switches available with built-in modems that connect directly to the phone line; you would use that switch to control all the other gear that you might need to power cycle.

[edit] This doesn't use Indigo or Insteon, it's a separate system (which, for reliability, it should be...as you note, if your server goes down, you don't have Indigo or Applescript available anyway). [/edit]