| Author | 
         | 
         
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: September 19 2021 at 09:36 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi Dave - Sorry to report this, but I think there is a bug in the new 
 version (I just installed it).  I have an INITIALIZE routine.  After PH 
 is up and running, if I run INITIALIZE from inside PH it runs 
 perfectly.  However, When I start up PH and it runs INITIALIZE 
 itself as part of initialization, it runs the first few lines and then 
 stops.  If I disable the first line of code after where it stops, the 
 remaining INITIALIZE routine runs properly even as part of PH 
 initialization.  So basically, I have a line of code in my INITIALIZE 
 routine that causes PH to terminate the macro prematurely when it 
 runs on powerup.   In the screenshot that I will try to attach - line 60 
 is the culprit.  If I skip 60 (and 70, though I don't think 70 is an 
 issue) all works perfectly at all times.  But if I do not skip 60, the 
 INITIALIZE exits after line 50 when run as part of PH Initialization 
 (but not when run manually).   I have also (if it worked) uploaded a 
 log snippet to back this up.   I can live skipping 60 and 70 for a few 
 days so I won't revert.  Please let me know what you think.  
 Thanks!
 /j2021-09-19_093615_PHINITIALIZEBUG.zip
  Edited by dhoward - September 19 2021 at 13:41
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: September 19 2021 at 11:43 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
I have now identified at least one other MACRO that runs fine when I 
 trigger it manually, but exits without a trace after about 4 instructions 
 when triggered by a TRIGGER.  
 
 Hopefully Dave has some ideas - I have to revert to the older version 
 of PH before the old database gets too old.  I can switch back  after I 
 have some clue why this might happen.
 
 Thanks!
 /j
 
  Edited by jeffw_00 - September 19 2021 at 13:20
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: September 19 2021 at 13:48 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Jeff,
 
 Took a look at your screenshots. Appears that the problem line is a ph_insteonwithret() function.
 
 The controller startup routine changed with version 2.2 so what is happening is that you're trying to execute the ph_insteonwithret() 
 function before the Insteon controller has fully initialized.
 
 What I would do is place a Wait statement as the first line of your macro. This should get you past the slowdown in the new controller 
 startup routines. You could even check the Temp variables to see if the macro is being launched as a part of the INIT trigger and bypass 
 the Wait if the macro is launched manually.
 
 Hope this helps,
 
 Dave.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: September 19 2021 at 14:20 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi Dave - sorry - I didn't mention that I tried a WAIT 10 before the 
 statement to no avail.  How long would you wait? 
 
 And what should I do about my other failure?  It's also reproducible - 
 when I start the MACRO via the TRIGGER I get different results than 
 when I start it with a right-click-Play.
 
 I think the one in INITIALIZE may be a symptom of a more general 
 issue :-(
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         dhoward Admin Group 
          
  
  Joined: June 29 2001 Location: United States
 Online Status: Offline Posts: 4447
          | 
        
         
          
           | Posted: September 19 2021 at 14:30 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Jeff,
 
 Alot of it will depend upon how many Insteon devices you have defined. In version 2.2, the Insteon controller first queries the entire database 
 from the PLM (you can watch this on the Insteon Explorer and should be able to time how long this process takes).
 
 I may have misunderstood the problem. I thought the issue was calling the macro from the STARTUP trigger. If there is a problem calling the 
 macro from a normal trigger that typically executes after PowerHome is fully launched, we may have a different issue. In that case, it would be 
 best to post or send the full macro and one of the triggers that causes the issue.
 
 Let me know,
 
 Dave.
 
         | 
       
       
        | Back to Top | 
         
          
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: September 19 2021 at 14:52 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi Dave - originally I thought it was an init thing - until I noticed 
 another Macro dying unexpectedly.  I've attached the code - it dies 
 somewhere after the marked line 100 and before line 220 (it's hard 
 to tell exactly because not every line produces a log entry).  Again - 
 I can trigger it and see the failure, and then Play it and it runs.  I 
 really hope this can be root-caused because finding and 
 individually fixing every situation could be painful...
 
 Thanks in advance for any thoughts you have.
 /j
 
 When I have time later I'll try to switch back to the new version and 
 "time" the init - but if it's a lot longer than 10 seconds that seems 
 like a problem to solve generally?
  Edited by jeffw_00 - September 19 2021 at 14:52
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: September 19 2021 at 14:56 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
can't seem to do the upload - trying again (it was a few KB over the 
 limit - (sigh)  you might consider doubling your limits :-)
 
 2021-09-
 19_145525_Capture.zip
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   | 
      
        
         
         jeffw_00 Super User 
          
 
  Joined: June 30 2007
 Online Status: Offline Posts: 935
          | 
        
         
          
           | Posted: September 19 2021 at 15:12 | IP Logged
		     | 
                    
            		  
           | 
           
          
           
  | 
           
          
Hi Dave - ignore the prior post - I made some time - I need about 30 
 seconds (not horrible) for the database to load.
 
 The other issue is not repeatable anymore - hold off on solving it until I 
 can better recreate it (or maybe it was something I missed that was 
 transient that was causing it).
 
 anyway - thanks as always for the quick response-all good 4 now
 /j
  Edited by jeffw_00 - September 19 2021 at 15:17
         | 
       
       
        | Back to Top | 
         
          
         | 
       
       
       
        |   |