| Author |  | 
      
        | Handman Senior Member
 
  
 
 Joined: February 02 2009
 Location: United States
 Online Status: Offline
 Posts: 229
 | 
          OK, something is really screwy with PH.  It is running slowly again and I can duplicate it.  It happens when my front gate opens at night.  There is an Insteon triggerlinc which signals an access point that the gate has opened.  A PH trigger then looks at whether it is day or night.  During the day it sends an X10 signal to a Universal module which makes three beep tones – an electronic doorbell, so to speak.  At night it does the same thing and it runs a macro turning on yard lights for five minutes.  Because the triggerlinc broadcasts the ON signal twice, I have used Pete’s (BeachBum) method to disable the trigger for five seconds so everything doesn’t happen twice (see Insteon 2421 Triggerlinc .
           | Posted: December 07 2009 at 01:08 | IP Logged |   |  
           | 
 |  http://www.power-home.com/forum/forum_posts.asp?TID=2372&PN= 1)
 
 Here’s what happens:  the triggerlinc signal is received, the yard lights macro is started, and the trigger is disabled and then enabled five seconds later.  Only problem, the macro action happens over the next ten minutes.  The X10 signal turns on exactly 5 minutes after the triggerlinc signal starts the macro.  But, only the housecode is sent, and then, exactly five minutes after that, the second half of the X10 signal is sent!  In the meantime, the relay unit is beeping for the five minutes!  (I.e., 20:33:34 Transmission of Housecode: H, Unit Code: 16; 20:38:34 Transmission of Housecode: H, Command: ON)
 
 
 
   
 One minute twenty seconds later the second triggerlinc ON signal is received, and even though the trigger has been reenabled, the trigger doesn’t fire.  Then, over the next two seconds, all the yard lights turn on and any PH traffic that has taken place in the last ten minutes seems to rush in.
 
 In other words, everything happens, but it’s like it has been in a queue waiting to execute.  Yet nothing appears in PH Status that shows any waiting macros or anything in the execution queue.  The debug file is below in case anyone knows anything about it.
 
 The one thing that happens that may help is the raw insteon log.  As soon as the trigger fires, there is a repeated transmission:  TX     02 63 DC 00
 This doesn’t seem to be an address I recognize but is presumably the X10 H16 ON signal?
 
 The raw log, with redacting for redundancy, is below
 
 2009-12-06  20:28:24.375     RX  &nbs p;  RECEIVEINSTEONRAW=11  B8 04 00 00 01 C7 11 01
 [this is the incoming Triggerlinc ON command which starts the DRIVEWAY GATE OPEN trigger and subsequent FRONT GATE LIGHTS macro.]
 
 2009-12-06  20:28:24.453     TX  &nbs p;  02 63 DC 00
 2009-12-06  20:28:27.453     TX  &nbs p;  02 63 DC 00
 2009-12-06  20:28:30.453     TX  &nbs p;  02 63 DC 00
 2009-12-06  20:28:33.453     TX  &nbs p;  02 63 DC 00
 2009-12-06  20:28:36.453     TX  &nbs p;  02 63 DC 00
 Etc. etc. etc. for ten minutes . . .
 2009-12-06  20:38:12.671     TX  &nbs p;  02 63 D2 80
 2009-12-06  20:38:15.671     TX  &nbs p;  02 63 D2 80
 2009-12-06  20:38:18.671     TX  &nbs p;  02 63 D2 80
 2009-12-06  20:38:21.671     TX  &nbs p;  02 63 D2 80
 2009-12-06  20:38:24.812     TX  &nbs p;  02 62 00 00 C5 CF 11 00
 2009-12-06  20:38:29.812     TX  &nbs p;  02 62 03 7E 0F 45 11 C5
 2009-12-06  20:38:34.812     TX  &nbs p;  02 62 03 7E 0F 45 11 C5
 2009-12-06  20:38:39.812     TX  &nbs p;  02 62 03 7E 0F 45 11 C5
 2009-12-06  20:38:44.812     TX  &nbs p;  02 62 03 C9 7C 45 11 C5
 2009-12-06  20:38:49.812     TX  &nbs p;  02 62 03 C9 7C 45 11 C5
 2009-12-06  20:38:54.812     TX  &nbs p;  02 62 03 C9 7C 45 11 C5
 2009-12-06  20:38:59.812     TX  &nbs p;  02 62 0A AA 94 45 11 C5
 2009-12-06  20:39:04.812     TX  &nbs p;  02 62 0A AA 94 45 11 C5
 2009-12-06  20:39:09.812     TX  &nbs p;  02 62 0A AA 94 45 11 C5
 2009-12-06  20:39:14.812     TX  &nbs p;  02 62 03 79 5C 45 11 C5
 2009-12-06  20:39:19.812     TX  &nbs p;  02 62 03 79 5C 45 11 C5
 2009-12-06  20:39:24.812     TX  &nbs p;  02 62 03 79 5C 45 11 C5
 2009-12-06  20:39:29.937     TX  &nbs p;  02 62 0A AA 94 45 11 C5
 2009-12-06  20:39:34.937     TX  &nbs p;  02 62 0A AA 94 45 11 C5
 2009-12-06  20:39:39.937     TX  &nbs p;  02 62 0A AA 94 45 11 C5
 2009-12-06  20:39:45.750     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.750     RX  &nbs p;  RECEIVEINSTEONRAW=11  B8 04 0F 44 B1 42 11 01
 2009-12-06  20:39:45.812     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.812     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.812     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.812     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.812     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.812     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.812     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.812     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.812     RX  &nbs p;  RECEIVEX10RAW=5E 00
 2009-12-06  20:39:45.875     RX  &nbs p;  RECEIVEX10RAW=52 80
 2009-12-06  20:39:45.953     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.953     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.953     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:45.953     RX  &nbs p;  RECEIVEINSTEONRAW=11  B8 04 00 00 01 C7 13 01
 2009-12-06  20:39:46.015     RX  &nbs p;  RECEIVEINSTEONRAW=11  B8 04 00 00 01 C7 13 01
 2009-12-06  20:39:46.078     RX  &nbs p;  RECEIVEINSTEONRAW=0F  44 B1 11 B8 04 61 13 01
 2009-12-06  20:39:46.140     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:46.140     RX  &nbs p;  RECEIVEINSTEONRAW=11  B8 04 0F 44 B1 43 13 01
 2009-12-06  20:39:46.187     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:46.187     RX  &nbs p;  SENTX10=DC 00 06
 2009-12-06  20:39:46.203     RX  &nbs p;  SENTX10=DC 00 06
 [one whole page of this RX deleted to save space]
 2009-12-06  20:39:46.281     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.281     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.281     RX  &nbs p;  RECEIVEX10RAW=5E 00
 2009-12-06  20:39:46.328     RX  &nbs p;  RECEIVEX10RAW=52 80
 2009-12-06  20:39:46.421     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.421     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.421     RX  &nbs p;  RECEIVEX10RAW=7E 00
 2009-12-06  20:39:46.468     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.468     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.484     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.484     RX  &nbs p;  RECEIVEX10RAW=7E 00
 2009-12-06  20:39:46.531     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.531     RX  &nbs p;  RECEIVEX10RAW=72 80
 2009-12-06  20:39:46.609     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.609     RX  &nbs p;  RECEIVEX10RAW=5E 00
 2009-12-06  20:39:46.656     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.656     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.656     RX  &nbs p;  SENTX10=D2 80 06
 [another whole page of this RX deleted to save space]
 2009-12-06  20:39:46.656     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.734     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.734     RX  &nbs p;  SENTX10=D2 80 06
 2009-12-06  20:39:46.734     RX  &nbs p;  SENTINSTEON=0F 44 B1 00 00 C5 CF 11 00 06
 2009-12-06  20:39:46.812     RX  &nbs p;  SENTINSTEON=0F 44 B1 03 7E 0F 45 11 C5 06
 2009-12-06  20:39:46.828     RX  &nbs p;  RECEIVEINSTEONRAW=03  7E 0F 0F 44 B1 61 11 C5
 2009-12-06  20:39:46.890     RX  &nbs p;  SENTINSTEON=0F 44 B1 03 7E 0F 45 11 C5 06
 2009-12-06  20:39:46.921     RX  &nbs p;  RECEIVEINSTEONRAW=03  7E 0F 0F 44 B1 62 11 C5
 2009-12-06  20:39:46.984     RX  &nbs p;  SENTINSTEON=0F 44 B1 03 7E 0F 45 11 C5 06
 2009-12-06  20:39:47.015     RX  &nbs p;  RECEIVEINSTEONRAW=03  7E 0F 0F 44 B1 62 11 C5
 2009-12-06  20:39:47.078     RX  &nbs p;  SENTINSTEON=0F 44 B1 03 C9 7C 45 11 C5 06
 2009-12-06  20:39:47.093     RX  &nbs p;  RECEIVEINSTEONRAW=03  C9 7C 0F 44 B1 61 11 C5
 2009-12-06  20:39:47.171     RX  &nbs p;  SENTINSTEON=0F 44 B1 03 C9 7C 45 11 C5 06
 2009-12-06  20:39:47.187     RX  &nbs p;  RECEIVEINSTEONRAW=03  C9 7C 0F 44 B1 61 11 C5
 2009-12-06  20:39:47.265     RX  &nbs p;  SENTINSTEON=0F 44 B1 03 C9 7C 45 11 C5 06
 2009-12-06  20:39:47.281     RX  &nbs p;  RECEIVEINSTEONRAW=03  C9 7C 0F 44 B1 61 11 C5
 2009-12-06  20:39:47.343     RX  &nbs p;  SENTINSTEON=0F 44 B1 0A AA 94 45 11 C5 06
 2009-12-06  20:39:47.375     RX  &nbs p;  RECEIVEINSTEONRAW=0A  AA 94 0F 44 B1 61 11 C5
 2009-12-06  20:39:47.437     RX  &nbs p;  SENTINSTEON=0F 44 B1 0A AA 94 45 11 C5 06
 2009-12-06  20:39:47.468     RX  &nbs p;  RECEIVEINSTEONRAW=0A  AA 94 0F 44 B1 61 11 C5
 2009-12-06  20:39:47.531     RX  &nbs p;  SENTINSTEON=0F 44 B1 0A AA 94 45 11 C5 06
 2009-12-06  20:39:47.562     RX  &nbs p;  RECEIVEINSTEONRAW=0A  AA 94 0F 44 B1 61 11 C5
 2009-12-06  20:39:47.625     RX  &nbs p;  SENTINSTEON=0F 44 B1 03 79 5C 45 11 C5 06
 2009-12-06  20:39:47.640     RX  &nbs p;  RECEIVEINSTEONRAW=03  79 5C 0F 44 B1 61 11 C5
 2009-12-06  20:39:47.718     RX  &nbs p;  RECEIVEX10RAW=1E 00
 2009-12-06  20:39:47.765     RX  &nbs p;  RECEIVEX10RAW=13 80
 2009-12-06  20:39:47.843     RX  &nbs p;  SENTINSTEON=0F 44 B1 03 79 5C 45 11 C5 06
 2009-12-06  20:39:47.875     RX  &nbs p;  RECEIVEINSTEONRAW=03  79 5C 0F 44 B1 61 11 C5
 2009-12-06  20:39:47.937     RX  &nbs p;  SENTINSTEON=0F 44 B1 03 79 5C 45 11 C5 06
 2009-12-06  20:39:47.953     RX  &nbs p;  RECEIVEINSTEONRAW=03  79 5C 0F 44 B1 61 11 C5
 2009-12-06  20:39:48.031     RX  &nbs p;  SENTINSTEON=0F 44 B1 0A AA 94 45 11 C5 06
 2009-12-06  20:39:48.046     RX  &nbs p;  RECEIVEINSTEONRAW=0A  AA 94 0F 44 B1 61 11 C5
 2009-12-06  20:39:48.125     RX  &nbs p;  SENTINSTEON=0F 44 B1 0A AA 94 45 11 C5 06
 2009-12-06  20:39:48.140     RX  &nbs p;  RECEIVEINSTEONRAW=0A  AA 94 0F 44 B1 61 11 C5
 2009-12-06  20:39:48.203     RX  &nbs p;  SENTINSTEON=0F 44 B1 0A AA 94 45 11 C5 06
 2009-12-06  20:39:48.234     RX  &nbs p;  RECEIVEINSTEONRAW=0A  AA 94 0F 44 B1 61 11 C5
 
 The trigger contains the following Boolean:
 IF (NOW() >= RELATIVETIME( 00:00:00, [SUNRISE]) AND NOW () < RELATIVETIME (00:00:00, [DUSK]), ph_macroparm("Triggerdisable",5,0,0,0,0) + 1, IF (ph_macroparm("Triggerdisable",5,0,0,0,0) + 1 = 1, Ph_macro ("Front Gate Lights"), 0))
 
 This basically runs the Triggerdisable macro for day and night conditions and runs the FRONT GATE LIGHTS macro for night conditions (unless I've botched it).
 
 
   
 
   
 *** PowerHome Debug Information (2009-12-06 20:29:24.390) ***
 ii_recursion = 1
 ii_logseq = 925
 ii_sequence = 138
 ii_queueptr = 0
 ib_exequeueservice: false
 EXE Queue Rowcount = 0
 EXE Queue Upperbound = 0
 COMM Queue Rowcount = 0
 istr_temp ---
 i_mbret = 0
 i_mbtype = 0
 i_type = 0
 l_macrojumps = 0
 l_macrorow = 0
 s_inputmessage =
 s_inputret =
 s_macroid =
 s_macroreturn = 5
 s_mbmessage =
 s_submacropath =
 [LOCAL1] =
 [LOCAL2] =
 [LOCAL3] =
 [LOCAL4] =
 [LOCAL5] =
 [LOCAL6] =
 [LOCAL7] =
 [LOCAL8] =
 [LOCAL9] =
 [LOCAL10] =
 [TEMP1] = DRIVEWAY GATE OPEN
 [TEMP2] = 199
 [TEMP3] = 1
 [TEMP4] = 1
 [TEMP5] =
 [TEMP6] = 16
 [TEMP7] = GATE TRIGGERLINC
 [TEMP8] = 1
 [TEMP9] = 17
 [TEMP10] = 11.B8.04
 *** Controller Debug Info ***
 ID:
 Controller Number: 1
 Controller Type:
 ---
 ib_connected: false
 ib_process: false
 ii_bufferptr = 0
 ii_buffercurrptr = 0
 ii_sendptr = 0
 ii_port = 0
 *** Controller Debug Info ***
 ID: PLM 2412S
 Controller Number: 2
 Controller Type: INSTEON PLM
 ---
 ib_connected: true
 ib_process: true
 ii_bufferptr = 0
 ii_buffercurrptr = 0
 ii_sendptr = 2
 ii_port = 5
 ii_remoterec = 9
 ii_remoterecbusy = 0
 ii_enroll = 2
 ii_getlinks = 0
 is_plcid = 0F.44.B1
 is_firmware = 7A
 is_port =
 is_devicetype = 0305
 is_remoterec =
 is_waitcmd =
 is_waitcmdret =
 is_srq =
 is_matchaddress = 11.26.E8
 is_reverifyrec =
 is_kpl =
 is_matchaddressp = 11.26.E8
 is_lastsendaddress =
 id_dimpercent = 3.85
 id_bkinterval = 10
 ii_sendcount = 1
 ii_bkptr = 0
 ii_bkcount = 0
 ii_matchcmd = 0
 ii_matchret = 0
 ii_kpl = 0
 ii_event03cnt = 4
 ii_maxfailures = 5
 ii_last40 = 0
 ii_matchretp = 0
 ii_matchcmdp = 19
 ii_hc = 32
 ib_db: true
 ib_bkremoterec: true
 ib_bkstatus: false
 ib_bklocaldata: true
 ib_allowspider: true
 ib_restart: false
 ib_wait: true
 ib_writelocaldata: true
 ib_ackupdate: true
 ib_groupcleanup: true
 *** Controller Debug Info ***
 ID: ELK
 Controller Number: 3
 Controller Type: ELKM1
 ---
 ib_connected: true
 ib_process: false
 ii_bufferptr = 0
 ii_buffercurrptr = 0
 ii_sendptr = 0
 ii_port = 4
 *** Controller Debug Info ***
 ID: VIRTUAL
 Controller Number: 4
 Controller Type: PHVIRTUAL
 ---
 ib_connected: true
 ib_process: false
 ii_bufferptr = 0
 ii_buffercurrptr = 0
 ii_sendptr = 0
 ii_port = 0
 
 
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | grif091 Super User
 
  
 
 Joined: March 26 2008
 Location: United States
 Online Status: Offline
 Posts: 1357
 | 
          Are you issuing powerline commands from within the trigger itself?  I'm pretty sure Dave said that is a no no.  The Raw Log shows X10 commands flooding the powerline for those 10 minutes.  If issuing powerline commands from within the trigger itself, move that activity to a macro.
           | Posted: December 07 2009 at 01:33 | IP Logged |   |  
           | 
 |  
 EDIT: just saw the trigger logic was also posted.  I think the disable is okay within the Boolean field but the trigger action should invoke a macro rather than invoking a macro directly from the Boolean field.
 
 Edited by grif091 - December 07 2009 at 01:36
 
 __________________
 Lee G
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Handman Senior Member
 
  
 
 Joined: February 02 2009
 Location: United States
 Online Status: Offline
 Posts: 229
 | 
          The reason it does that is that during daylight hours a different macro is executed (Front Gate Alert - from within the ACTION field of the trigger) and during nighttime hours, the other macro is executed (Front Gate Lights - from within the Boolean).  I don't really know why issuing a macro from within the Boolean would cause a flood of powerline commands, but if you have a way around it, I am all ears.
           | Posted: December 07 2009 at 01:55 | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | grif091 Super User
 
  
 
 Joined: March 26 2008
 Location: United States
 Online Status: Offline
 Posts: 1357
 | 
          Dave said it had something to do with the task level that Boolean field processing is done at versus the task level outbound PLM communication should occur at.
           | Posted: December 07 2009 at 02:04 | IP Logged |   |  
           | 
 |  
 __________________
 Lee G
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Handman Senior Member
 
  
 
 Joined: February 02 2009
 Location: United States
 Online Status: Offline
 Posts: 229
 | 
          Hmmm.  OK.  I'll think about how to rewrite it.    Basically I want to run one macro with a trigger at day, and another macro for the exact same trigger at night.  I suppose I could just have two triggers and one will execute and the other won't.
           | Posted: December 07 2009 at 02:12 | IP Logged |   |  
           | 
 |  
 Speaking of night, I may have to think about this after some sleep.
   | 
       
        | Back to Top |     | 
       
       
        |  | 
        | grif091 Super User
 
  
 
 Joined: March 26 2008
 Location: United States
 Online Status: Offline
 Posts: 1357
 | 
          Dave's response was to a post you originated.  Discusses moving controller commands out of the Boolean field and into the Action field.
           | Posted: December 07 2009 at 02:15 | IP Logged |   |  
           | 
 |  
 Link to Daves answer regarding Controller commands in Boolean field
 
 __________________
 Lee G
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Handman Senior Member
 
  
 
 Joined: February 02 2009
 Location: United States
 Online Status: Offline
 Posts: 229
 | 
          Great. I can't even remember what Dave has already told me.  I'm hopeless.
           | Posted: December 07 2009 at 02:28 | IP Logged |   |  
           | 
 |   I should have a better feel for this in say, ten years.  So do you think the problem is with my macro or the ph_macroparm.  The latter is straight out of a suggestion from Pete  http://www.power-home.com/forum/forum_posts.asp?TID=2372&PN= 2 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | grif091 Super User
 
  
 
 Joined: March 26 2008
 Location: United States
 Online Status: Offline
 Posts: 1357
 | 
          I would think the ph_macroparm would be okay since nothing in that flow results in controller plm commands.
           | Posted: December 07 2009 at 02:38 | IP Logged |   |  
           | 
 |  
 __________________
 Lee G
 | 
       
        | Back to Top |     | 
       
       
        |  |