Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Rebooting a router Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
martlist
Newbie
Newbie


Joined: January 07 2007
Online Status: Offline
Posts: 31
Posted: October 22 2007 at 00:10 | IP Logged Quote martlist

I searched the forums and saw this asked once but not answered with an
actual example macro or script.

Basically I want to reboot my router whenever the computer detects the
connection is down. I know I can right a macro to check a url and wait for a
response or timeout, but I wondered if someone had already got this
working as I just know I will hit lots of corner cases and problems.

If someone has a time tested way to d this it would be great if you were
willing to share.

A binus would be to reboot if the router is also slow, but not completely
dead.
Back to Top View martlist's Profile Search for other posts by martlist
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: October 22 2007 at 07:19 | IP Logged Quote TonyNo

Here's what I use...

Code:
10 Jump if( {INTERNET FLAG}=0, 999, 1)      
20 Jump if( ph_ping( "google.com", 128) < 0, 1, 999)      
30 Jump if( ph_ping( "yahoo.com", 128) < 0, 1, 999)      
40 Formula ph_playsound( "ralert.wav", 0)      
50 TTS "Internet connection down! Resetting D S L modem."
60 Macro DSL OFF
70 Create Timed Event DSL ON ph_relativedatetime( today(), 1)



I use the GV INTERNET FLAG as an enable for this routine, so that I can manually disable it if necessary.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: October 23 2007 at 13:26 | IP Logged Quote BeachBum

Curious Tony.. What does DSL OFF and DSL ON do??

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: October 23 2007 at 14:14 | IP Logged Quote TonyNo

Heh. I use macros for device control so that I only need to update one location to cover module/function/technology changes...

DSL OFF:
10 Device Control INSTEON+DSL MODEM+OFF

DSL ON:
10 Device Control INSTEON+DSL MODEM+ON
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
BeachBum
Super User
Super User
Avatar

Joined: April 11 2007
Location: United States
Online Status: Offline
Posts: 1880
Posted: October 23 2007 at 14:21 | IP Logged Quote BeachBum

Thks...

__________________
Pete - X10 Oldie
Back to Top View BeachBum's Profile Search for other posts by BeachBum
 

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