| Author | 
         | 
         
      
        
         
         smarty Super User 
          
  
  Joined: May 21 2006 Location: United States
 Online Status: Offline Posts: 729
          | 
        
         
          
           | Posted: March 10 2017 at 20:59 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Not sure if this might be related to some of the other "time out" behaviors I have previously bug reported, but here is what I see for the "ph_ping1" function.
 
 Background - I have a "system checker" type macro that runs on a timed event (every 20 minutes).  Whenever my ISP goes down, I find that my "system checker" macro starts to hang/slow/etc. my PH system.  I have traced this down to my internet check where I try to ping services outside of my local network....like Google or yahoo.  Originally I used a function like:
 
 ph_ping("yahoo.com",255) ... if my internet is down, it would take about 12-14 seconds to return and tell me that...(too long).
 
 So, I started playing with ph_ping1 function because it has a timeout)...but for whatever reason, the timeout does not stop the function within the allotted timeout time.
 
 ...not sure if this is important,...but I do my testing of these functions in the "Formula Builder" box that pops up when you double click on a formula in a macro line.
  __________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         gg102 Senior Member 
          
 
  Joined: January 29 2013 Location: United States
 Online Status: Offline Posts: 246
          | 
        
         
          
           | Posted: March 10 2017 at 21:10 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
My experience is that the ph_ping() and ph_ping1() suspend PH until the ph_ping function completes.  For me, I do not 
 like suspending PH.  I also ping google to make sure my internet connection is running.  I launch a hidden DOS .BAT 
 using a .VBS script.  My .BAT writes a .TXT file that I have PH trigger on.  I outlined my process in this thread if 
 you're interested.
 
  http://www.power-home.com/forum/forum_posts.asp?TID=10702&PN =1
 
 Hope it helps.
 
 
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: March 11 2017 at 14:30 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I'll add this as a bug to my todo list and see if I can 
 make the function adhere to the timeout value.
 
 Dave.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   |