| Author |  | 
      
        | kuph Newbie
 
  
  
 Joined: December 31 2007
 Location: United States
 Online Status: Offline
 Posts: 5
 | 
          Hello all
           | Posted: August 04 2008 at 10:12 | IP Logged |   |  
           | 
 |  Question regarding the macro that is in the sample database. i'm trying to use it and have modified it for my devices. I have set up a trigger to detect a house code and call the motion detected macro, but execution jumps to the end of the macro. i have tried to troubleshoot using the debug info but no entries are displayed for the varibles "local1"  and "temp3". I'm assuming the x10 code is not making it to these variables.
 anyone have any suggestions.
 thanks
 keith
 
 __________________
 Keith
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | BeachBum Super User
 
  
  
 Joined: April 11 2007
 Location: United States
 Online Status: Offline
 Posts: 1880
 | 
          Welcome to PH...
           | Posted: August 04 2008 at 10:51 | IP Logged |   |  
           | 
 |  
 This doesn’t answer your question but might help in resolving the issue. Insert this in your macro.
 
 ph_usermessage(ph_getvar_s(1,0) + "|" + ph_getvar_s(1,1) + "|" + ph_getvar_s(1,2) + "|" + ph_getvar_s(1,3) + "|" + ph_getvar_s(1,4) + "|" + ph_getvar_s(1,5) + "|"  + ph_getvar_s(1,6) + "|" + ph_getvar_s(1,7) + "|" + ph_getvar_s(1,8) + "|" + ph_getvar_s(1,9) + "|" + ph_getvar_s(1,10))
 
 The values if present will be displayed in the Event Log.
 
 __________________
 Pete - X10 Oldie
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | kuph Newbie
 
  
  
 Joined: December 31 2007
 Location: United States
 Online Status: Offline
 Posts: 5
 | 
          Thanks BeachBum, tried your code and all i receive is the house code, no unit code;
           | Posted: August 04 2008 at 20:24 | IP Logged |   |  
           | 
 |  E|0|0|0|0
 
 My understanding "Local1" variable should contain both the house and unit code of the sending module. Is this correct?
 thanks
 
 
 __________________
 Keith
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | BeachBum Super User
 
  
  
 Joined: April 11 2007
 Location: United States
 Online Status: Offline
 Posts: 1880
 | 
          One would think the whole house/unit code would be there. Other than that I don’t have an answer. Not to sound redundant, but if you trigger on the house and unit don’t you already know the house and unit code?
           | Posted: August 04 2008 at 22:33 | IP Logged |   |  
           | 
 |  
 __________________
 Pete - X10 Oldie
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Try the TEMP variables. Pete's code is looking at LOCAL's.
           | Posted: August 04 2008 at 23:10 | IP Logged |   |  
           | 
 |  
 
 
| Code: 
 
    
    | 
      
       | ph_usermessage(ph_getvar_s(2,0) + "|" + ph_getvar_s(2,1) + "|" + ph_getvar_s(2,2) + "|" + ph_getvar_s(2,3) + "|" + ph_getvar_s(2,4) + "|" + ph_getvar_s(2,5) + "|" + ph_getvar_s(2,6) + "|" + ph_getvar_s(2,7) + "|" + ph_getvar_s(2,8) + "|" + ph_getvar_s(2,9) + "|" + ph_getvar_s(2,10)) |  |  |  
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | BeachBum Super User
 
  
  
 Joined: April 11 2007
 Location: United States
 Online Status: Offline
 Posts: 1880
 | 
          When I tested my system it appears TEMP6 has the House code and TEMP7 has the Unit code.
           | Posted: August 05 2008 at 08:17 | IP Logged |   |  
           | 
 |  
 __________________
 Pete - X10 Oldie
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | kuph Newbie
 
  
  
 Joined: December 31 2007
 Location: United States
 Online Status: Offline
 Posts: 5
 | 
          Hello, sorry i didn't get back sooner, out of town for awhile.
           | Posted: August 13 2008 at 15:34 | IP Logged |   |  
           | 
 |  i checked the code and changed it so i can get both local and temp variables. Still only getting the house code, unit code does not show up in either local or temp. could the unit code exist in another variable other than a system?
 thanks
 Keith
 
 __________________
 Keith
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | BeachBum Super User
 
  
  
 Joined: April 11 2007
 Location: United States
 Online Status: Offline
 Posts: 1880
 | 
          I tested mine again and it is actually TEMP 7 and 8 that carry the house/unit. I check the variables in the 1st line of my macro that is called by the trigger. It worked both for ON and OFF.
           | Posted: August 13 2008 at 16:02 | IP Logged |   |  
           | 
 |  
 __________________
 Pete - X10 Oldie
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | kuph Newbie
 
  
  
 Joined: December 31 2007
 Location: United States
 Online Status: Offline
 Posts: 5
 | 
          Here is what i'm receiving, i have it set up to display the local variables then temp
           | Posted: August 14 2008 at 09:07 | IP Logged |   |  
           | 
 |  the incomming x10 code is a E7, which is displayed in the status screen. I use an & as a seperator.
 |E|0|0|0|0|||||&|HOUSECODE E ON|0|2|0||4|E|100|2|
 i then followed your comment that you put this as the first line and here is what i got, which now shows the unit code as well.
 |E|0|0|0|0|||||&|HOUSECODE E ON|0|7|0||4|E|100|2|
 thanks for your help!
 keith
 
 __________________
 Keith
 | 
       
        | Back to Top |     | 
       
       
        |  |