| Author |  | 
      
        | martlist Newbie
 
  
 
 Joined: January 07 2007
 Online Status: Offline
 Posts: 31
 | 
          I searched the forums and saw this asked once but not answered with an
           | Posted: October 22 2007 at 00:10 | IP Logged |   |  
           | 
 |  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 |     | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Here's what I use...
           | Posted: October 22 2007 at 07:19 | IP Logged |   |  
           | 
 |  
 
 
| 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 |       | 
       
       
        |  | 
        | BeachBum Super User
 
  
  
 Joined: April 11 2007
 Location: United States
 Online Status: Offline
 Posts: 1880
 | 
          Curious Tony.. What does DSL OFF and DSL ON do??
           | Posted: October 23 2007 at 13:26 | IP Logged |   |  
           | 
 |  
 __________________
 Pete - X10 Oldie
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Heh. I use macros for device control so that I only need to update one location to cover module/function/technology changes...
           | Posted: October 23 2007 at 14:14 | IP Logged |   |  
           | 
 |  
 DSL OFF:
 10  Device Control INSTEON+DSL MODEM+OFF
 
 DSL ON:
 10  Device Control INSTEON+DSL MODEM+ON
 
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | BeachBum Super User
 
  
  
 Joined: April 11 2007
 Location: United States
 Online Status: Offline
 Posts: 1880
 | 
          
           | Posted: October 23 2007 at 14:21 | IP Logged |   |  
           | 
 |   Thks... 
 __________________
 Pete - X10 Oldie
 | 
       
        | Back to Top |     | 
       
       
        |  |