Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Scripting - general question Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
etsolow
Newbie
Newbie


Joined: June 17 2004
Location: United States
Online Status: Offline
Posts: 3
Posted: June 17 2004 at 16:45 | IP Logged Quote etsolow

Here's what I'm hoping to do:  create a script that will ping an IP address -- if that ping fails, cycle power on my DSL router.  I'd like this script to run every hour, without having to have a large, memory intensive GUI open at all times.  Will the PowerHome package allow me to do this?

(I have a PowerLinc controller on order, and have not even downloaded or installed PowerHome... please forgive my lack of experience on this subject!)

Thanks!

Back to Top View etsolow's Profile Search for other posts by etsolow
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: June 17 2004 at 19:16 | IP Logged Quote TonyNo

If you are already using PH to control things, and you have an X-10 module between the wall and the router's power supply, then, yes! I run a macro that does this.

If you would just be using PH for this, it would be more than overkill.

Let us know, and, we'll point you in the right direction!

Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: June 17 2004 at 21:38 | IP Logged Quote dhoward

I knew I should've waited to eat dinner .

Tony's got you covered.  While PowerHome cant specifically "ping", it does include functions to retrieve a URL.  If the URL retrieval comes back blank or times out, you can assume the router needs rebooting, which PowerHome can do using a Powerlinc.

Another minor point.  PowerHome only currently supports the RS-232 version of the PowerLinc and not the USB version.  I am working on adding this support as we speak, but this controller is being a bear so Im not there yet.

Also, as Tony pointed out...PowerHome would be overkill if this is all you were doing.  PowerHome is a rather large GUI driven application and while I don't like to think of it as "memory intensive", its not lite either.

Hope this helps,

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
etsolow
Newbie
Newbie


Joined: June 17 2004
Location: United States
Online Status: Offline
Posts: 3
Posted: June 17 2004 at 23:18 | IP Logged Quote etsolow

Quote: Originally posted by TonyNo on June 17 2004

If you would just be using PH for this, it would be more than overkill.

Let us know, and, we'll point you in the right direction!


Thanks for the quick replies, guys.

Yeah, this router power-cycle is all I need right now.  I'd love to find a simple command-line EXE that takes arguments and could be called from a script.  If PH doesn't work with the PowerLinc USB, looks like that won't work for me anyway!

Back to Top View etsolow's Profile Search for other posts by etsolow
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: June 18 2004 at 10:29 | IP Logged Quote dhoward

etsolow,

Happened to catch your posts on tivocommunity.com (scary that Im everywhere ).  I think you're going to run into some problems with the PowerLinc USB.  Smarthome does not include the protocol that this controller uses and will only give it out to a select few.  I believe a trial or slimmed down version of their Automation software is included though.  However, it wont have the functionality to ping an IP address. 

Based upon what you want to do, you may want to look at the CM17A or firecracker interface.  This is a simple RF X-10 interface and is capable of simple X-10 control such as turning modules off and on.  If you look around, X10.com will sometimes have specials on the whole firecracker kit where they give it away for free and you just pay shipping and handling (about $7.00).  You would have everything you need to power cycle your router in the one package.  The protocol for communicating is well documented and there are a number of lightweight control packages as well as command-line utilities for this interface.

Hope this helps,

Dave.

 

Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
etsolow
Newbie
Newbie


Joined: June 17 2004
Location: United States
Online Status: Offline
Posts: 3
Posted: June 18 2004 at 10:36 | IP Logged Quote etsolow

Thanks for the info!  (And stop following me! )

I'll look into the x10 firecracker if I can't get the PowerLinc USB to do what I want.

Eli

Back to Top View etsolow's Profile Search for other posts by etsolow
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum