Stargate Resources Projects Contact US Polls Forums Quiz
 


 
 
 

John Hearty - Schedule   

Schedule
--------
Schedule Name: HEARTY.SCH 
  SCHEDULE START   
    
  EVENT:  First pass setup 
  If 
    First pass through schedule 
  Then 
    (V:Year)   load with Year 
    (V:Day of month)   load with Date 
    (T:Alarm audit) LOAD with 0:01:00 
  End 
    
  EVENT:  Sequence 11 on 
  If 
    XSEQ:( J-1 J-ON J-1 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-1  FR light) ON 
  End 
    
  EVENT:  Sequence 11 off 
  If 
    XSEQ:( J-1 J-ON J-1 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-1  FR light) OFF 
  End 
    
  EVENT:  Sequence 12 on 
  If 
    XSEQ:( J-1 J-ON J-2 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-2  FR fan) ON 
  End 
    
  EVENT:  Sequence 12 off 
  If 
    XSEQ:( J-1 J-ON J-2 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-2  FR fan) OFF 
  End 
    
  EVENT:  Sequence 13 on 
  If 
    XSEQ:( J-1 J-ON J-3 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-3  Mantle light) ON 
  End 
    
  EVENT:  Sequence 13 off 
  If 
    XSEQ:( J-1 J-ON J-3 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-3  Mantle light) OFF 
  End 
    
  EVENT:  Sequence 14 on 
  If 
    XSEQ:( J-1 J-ON J-4 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-4  Back porch light) ON 
  End 
    
  EVENT:  Sequence 14 off 
  If 
    XSEQ:( J-1 J-ON J-4 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-4  Back porch light) OFF 
  End 
    
  EVENT:  Sequence 15 on 
  If 
    XSEQ:( J-1 J-ON J-5 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-5  Brkfstnook light) ON 
  End 
    
  EVENT:  Sequence 15 off 
  If 
    XSEQ:( J-1 J-ON J-5 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-5  Brkfstnook light) OFF 
  End 
    
  EVENT:  Sequence 16 on 
  If 
    XSEQ:( J-1 J-ON J-6 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-6  Kitchen flourec) ON 
  End 
    
  EVENT:  Sequence 16 off 
  If 
    XSEQ:( J-1 J-ON J-6 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-6  Kitchen flourec) OFF 
  End 
    
  EVENT:  Sequence 17 on 
  If 
    XSEQ:( J-1 J-ON J-7 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-7  Pantry light) ON 
  End 
    
  EVENT:  Sequence 17 off 
  If 
    XSEQ:( J-1 J-ON J-7 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-7  Pantry light) OFF 
  End 
    
  EVENT:  Sequence 18 on 
  If 
    XSEQ:( J-1 J-ON J-8 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-8  Washcloset light) ON 
  End 
    
  EVENT:  Sequence 18 off 
  If 
    XSEQ:( J-1 J-ON J-8 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-8  Washcloset light) OFF 
  End 
    
  EVENT:  Sequence 19 on 
  If 
    XSEQ:( J-1 J-ON J-9 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-9  Sink light) ON 
  End 
    
  EVENT:  Sequence 19 off 
  If 
    XSEQ:( J-1 J-ON J-9 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-9  Sink light) OFF 
  End 
    
  EVENT:  Sequence 110 on 
  If 
    XSEQ:( J-1 J-ON J-10 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-10  DR light) ON 
  End 
    
  EVENT:  Sequence 110 off 
  If 
    XSEQ:( J-1 J-ON J-10 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-10  DR light) OFF 
  End 
    
  EVENT:  Sequence 111 on 
  If 
    XSEQ:( J-1 J-ON J-11 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-11  Frnt porch light) ON 
  End 
    
  EVENT:  Sequence 111 off 
  If 
    XSEQ:( J-1 J-ON J-11 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-11  Frnt porch light) OFF 
  End 
    
  EVENT:  Sequence 112 on 
  If 
    XSEQ:( J-1 J-ON J-12 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-12  Foyer light) ON 
  End 
    
  EVENT:  Sequence 112 off 
  If 
    XSEQ:( J-1 J-ON J-12 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-12  Foyer light) OFF 
  End 
    
  EVENT:  Sequence 113 on 
  If 
    XSEQ:( J-1 J-ON J-13 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-13  LR light) ON 
  End 
    
  EVENT:  Sequence 113 off 
  If 
    XSEQ:( J-1 J-ON J-13 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-13  LR light) OFF 
  End 
    
  EVENT:  Sequence 114 on 
  If 
    XSEQ:( J-1 J-ON J-14 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-14  Powder rm light) ON 
  End 
    
  EVENT:  Sequence 114 off 
  If 
    XSEQ:( J-1 J-ON J-14 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-14  Powder rm light) OFF 
  End 
    
  EVENT:  Sequence 115 on 
  If 
    XSEQ:( J-1 J-ON J-15 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-15  ) ON 
  End 
    
  EVENT:  Sequence 115 off 
  If 
    XSEQ:( J-1 J-ON J-15 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-15  ) OFF 
  End 
    
  EVENT:  Sequence 116 on 
  If 
    XSEQ:( J-1 J-ON J-16 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-16  1st fl thrmostat) ON 
  End 
    
  EVENT:  Sequence 116 off 
  If 
    XSEQ:( J-1 J-ON J-16 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-16  1st fl thrmostat) OFF 
  End 
    
  EVENT:  Sequence 21 on 
  If 
    XSEQ:( J-2 J-ON J-1 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-1  MBR light) ON 
  End 
    
  EVENT:  Sequence 21 off 
  If 
    XSEQ:( J-2 J-ON J-1 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-1  MBR light) OFF 
  End 
    
  EVENT:  Sequence 22 on 
  If 
    XSEQ:( J-2 J-ON J-2 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-2  MBR fan) ON 
  End 
    
  EVENT:  Sequence 22 off 
  If 
    XSEQ:( J-2 J-ON J-2 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-2  MBR fan) OFF 
  End 
    
  EVENT:  Sequence 23 on 
  If 
    XSEQ:( J-2 J-ON J-3 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-3  Mster bath light) ON 
  End 
    
  EVENT:  Sequence 23 off 
  If 
    XSEQ:( J-2 J-ON J-3 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-3  Mster bath light) OFF 
  End 
    
  EVENT:  Sequence 24 on 
  If 
    XSEQ:( J-2 J-ON J-4 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-4  Mster tub light) ON 
  End 
    
  EVENT:  Sequence 24 off 
  If 
    XSEQ:( J-2 J-ON J-4 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-4  Mster tub light) OFF 
  End 
    
  EVENT:  Sequence 25 on 
  If 
    XSEQ:( J-2 J-ON J-5 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-5  Mster closet) ON 
  End 
    
  EVENT:  Sequence 25 off 
  If 
    XSEQ:( J-2 J-ON J-5 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-5  Mster closet) OFF 
  End 
    
  EVENT:  Sequence 26 on 
  If 
    XSEQ:( J-2 J-ON J-6 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-6  Computer light) ON 
  End 
    
  EVENT:  Sequence 26 off 
  If 
    XSEQ:( J-2 J-ON J-6 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-6  Computer light) OFF 
  End 
    
  EVENT:  Sequence 27 on 
  If 
    XSEQ:( J-2 J-ON J-7 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-7  Uppr porch light) ON 
  End 
    
  EVENT:  Sequence 27 off 
  If 
    XSEQ:( J-2 J-ON J-7 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-7  Uppr porch light) OFF 
  End 
    
  EVENT:  Sequence 28 on 
  If 
    XSEQ:( J-2 J-ON J-8 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-8  BR4 light) ON 
  End 
    
  EVENT:  Sequence 28 off 
  If 
    XSEQ:( J-2 J-ON J-8 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-8  BR4 light) OFF 
  End 
    
  EVENT:  Sequence 29 on 
  If 
    XSEQ:( J-2 J-ON J-9 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-9  BR4 fan) ON 
  End 
    
  EVENT:  Sequence 29 off 
  If 
    XSEQ:( J-2 J-ON J-9 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-9  BR4 fan) OFF 
  End 
    
  EVENT:  Sequence 210 on 
  If 
    XSEQ:( J-2 J-ON J-10 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-10  Hall light) ON 
  End 
    
  EVENT:  Sequence 210 off 
  If 
    XSEQ:( J-2 J-ON J-10 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-10  Hall light) OFF 
  End 
    
  EVENT:  Sequence 211 on 
  If 
    XSEQ:( J-2 J-ON J-11 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-11  Upper bath light) ON 
  End 
    
  EVENT:  Sequence 211 off 
  If 
    XSEQ:( J-2 J-ON J-11 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-11  Upper bath light) OFF 
  End 
    
  EVENT:  Sequence 212 on 
  If 
    XSEQ:( J-2 J-ON J-12 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-12  BR3 light) ON 
  End 
    
  EVENT:  Sequence 212 off 
  If 
    XSEQ:( J-2 J-ON J-12 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-12  BR3 light) OFF 
  End 
    
  EVENT:  Sequence 213 on 
  If 
    XSEQ:( J-2 J-ON J-13 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-13  BR3 fan) ON 
  End 
    
  EVENT:  Sequence 213 off 
  If 
    XSEQ:( J-2 J-ON J-13 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-13  BR3 fan) OFF 
  End 
    
  EVENT:  Sequence 214 on 
  If 
    XSEQ:( J-2 J-ON J-14 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-14  BR2 light) ON 
  End 
    
  EVENT:  Sequence 214 off 
  If 
    XSEQ:( J-2 J-ON J-14 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-14  BR2 light) OFF 
  End 
    
  EVENT:  Sequence 215 on 
  If 
    XSEQ:( J-2 J-ON J-15 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-15  Holiday lights) ON 
  End 
    
  EVENT:  Sequence 215 off 
  If 
    XSEQ:( J-2 J-ON J-15 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-15  Holiday lights) OFF 
  End 
    
  EVENT:  Sequence 216 on 
  If 
    XSEQ:( J-2 J-ON J-16 J-ON ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-16  2nd fl thrmostat) ON 
  End 
    
  EVENT:  Sequence 216 off 
  If 
    XSEQ:( J-2 J-ON J-16 J-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (I-16  2nd fl thrmostat) OFF 
  End 
    
  EVENT:  Sequence M2 on 
  If 
    XSEQ:( M-2 M-ON ) Received within 2 seconds [Receive Only] 
  Then 
    X10:  (I-2  MBR fan) ON 
  End 
    
  EVENT:  Sequence M2 off 
  If 
    XSEQ:( M-2 M-OFF ) Received within 2 seconds [Receive Only] 
  Then 
    X10:  (I-2  MBR fan) OFF 
  End 
    
  EVENT:  Sequence M3 on 
  If 
    XSEQ:( M-3 M-ON ) Received within 2 seconds [Receive Only] 
  Then 
    X10:  (I-3  Mster bath light) ON 
  End 
    
  EVENT:  Sequence M3 off 
  If 
    XSEQ:( M-3 M-OFF ) Received within 2 seconds [Receive Only] 
  Then 
    X10:  (I-3  Mster bath light) OFF 
  End 
    
  EVENT:  All lights on 
  If 
    XSEQ:( M-All L ON ) Received within 2 seconds  
    or  XSEQ:( H-All L ON ) Received within 2 seconds  
  Then 
    X10: H - All Lights ON 
    X10: I - All Lights ON 
    X10:  (M-6  ) Set State to IDLE 
  End 
    
  EVENT:  All units off 
  If 
    XSEQ:( M-All U OFF ) Received within 2 seconds  
    or  XSEQ:( H-All U OFF ) Received within 2 seconds [Receive Only] 
  Then 
     If 
       X10: (H-16  1st fl thrmostat) is ON  
     Then 
       (F:1st Fl Therm on)  SET 
     Else 
       (F:1st Fl Therm on)  CLEAR 
      Nest End 
     If 
       X10: (I-16  2nd fl thrmostat) is ON  
     Then 
       (F:2nd Fl Therm on)  SET 
     Else 
       (F:2nd Fl Therm on)  CLEAR 
      Nest End 
    X10: H - All Units OFF 
    X10: I - All Units OFF 
    DELAY  0:00:04 
     If 
       (F:1st Fl Therm on) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) ON 
      Nest End 
     If 
       (F:2nd Fl Therm on) is SET 
     Then 
       X10:  (I-16  2nd fl thrmostat) ON 
      Nest End 
    X10:  (M-6  ) Set State to IDLE 
  End 
    
  EVENT:  Demand weather report 
  If 
    XSEQ:( M-5 ) Received within 2 seconds  
    or  XSEQ:( J-5 ) Received within 2 seconds  
  Then 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
    Voice:Weather Report  [Spkr,Line] SYNC 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  End 
    
  EVENT:  Goodnight routine 
  If 
    XSEQ:( M-8 M-OFF ) Received within 2 seconds  
    and  (F:Good night) is CLEAR 
      -OR- 
    Time is 11:15 PM SMTWTFS 
    and  (F:Good night) is CLEAR 
  Then 
    X10:  (I-10  Hall light) PRE-Set Level   6 % 
    X10:  (I-1  MBR light) PRE-Set Level   6 % 
    X10:  (I-12  BR3 light) PRE-Set Level   6 % 
    X10:  (I-3  Mster bath light) PRE-Set Level  16 % 
     If 
       X10: (I-2  MBR fan) is ON  
     Then 
       (F:MBR fan was on)  SET 
     Else 
       (F:MBR fan was on)  CLEAR 
      Nest End 
     If 
       X10: (I-13  BR3 fan) is ON  
     Then 
       (F:BR3 fan was on)  SET 
     Else 
       (F:BR3 fan was on)  CLEAR 
      Nest End 
     If 
       X10: (I-15  Holiday lights) is ON  
     Then 
       (F:Holiday lites on)  SET 
     Else 
       (F:Holiday lites on)  CLEAR 
      Nest End 
    DELAY  0:00:07 
    X10: H - All Units OFF 
    X10: I - All Units OFF 
    (THEN MACRO:Set alarm) 
    DELAY  0:00:04 
     If 
       (F:MBR fan was on) is SET 
     Then 
       X10:  (I-2  MBR fan) ON 
      Nest End 
     If 
       (F:BR3 fan was on) is SET 
     Then 
       X10:  (I-13  BR3 fan) ON 
      Nest End 
     If 
       (F:Holiday lites on) is SET 
     Then 
       X10:  (I-15  Holiday lights) ON 
      Nest End 
     If 
       (F:Heating Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) ON 
      Nest End 
     If 
       (F:Cooling Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) OFF 
      Nest End 
    DELAY  0:00:20 
    (F:Good night)  SET 
  End 
    
  EVENT:  Goodmorn-Nightlight bright reset 
  If 
    XSEQ:( M-8 M-ON ) Received within 2 seconds  
    and  (F:Good night) is SET 
      -OR- 
    Time is 9:00 AM SMTWTFS 
    and  (F:Good night) is SET 
  Then 
    (F:Good night)  CLEAR 
     If 
       X10: (I-10  Hall light) is ON  
     Then 
       (F:Hall was on)  SET 
     Else 
       (F:Hall was on)  CLEAR 
      Nest End 
    X10:  (I-10  Hall light) PRE-Set Level  100% 
    DELAY  0:00:04 
     If 
       (F:Hall was on) is CLEAR 
     Then 
       X10:  (I-10  Hall light) OFF 
      Nest End 
     If 
       X10: (I-1  MBR light) is ON  
     Then 
       (F:MBR was on)  SET 
     Else 
       (F:MBR was on)  CLEAR 
      Nest End 
    X10:  (I-1  MBR light) PRE-Set Level  100% 
    DELAY  0:00:04 
     If 
       (F:MBR was on) is CLEAR 
     Then 
       X10:  (I-1  MBR light) OFF 
      Nest End 
     If 
       X10: (I-12  BR3 light) is ON  
     Then 
       (F:Girls rm was on)  SET 
     Else 
       (F:Girls rm was on)  CLEAR 
      Nest End 
    X10:  (I-12  BR3 light) PRE-Set Level  100% 
    DELAY  0:00:04 
     If 
       (F:Girls rm was on) is CLEAR 
     Then 
       X10:  (I-12  BR3 light) OFF 
      Nest End 
     If 
       X10: (I-3  Mster bath light) is ON  
     Then 
       (F:Mastr bth was on)  SET 
     Else 
       (F:Mastr bth was on)  CLEAR 
      Nest End 
    X10:  (I-3  Mster bath light) PRE-Set Level  100% 
    DELAY  0:00:04 
     If 
       (F:Mastr bth was on) is CLEAR 
     Then 
       X10:  (I-3  Mster bath light) OFF 
      Nest End 
     If 
       Time is Before 9:00 AM SMTWTFS 
       and  (DI:Alarm armed) is ON 
         -OR- 
       Time is After 9:01 AM SMTWTFS 
       and  (DI:Alarm armed) is ON 
     Then 
       (RELAY:Alarm toggle) ON  
       DELAY  0:00:01 
       (RELAY:Alarm toggle) OFF  
      Nest End 
    DELAY  0:00:10 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
     If 
       Time is After 12:01 AM SMTWTFS 
       and  Time is Before 11:59 AM SMTWTFS 
     Then 
       Voice:GOODMORN SILENCEQ  [Spkr,Line] SYNC 
      Nest End 
     If 
       Time is After 12:01 PM SMTWTFS 
       and  Time is Before 5:59 PM SMTWTFS 
     Then 
       Voice:GOOD AFTERNOO SILENCEQ  [Spkr,Line] SYNC 
      Nest End 
    Voice:TODAYIS <day hh:mm am/pm>Weather Report  [Spkr,Line] SYNC 
    " Below reminders also play when " 
    " alarm deactivates via that event " 
    " check but wanted to add here too " 
    (THEN MACRO:Holiday/reminder) 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  End 
    
  EVENT:  Alarm toggle timer for motn warn 
  If 
    (DI:Alarm armed) Toggles  
  Then 
    (T:Alrm toggle timr) LOAD with 0:01:30 
  End 
    
  FASTEVENT:  Hall night motio [ DI:Hll/str motn Goes OFF]  
  Then 
    (T:Hall IDL) LOAD with 0:04:00 
     If 
       (DI:Hall fotocel) is ON 
     Then 
       X10:  (I-10  Hall light) ON 
      Nest End 
     If 
       (F:Alarm active) is SET 
       and  (F:Good night) is CLEAR 
       and  (T:Alrm toggle timr) is Not Running 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:WARNING SILENCE1 ALARM IS ACTIVE  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  End 
    
  EVENT:  Hall motion retrigger 
  If 
    (DI:Hll/str motn) Goes OFF 
    and  (T:Hall IDL) is Running 
    " Need this retrigger so light  " 
    " stays on.  Can't use retrigger " 
    " in prev event as photocel goes " 
    " off when light turns on. " 
  Then 
    (T:Hall IDL) LOAD with 0:04:00 
  End 
    
  EVENT:  Hall light off 
  If 
    (T:Hall IDL) is Expiring 
  Then 
    X10:  (I-10  Hall light) OFF 
  End 
    
  FASTEVENT:  Closet light mot [ DI:Mbath closet Goes OFF]  
  Then 
     If 
       X10: (I-5  Mster closet) is not ON  
     Then 
       X10:  (I-5  Mster closet) ON 
      Nest End 
    (T:MBR closet IDL) LOAD with 0:01:00 
  End 
    
  EVENT:  Master closet light off 
  If 
    (T:MBR closet IDL) is Expiring 
  Then 
     If 
       (DI:Mbath closet) is OFF 
     Then 
       (T:MBR closet IDL) LOAD with 0:01:00 
     Else 
       X10:  (I-5  Mster closet) OFF 
      Nest End 
  End 
    
  FASTEVENT:  MBR night motion [ DI:MBR Motion Goes OFF]  
  Then 
     If 
       (F:Good night) is SET 
     Then 
       (T:MBR IDL) LOAD with 0:00:15 
     Else 
       (T:MBR IDL) LOAD with 0:10:00 
      Nest End 
     If 
       Time is After (TL:Getting Dark)  
       and  (T:MBR ON) is Not Running 
         -OR- 
       Time is Before (TL:Getting Light)  
       and  (T:MBR ON) is Not Running 
     Then 
        If 
          X10: (I-1  MBR light) is not ON  
        Then 
          X10:  (I-1  MBR light) ON 
         Nest End 
      Nest End 
     If 
       (F:Alarm active) is SET 
       and  (F:Good night) is CLEAR 
       and  (T:Alrm toggle timr) is Not Running 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:WARNING SILENCE1 ALARM IS ACTIVE  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  End 
    
  EVENT:  MBR light motion off 
  If 
    (T:MBR IDL) is Expiring 
    and  (T:MBR ON) is Not Running 
  Then 
    X10:  (I-1  MBR light) OFF 
  End 
    
  EVENT:  MBR lock on received 
  If 
    XSEQ:( I-1 I-ON ) Received within 2 seconds [Receive Only] 
      -OR- 
    XSEQ:( M-1 M-ON ) Received within 2 seconds [Receive Only] 
  Then 
    (V:MBR lock mins)  INCREMENT 
    X10:  (I-1  MBR light) ON 
     If 
       (V:MBR lock mins) = 1 
     Then 
       (T:MBR ON) LOAD with 0:30:00 
       (T:MBR IDL)  CLEAR 
      Nest End 
     If 
       (V:MBR lock mins) = 2 
     Then 
       (T:MBR ON) LOAD with 1:00:00 
      Nest End 
     If 
       (V:MBR lock mins) = 3 
     Then 
       (T:MBR ON) LOAD with 1:30:00 
      Nest End 
     If 
       (V:MBR lock mins) = 4 
     Then 
       (T:MBR ON) LOAD with 2:00:00 
      Nest End 
  End 
    
  EVENT:  MBR light lock off 
  If 
    (T:MBR ON) is Expiring 
      -OR- 
    XSEQ:( M-1 M-OFF ) Received within 2 seconds [Receive Only] 
      -OR- 
    XSEQ:( I-1 I-OFF ) Received within 2 seconds [Receive Only] 
  Then 
    X10:  (I-1  MBR light) OFF 
    (V:MBR lock mins)   CLEAR 
    (T:MBR ON)  CLEAR 
  End 
    
  EVENT:  Upper shared bath night motion 
  If 
    (DI:Uppr bth mot) Goes OFF 
  Then 
     If 
       (F:Alarm active) is SET 
       and  (F:Good night) is CLEAR 
       and  (T:Alrm toggle timr) is Not Running 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:WARNING SILENCE1 ALARM IS ACTIVE  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
     If 
       Time is After (TL:Getting Dark)  
       or  Time is Before (TL:Getting Light)  
     Then 
        If 
          (F:Good night) is SET 
        Then 
          X10:  (I-11  Upper bath light) Set Level  60 % 
        Else 
          X10:  (I-11  Upper bath light) ON 
         Nest End 
       DELAY  0:04:00 Re-Triggerable 
       X10:  (I-11  Upper bath light) OFF 
      Nest End 
  End 
    
  FASTEVENT:  BR3 night motion [ DI:BR3 motion Goes OFF]  
  Then 
     If 
       (F:Good night) is SET 
     Then 
       (T:BR3 IDL) LOAD with 0:00:15 
     Else 
       (T:BR3 IDL) LOAD with 0:10:00 
      Nest End 
     If 
       Time is After (TL:Getting Dark)  
       or  Time is Before (TL:Getting Light)  
     Then 
        If 
          X10: (I-12  BR3 light) is not ON  
        Then 
          X10:  (I-12  BR3 light) ON 
         Nest End 
      Nest End 
     If 
       (F:Alarm active) is SET 
       and  (F:Good night) is CLEAR 
       and  (T:Alrm toggle timr) is Not Running 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:WARNING SILENCE1 ALARM IS ACTIVE  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  End 
    
  EVENT:  BR3 light motion off 
  If 
    (T:BR3 IDL) is Expiring 
  Then 
    X10:  (I-12  BR3 light) OFF 
  End 
    
  FASTEVENT:  BR4 night motion [ DI:BR4 motion Goes OFF]  
  Then 
     If 
       (F:Good night) is SET 
     Then 
       (T:BR4 IDL) LOAD with 0:00:15 
     Else 
       (T:BR4 IDL) LOAD with 0:10:00 
      Nest End 
     If 
       Time is After (TL:Getting Dark)  
       or  Time is Before (TL:Getting Light)  
     Then 
        If 
          X10: (I-8  BR4 light) is not ON  
        Then 
          X10:  (I-8  BR4 light) ON 
         Nest End 
      Nest End 
     If 
       (F:Alarm active) is SET 
       and  (F:Good night) is CLEAR 
       and  (T:Alrm toggle timr) is Not Running 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:WARNING SILENCE1 ALARM IS ACTIVE  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  End 
    
  EVENT:  BR4 light motion off 
  If 
    (T:BR4 IDL) is Expiring 
  Then 
    X10:  (I-8  BR4 light) OFF 
  End 
    
  FASTEVENT:  Mbath night motn [ DI:Mbath Motion Goes OFF]  
  Then 
     If 
       Time is After 5:00 AM SMTWTFS 
       and  Time is Before 9:00 AM SMTWTFS 
     Then 
       (T:Master bath IDL) LOAD with 0:10:00 
     Else 
        If 
          Time is Before 10:00 PM SMTWTFS 
          and  Time is After (TL:Getting Dark)  
        Then 
          (T:Master bath IDL) LOAD with 0:12:00 
        Else 
          (T:Master bath IDL) LOAD with 0:04:00 
         Nest End 
      Nest End 
     If 
       Time is After (TL:Getting Dark)  
       or  Time is Before (TL:Getting Light)  
     Then 
        If 
          X10: (I-3  Mster bath light) is not ON  
        Then 
          X10:  (I-3  Mster bath light) ON 
         Nest End 
      Nest End 
     If 
       (F:Alarm active) is SET 
       and  (F:Good night) is CLEAR 
       and  (T:Alrm toggle timr) is Not Running 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:WARNING SILENCE1 ALARM IS ACTIVE  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  End 
    
  EVENT:  Mbath light motion off 
  If 
    (T:Master bath IDL) is Expiring 
  Then 
    X10:  (I-3  Mster bath light) OFF 
  End 
    
  FASTEVENT:  BR2 night motion [ DI:BR2 motion Goes OFF]  
  Then 
     If 
       (F:Good night) is SET 
     Then 
       (T:BR2 IDL) LOAD with 0:00:15 
     Else 
       (T:BR2 IDL) LOAD with 0:10:00 
      Nest End 
     If 
       Time is After (TL:Getting Dark)  
       or  Time is Before (TL:Getting Light)  
     Then 
        If 
          X10: (I-14  BR2 light) is not ON  
        Then 
          X10:  (I-14  BR2 light) ON 
         Nest End 
      Nest End 
     If 
       (F:Alarm active) is SET 
       and  (F:Good night) is CLEAR 
       and  (T:Alrm toggle timr) is Not Running 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:WARNING SILENCE1 ALARM IS ACTIVE  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  End 
    
  EVENT:  BR2 light motion off 
  If 
    (T:BR2 IDL) is Expiring 
  Then 
    X10:  (I-14  BR2 light) OFF 
  End 
    
  EVENT:  Going in frnt door/foyer lite on 
  If 
    (DI:Zn1 ft door) Goes ON 
    and  (F:Alarm active) is SET 
    and  (T:Alarm exit delay) is Not Running 
  Then 
     If 
       Time is After (TL:Getting Dark)  
       or  Time is Before (TL:Getting Light)  
     Then 
       X10:  (H-12  Foyer light) ON 
       DELAY  0:01:00 
       X10:  (H-12  Foyer light) OFF 
      Nest End 
  End 
    
  EVENT:  Out front door/porch lite on 
  If 
    (DI:Zn1 ft door) Goes ON 
  Then 
     If 
       (T:Alarm exit delay) is Running 
       " Only going out if exit delay run " 
     Then 
        If 
          Time is After (TL:Getting Dark)  
          or  Time is Before (TL:Getting Light)  
        Then 
          X10:  (H-11  Frnt porch light) ON 
          DELAY  0:01:00 
          X10:  (H-11  Frnt porch light) OFF 
         Nest End 
      Nest End 
     If 
       (F:Alarm active) is CLEAR 
       " Could be going in or out. " 
     Then 
        If 
          Time is After (TL:Getting Dark)  
          or  Time is Before (TL:Getting Light)  
        Then 
          X10:  (H-11  Frnt porch light) ON 
          X10:  (H-12  Foyer light) ON 
          DELAY  0:01:00 
          X10:  (H-11  Frnt porch light) OFF 
          X10:  (H-12  Foyer light) OFF 
         Nest End 
      Nest End 
  End 
    
  EVENT:  Out back door/porch lite on 
  If 
    (DI:Zn3 bk dr/wn) Goes ON 
  Then 
     If 
       Time is After (TL:Getting Dark)  
       or  Time is Before (TL:Getting Light)  
     Then 
       X10:  (H-4  Back porch light) ON 
       DELAY  0:01:00 
       X10:  (H-4  Back porch light) OFF 
      Nest End 
  End 
    
  EVENT:  Window open-HVAC setback 
  If 
    (DI:Zn1 ft door) Goes ON 
      -OR- 
    (DI:Zn2 garage) Goes ON 
      -OR- 
    (DI:Zn3 bk dr/wn) Goes ON 
      -OR- 
    (DI:Zn4 ft wins) Goes ON 
  Then 
    (V:Open window cnt)  INCREMENT 
     If 
       (F:Heating Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) ON 
       X10:  (I-16  2nd fl thrmostat) ON 
      Nest End 
     If 
       (F:Cooling Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) OFF 
       X10:  (I-16  2nd fl thrmostat) OFF 
      Nest End 
  End 
    
  EVENT:  Window close-HVAC normalize 
  If 
    (DI:Zn1 ft door) Goes OFF 
      -OR- 
    (DI:Zn2 garage) Goes OFF 
      -OR- 
    (DI:Zn3 bk dr/wn) Goes OFF 
      -OR- 
    (DI:Zn4 ft wins) Goes OFF 
  Then 
    (V:Open window cnt)  DECREMENT 
     If 
       (V:Open window cnt) = 0 
       and  (F:Heating Season) is SET 
       and  (F:Alarm active) is Not SET 
     Then 
       X10:  (H-16  1st fl thrmostat) OFF 
       X10:  (I-16  2nd fl thrmostat) OFF 
      Nest End 
     If 
       (V:Open window cnt) = 0 
       and  (F:Cooling Season) is SET 
       and  (F:Alarm active) is Not SET 
     Then 
       X10:  (H-16  1st fl thrmostat) ON 
       X10:  (I-16  2nd fl thrmostat) ON 
      Nest End 
  End 
    
  EVENT:  Powder bath motion 
  If 
    XSEQ:( H-14 H-ON ) Received within 4 seconds [Receive Only] 
      -OR- 
    XSEQ:( H-15 H-OFF ) Received within 4 seconds [Receive Only] 
  Then 
    X10:  (H-14  Powder rm light) ON 
    DELAY  0:04:00 Re-Triggerable 
    X10:  (H-14  Powder rm light) OFF 
  End 
    
  EVENT:  Front porch motion 
  If 
    X10: (J-9  Front motion) is ON  
    and  Time is Dark (after SunSet, before SunRise) 
  Then 
    X10:  (H-11  Frnt porch light) ON 
    (T:Front porch IDL) LOAD with 0:01:00 
    X10:  (J-9  Front motion) IDLE 
  End 
    
  EVENT:  Front porch off 
  If 
    (T:Front porch IDL) is Expiring 
  Then 
    X10:  (H-11  Frnt porch light) OFF 
  End 
    
  EVENT:  Halloween season 
  If 
    X10: (J-9  Front motion) is ON  
    and  Date is After Oct  16 
    and  Date is Before Oct  31 
  Then 
    X10:  (J-9  Front motion) IDLE 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
     If 
       (F:Good night) is CLEAR 
     Then 
       Voice:GHOST  [Spkr,Line] 
      Nest End 
     If 
       X10: (I-15  Holiday lights) is ON  
     Then 
       X10:  (I-15  Holiday lights) OFF 
       DELAY  0:00:01 
       X10:  (I-15  Holiday lights) ON 
       DELAY  0:00:01 
       X10:  (I-15  Holiday lights) OFF 
       DELAY  0:00:01 
       X10:  (I-15  Holiday lights) ON 
       DELAY  0:00:01 
       X10:  (I-15  Holiday lights) OFF 
       DELAY  0:00:01 
       X10:  (I-15  Holiday lights) ON 
      Nest End 
    DELAY  0:00:04 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  End 
    
  EVENT:  Halloween day 
  If 
    X10: (J-9  Front motion) is ON  
    and  Date is Oct  31 
  Then 
    X10:  (J-9  Front motion) IDLE 
     If 
       (F:Good night) is CLEAR 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:GHOST  [Spkr,Line] 
       X10: I - All Lights ON 
       DELAY  0:00:01 
       X10: I - All Units OFF 
       DELAY  0:00:01 
       X10: I - All Lights ON 
       DELAY  0:00:01 
       X10: I - All Units OFF 
       DELAY  0:00:01 
       X10: I - All Lights ON 
       DELAY  0:00:01 
       X10: I - All Units OFF 
       DELAY  0:00:01 
       X10: I - All Lights ON 
       DELAY  0:00:01 
       X10: I - All Units OFF 
       X10:  (I-15  Holiday lights) ON 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  End 
    
  EVENT:  Christmas sounds 
  If 
    X10: (J-9  Front motion) is ON  
    and  Date is After Nov  26 
    and  Date is Before Dec  26 
    and  (T:Recent frnt motn) is Not Running 
  Then 
    X10:  (J-9  Front motion) IDLE 
    (T:Recent frnt motn) LOAD with 0:15:00 
     If 
       (F:Good night) is CLEAR 
       and  (F:Alarm active) is CLEAR 
     Then 
      * Frozen *   Audio:Connect Line Level In to Spkr 
       " Line in goes thru relays to keep " 
       " disconected except when needed " 
       " due to ground loop problem. " 
      * Frozen *   (RELAY:Line-out gnd) ON  
      * Frozen *   (RELAY:Line-out sig) ON  
      * Frozen *   (RELAY:Line-in sgnl) ON  
      * Frozen *   (RELAY:Line-in gnd) ON  
       ASCII-Out:'@@wondrlnd.wav' [COM1] 
       DELAY  0:00:15 
      * Frozen *   Audio:Disconnect Line Level In to Spkr 
      * Frozen *   (RELAY:Line-in sgnl) OFF  
      * Frozen *   (RELAY:Line-in gnd) OFF  
      * Frozen *   (RELAY:Line-out gnd) OFF  
      * Frozen *   (RELAY:Line-out sig) OFF  
      Nest End 
  Else 
    X10:  (J-9  Front motion) IDLE 
  End 
    
  EVENT:  Dark outside 
  If 
    X10: (J-10  Front photocell) is ON  
  Then 
    (F:Dark outside)  SET 
    " Christmas or halloween lights on " 
     If 
       Date is After Oct  16 
       and  Date is Before Oct  31 
         -OR- 
       Date is After Nov  26 
       and  Date is Before Dec  31 
     Then 
       X10:  (I-15  Holiday lights) ON 
      Nest End 
  End 
    
  EVENT:  Holiday lights off 
  If 
    Time is 11:00 PM SMTWTFS 
  Then 
    X10:  (I-15  Holiday lights) OFF 
  End 
    
  EVENT:  Dark outside reset 
  If 
    X10: (J-10  Front photocell) is OFF  
  Then 
    (F:Dark outside)  CLEAR 
  End 
    
  EVENT:  Doorbell 
  If 
    (DI:Doorbell) Goes ON 
    and  (F:Alarm active) is Not SET 
    and  Date is After Oct  16 
    and  Date is Before Nov  1 
  Then 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
    Voice:DINGDONG GHOST  [Spkr,Line] SYNC 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  Else 
     If 
       (DI:Doorbell) Goes ON 
       and  (F:Alarm active) is Not SET 
       and  Date is After Nov  26 
       and  Date is Before Dec  26 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:DINGDONG TONE_E TONE_E TONE_E SILENCEQ TONE_E TONE_E TONE_E 
SILENCEQ TONE_E TONE_G TONE_C TONE_D TONE_E  [Spkr,Line] SYNC 
      * Frozen *   Audio:Connect Line Level In to Spkr 
       " Line in goes thru relays to keep " 
       " disconected except when needed " 
       " due to ground loop problem. " 
      * Frozen *   (RELAY:Line-in sgnl) ON  
      * Frozen *   (RELAY:Line-in gnd) ON  
       ASCII-Out:'@@jnglbels.wav' [COM1] 
       DELAY  0:00:20 
      * Frozen *   Audio:Disconnect Line Level In to Spkr 
      * Frozen *   (RELAY:Line-in sgnl) OFF  
      * Frozen *   (RELAY:Line-in gnd) OFF  
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
     Else 
        If 
          (DI:Doorbell) Goes ON 
          and  (F:Alarm active) is Not SET 
        Then 
          (RELAY:Line-out gnd) ON  
          (RELAY:Line-out sig) ON  
          Voice:DINGDONG  [Spkr,Line] SYNC 
          Voice:BARK2 SILENCE1 BARK2 BARK2  [Spkr,Line] SYNC 
          (RELAY:Line-out gnd) OFF  
          (RELAY:Line-out sig) OFF  
         Nest End 
      Nest End 
  End 
    
  EVENT:  Lost keys code check 1 
  If 
    (DI:Doorbell) Goes ON 
    and  (F:Alarm active) is SET 
  Then 
    (T:Generic use timr) LOAD with 0:00:02 
    (V:Lost keys digit)  INCREMENT 
  End 
    
  EVENT:  Lost keys code check 2 
  If 
    (F:Alarm active) is SET 
    and  (T:Generic use timr) is Expiring 
  Then 
    (V:Lost keys digit#)  INCREMENT 
     If 
       (V:Lost keys digit#) = 1 
       and  (V:Lost keys digit) != 9 
     Then 
       (V:Lost keys digit#)   CLEAR 
      Nest End 
     If 
       (V:Lost keys digit#) = 2 
       and  (V:Lost keys digit) != 9 
     Then 
       (V:Lost keys digit#)   CLEAR 
      Nest End 
     If 
       (V:Lost keys digit#) = 3 
       and  (V:Lost keys digit) != 9 
     Then 
       (V:Lost keys digit#)   CLEAR 
      Nest End 
     If 
       (V:Lost keys digit#) = 4 
       and  (V:Lost keys digit) != 9 
     Then 
       (V:Lost keys digit#)   CLEAR 
      Nest End 
     If 
       (V:Lost keys digit#) = 4 
       and  (V:Lost keys digit) = 9 
     Then 
       (RELAY:Garage door) ON  
       DELAY  0:00:01 
       (RELAY:Garage door) OFF  
       DELAY  0:00:10 
       (RELAY:Alarm toggle) ON  
       DELAY  0:00:01 
       (RELAY:Alarm toggle) OFF  
       (V:Lost keys digit#)   CLEAR 
      Nest End 
    (V:Lost keys digit)   CLEAR 
  End 
    
  EVENT:  Floor 2 Thermostat setback 
  If 
    Time is 7:45 AM SMTWTFS 
    and  (F:Holiday) is CLEAR 
  Then 
     If 
       (F:Cooling Season) is SET 
     Then 
       X10:  (I-16  2nd fl thrmostat) OFF 
      Nest End 
     If 
       (F:Heating Season) is SET 
     Then 
       X10:  (I-16  2nd fl thrmostat) ON 
      Nest End 
  End 
    
  EVENT:  Floor 2 Thermostat normalized 
  If 
    Time is 6:00 PM SMTWTFS 
  Then 
     If 
       (F:Cooling Season) is SET 
     Then 
       X10:  (I-16  2nd fl thrmostat) ON 
      Nest End 
     If 
       (F:Heating Season) is SET 
     Then 
       X10:  (I-16  2nd fl thrmostat) OFF 
      Nest End 
  End 
    
  EVENT:  Floor 1 Thermostat setback 
  If 
    Time is 7:45 AM .MTWTF. 
    or  Time is 10:00 PM SMTWTFS 
      -AND- 
    (F:Holiday) is CLEAR 
  Then 
     If 
       (F:Cooling Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) OFF 
      Nest End 
     If 
       (F:Heating Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) ON 
      Nest End 
  End 
    
  EVENT:  Floor 1 Thermostat normalized 
  If 
    Time is 5:00 PM .MTWTF. 
    or  Time is 5:45 AM SMTWTFS 
  Then 
     If 
       (F:Cooling Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) ON 
      Nest End 
     If 
       (F:Heating Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) OFF 
      Nest End 
  End 
    
  EVENT:  Weather report capture 
  If 
    Time is 5:50 AM SMTWTFS 
    or  Time is 8:35 AM S.....S 
    or  XSEQ:( J-6 ) Received within 2 seconds  
    or  XSEQ:( M-6 ) Received within 2 seconds  
      -AND- 
    CO: Is ON Hook 
  Then 
    TelePhone Out:'^9726212200,,,,,,9726' 
     If 
       Time is 5:50 AM .MTWT.. 
     Then 
       Record:'Weather Report' from CO Line for 48 seconds 
     Else 
       Record:'Weather Report' from CO Line for 52 seconds 
      Nest End 
    TelePhone Out:'+' 
     If 
       X10: (J-6  Controller 6) is not IDLE  
       or  X10: (M-6  ) is not IDLE  
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:Weather Report  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
       X10:  (J-6  Controller 6) IDLE 
       X10:  (M-6  ) IDLE 
      Nest End 
  End 
    
  EVENT:  Intercom access 
  If 
    ICM: Is OFF Hook 
  Then 
    Audio:Connect ICM In to Spkr 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
    Audio:Connect ICM In to Line Level Out 
    DELAY  0:00:05 
    Audio:Disconnect ICM In to Spkr 
    Audio:Disconnect ICM In to Line Level Out 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  End 
    
  EVENT:  PA off 
  If 
    TelePhone Seq:'*' Received within 1 seconds  
    or  TelePhone Seq:'#' Received within 1 seconds  
      -AND- 
    (RELAY:Line-out gnd) is ON 
  Then 
    Audio:Disconnect ICM In to Spkr 
    Audio:Disconnect ICM In to Line Level Out 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  End 
    
  EVENT:  Call return 
  If 
    TelePhone Seq:'*69' Received within 3 seconds  
    and  CallerID: ?????????? 
    " Above line verifies last CID was " 
    " valid, not private or unknown. " 
  Then 
    Audio:Disconnect ICM In to Spkr 
    Audio:Disconnect ICM In to Line Level Out 
    DELAY  0:00:01 
    Voice:PRESS LINE 1  [ICM] 
     If 
       TelePhone Seq:'^' Received within 4 seconds  
     Then 
       DELAY  0:00:01 
        If 
          CallerID: 972??????? 
          or  CallerID: 214??????? 
        Then 
          DELAY  0:00:01 
          " Local NPAs that don't dial 1. " 
        Else 
          TelePhone Out:'1' 
          DELAY  0:00:01 
         Nest End 
       (V:Temp VAR1)  LOAD with (V:CID NPA digit 1) 
       (V:Temp VAR1)  = (V:Temp VAR1) * 10 
       (V:Temp VAR1)  = (V:Temp VAR1) + (V:CID NPA digit 2) 
         load user_VAR with another variable(V:Temp VAR1)  
       TelePhone Out:'V' 
         load user_VAR with another variable(V:CID NPA digit 3)  
       TelePhone Out:'V' 
       (V:Temp VAR1)  LOAD with (V:CID NXX digit 1) 
       (V:Temp VAR1)  = (V:Temp VAR1) * 10 
       (V:Temp VAR1)  = (V:Temp VAR1) + (V:CID NXX digit 2) 
         load user_VAR with another variable(V:Temp VAR1)  
       TelePhone Out:'V' 
         load user_VAR with another variable(V:CID NXX digit 3)  
       TelePhone Out:'V' 
        If 
          (V:CID XXXX digit 1) = 0 
        Then 
            load user_VAR with another variable(V:CID XXXX digit 1)  
          TelePhone Out:'V' 
            load user_VAR with another variable(V:CID XXXX digit 2)  
          TelePhone Out:'V' 
        Else 
          (V:Temp VAR1)  LOAD with (V:CID XXXX digit 1) 
          (V:Temp VAR1)  = (V:Temp VAR1) * 10 
          (V:Temp VAR1)  = (V:Temp VAR1) + (V:CID XXXX digit 2) 
            load user_VAR with another variable(V:Temp VAR1)  
          TelePhone Out:'V' 
         Nest End 
        If 
          (V:CID XXXX digit 3) = 0 
        Then 
            load user_VAR with another variable(V:CID XXXX digit 3)  
          TelePhone Out:'V' 
            load user_VAR with another variable(V:CID XXXX digit 4)  
          TelePhone Out:'V' 
        Else 
          (V:Temp VAR1)  LOAD with (V:CID XXXX digit 3) 
          (V:Temp VAR1)  = (V:Temp VAR1) * 10 
          (V:Temp VAR1)  = (V:Temp VAR1) + (V:CID XXXX digit 4) 
            load user_VAR with another variable(V:Temp VAR1)  
          TelePhone Out:'V' 
         Nest End 
      Nest End 
  Else 
    DELAY  0:00:02 
    Voice:CALLING NUMBER UNKNOWN  [ICM] SYNC 
  End 
    
  EVENT:  Examine CID enable 
  If 
    CO: Ring 1 
  Then 
    " Flag below enables CID load to " 
    " vars for only 4 secs to prevent " 
    " CPU hogging by those events. " 
    DELAY  0:00:04 
    (F:Examine CID)  SET 
    DELAY  0:00:04 
    (F:Examine CID)  CLEAR 
  End 
    
  EVENT:  CID match check 
  If 
    CallerID: ?????????? 
  Then 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
     If 
       CallerID: 9031234567 
       or  CallerID: 9727654321 
     Then 
       (F:CID match found)  SET 
     Else 
       (F:CID match found)  CLEAR 
       Voice:<CID> [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  End 
    
  EVENT:  CID announce 
  If 
    (F:CID match found) is SET 
  Then 
     If 
       CallerID: 9031234567 
     Then 
       Voice:Carolyn  [Spkr,Line] 
      Nest End 
     If 
       CallerID: 9727654321 
     Then 
       Voice:Dora  [Spkr,Line] 
      Nest End 
    DELAY  0:00:04 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  End 
    
  EVENT:  Private Number 
  If 
    CallerID: Private Number 
  Then 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
    Voice:PRIVATE NUMBER  [Spkr,Line] SYNC 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
    " Got annonymous call reject free " 
    " in telco package so froze below. " 
   * Frozen *   TelePhone Out:'^' 
   * Frozen *   Voice:Annonyms reject  [CO] SYNC 
   * Frozen *   TelePhone Out:'+' 
  End 
    
  EVENT:  CID NPA save digits 
  If 
    CallerID: ?????????? 
    and  (F:Examine CID) is SET 
  Then 
     If 
       CallerID: 2????????? 
     Then 
       (V:CID NPA digit 1)  LOAD with 2 
      Nest End 
     If 
       CallerID: 3????????? 
     Then 
       (V:CID NPA digit 1)  LOAD with 3 
      Nest End 
     If 
       CallerID: 4????????? 
     Then 
       (V:CID NPA digit 1)  LOAD with 4 
      Nest End 
     If 
       CallerID: 5????????? 
     Then 
       (V:CID NPA digit 1)  LOAD with 5 
      Nest End 
     If 
       CallerID: 6????????? 
     Then 
       (V:CID NPA digit 1)  LOAD with 6 
      Nest End 
     If 
       CallerID: 7????????? 
     Then 
       (V:CID NPA digit 1)  LOAD with 7 
      Nest End 
     If 
       CallerID: 8????????? 
     Then 
       (V:CID NPA digit 1)  LOAD with 8 
      Nest End 
     If 
       CallerID: 9????????? 
     Then 
       (V:CID NPA digit 1)  LOAD with 9 
      Nest End 
     If 
       CallerID: ?0???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 0 
      Nest End 
     If 
       CallerID: ?1???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 1 
      Nest End 
     If 
       CallerID: ?2???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 2 
      Nest End 
     If 
       CallerID: ?3???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 3 
      Nest End 
     If 
       CallerID: ?4???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 4 
      Nest End 
     If 
       CallerID: ?5???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 5 
      Nest End 
     If 
       CallerID: ?6???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 6 
      Nest End 
     If 
       CallerID: ?7???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 7 
      Nest End 
     If 
       CallerID: ?8???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 8 
      Nest End 
     If 
       CallerID: ?9???????? 
     Then 
       (V:CID NPA digit 2)  LOAD with 9 
      Nest End 
     If 
       CallerID: ??0??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 0 
      Nest End 
     If 
       CallerID: ??1??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 1 
      Nest End 
     If 
       CallerID: ??2??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 2 
      Nest End 
     If 
       CallerID: ??3??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 3 
      Nest End 
     If 
       CallerID: ??4??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 4 
      Nest End 
     If 
       CallerID: ??5??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 5 
      Nest End 
     If 
       CallerID: ??6??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 6 
      Nest End 
     If 
       CallerID: ??7??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 7 
      Nest End 
     If 
       CallerID: ??8??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 8 
      Nest End 
     If 
       CallerID: ??9??????? 
     Then 
       (V:CID NPA digit 3)  LOAD with 9 
      Nest End 
  End 
    
  EVENT:  CID NXX save digits 
  If 
    CallerID: ?????????? 
    and  (F:Examine CID) is SET 
  Then 
     If 
       CallerID: ???2?????? 
     Then 
       (V:CID NXX digit 1)  LOAD with 2 
      Nest End 
     If 
       CallerID: ???3?????? 
     Then 
       (V:CID NXX digit 1)  LOAD with 3 
      Nest End 
     If 
       CallerID: ???4?????? 
     Then 
       (V:CID NXX digit 1)  LOAD with 4 
      Nest End 
     If 
       CallerID: ???5?????? 
     Then 
       (V:CID NXX digit 1)  LOAD with 5 
      Nest End 
     If 
       CallerID: ???6?????? 
     Then 
       (V:CID NXX digit 1)  LOAD with 6 
      Nest End 
     If 
       CallerID: ???7?????? 
     Then 
       (V:CID NXX digit 1)  LOAD with 7 
      Nest End 
     If 
       CallerID: ???8?????? 
     Then 
       (V:CID NXX digit 1)  LOAD with 8 
      Nest End 
     If 
       CallerID: ???9?????? 
     Then 
       (V:CID NXX digit 1)  LOAD with 9 
      Nest End 
     If 
       CallerID: ????0????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 0 
      Nest End 
     If 
       CallerID: ????1????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 1 
      Nest End 
     If 
       CallerID: ????2????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 2 
      Nest End 
     If 
       CallerID: ????3????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 3 
      Nest End 
     If 
       CallerID: ????4????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 4 
      Nest End 
     If 
       CallerID: ????5????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 5 
      Nest End 
     If 
       CallerID: ????6????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 6 
      Nest End 
     If 
       CallerID: ????7????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 7 
      Nest End 
     If 
       CallerID: ????8????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 8 
      Nest End 
     If 
       CallerID: ????9????? 
     Then 
       (V:CID NXX digit 2)  LOAD with 9 
      Nest End 
     If 
       CallerID: ?????0???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 0 
      Nest End 
     If 
       CallerID: ?????1???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 1 
      Nest End 
     If 
       CallerID: ?????2???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 2 
      Nest End 
     If 
       CallerID: ?????3???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 3 
      Nest End 
     If 
       CallerID: ?????4???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 4 
      Nest End 
     If 
       CallerID: ?????5???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 5 
      Nest End 
     If 
       CallerID: ?????6???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 6 
      Nest End 
     If 
       CallerID: ?????7???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 7 
      Nest End 
     If 
       CallerID: ?????8???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 8 
      Nest End 
     If 
       CallerID: ?????9???? 
     Then 
       (V:CID NXX digit 3)  LOAD with 9 
      Nest End 
  End 
    
  EVENT:  CID XXXX save digits 
  If 
    CallerID: ?????????? 
    and  (F:Examine CID) is SET 
  Then 
     If 
       CallerID: ??????0??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 0 
      Nest End 
     If 
       CallerID: ??????1??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 1 
      Nest End 
     If 
       CallerID: ??????2??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 2 
      Nest End 
     If 
       CallerID: ??????3??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 3 
      Nest End 
     If 
       CallerID: ??????4??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 4 
      Nest End 
     If 
       CallerID: ??????5??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 5 
      Nest End 
     If 
       CallerID: ??????6??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 6 
      Nest End 
     If 
       CallerID: ??????7??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 7 
      Nest End 
     If 
       CallerID: ??????8??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 8 
      Nest End 
     If 
       CallerID: ??????9??? 
     Then 
       (V:CID XXXX digit 1)  LOAD with 9 
      Nest End 
     If 
       CallerID: ???????0?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 0 
      Nest End 
     If 
       CallerID: ???????1?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 1 
      Nest End 
     If 
       CallerID: ???????2?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 2 
      Nest End 
     If 
       CallerID: ???????3?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 3 
      Nest End 
     If 
       CallerID: ???????4?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 4 
      Nest End 
     If 
       CallerID: ???????5?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 5 
      Nest End 
     If 
       CallerID: ???????6?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 6 
      Nest End 
     If 
       CallerID: ???????7?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 7 
      Nest End 
     If 
       CallerID: ???????8?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 8 
      Nest End 
     If 
       CallerID: ???????9?? 
     Then 
       (V:CID XXXX digit 2)  LOAD with 9 
      Nest End 
     If 
       CallerID: ????????0? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 0 
      Nest End 
     If 
       CallerID: ????????1? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 1 
      Nest End 
     If 
       CallerID: ????????2? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 2 
      Nest End 
     If 
       CallerID: ????????3? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 3 
      Nest End 
     If 
       CallerID: ????????4? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 4 
      Nest End 
     If 
       CallerID: ????????5? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 5 
      Nest End 
     If 
       CallerID: ????????6? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 6 
      Nest End 
     If 
       CallerID: ????????7? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 7 
      Nest End 
     If 
       CallerID: ????????8? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 8 
      Nest End 
     If 
       CallerID: ????????9? 
     Then 
       (V:CID XXXX digit 3)  LOAD with 9 
      Nest End 
     If 
       CallerID: ?????????0 
     Then 
       (V:CID XXXX digit 4)  LOAD with 0 
      Nest End 
     If 
       CallerID: ?????????1 
     Then 
       (V:CID XXXX digit 4)  LOAD with 1 
      Nest End 
     If 
       CallerID: ?????????2 
     Then 
       (V:CID XXXX digit 4)  LOAD with 2 
      Nest End 
     If 
       CallerID: ?????????3 
     Then 
       (V:CID XXXX digit 4)  LOAD with 3 
      Nest End 
     If 
       CallerID: ?????????4 
     Then 
       (V:CID XXXX digit 4)  LOAD with 4 
      Nest End 
     If 
       CallerID: ?????????5 
     Then 
       (V:CID XXXX digit 4)  LOAD with 5 
      Nest End 
     If 
       CallerID: ?????????6 
     Then 
       (V:CID XXXX digit 4)  LOAD with 6 
      Nest End 
     If 
       CallerID: ?????????7 
     Then 
       (V:CID XXXX digit 4)  LOAD with 7 
      Nest End 
     If 
       CallerID: ?????????8 
     Then 
       (V:CID XXXX digit 4)  LOAD with 8 
      Nest End 
     If 
       CallerID: ?????????9 
     Then 
       (V:CID XXXX digit 4)  LOAD with 9 
      Nest End 
  End 
    
  EVENT:  LD call discrimination 
  If 
    TelePhone Seq:'1??????????' Received within 18 seconds  
    and  (T:1 min toll) is Not Running 
    and  (F:Toll free) is CLEAR 
    " Above lines keep flags from " 
    " being reset during calls to VRUs " 
  Then 
     If 
       Time is After 12:02 AM S...... 
       and  Time is Before 11:59 PM S...... 
         -OR- 
       Time is After 12:02 AM ......S 
       and  Time is Before 11:59 PM ......S 
     Then 
       (F:Local toll)  IDLE 
       " Idle state is for 5 cent weekend " 
     Else 
       (F:Local toll)  CLEAR 
       " Clear state is for long distance " 
      Nest End 
  End 
    
  EVENT:  Local/in-state toll discriminate 
  If 
    TelePhone Seq:'1903???????' Received within 18 seconds  
    or  TelePhone Seq:'1817???????' Received within 18 seconds  
    or  TelePhone Seq:'1940???????' Received within 18 seconds  
    or  TelePhone Seq:'1806???????' Received within 18 seconds  
    or  TelePhone Seq:'1915???????' Received within 18 seconds  
    or  TelePhone Seq:'1254???????' Received within 18 seconds  
    or  TelePhone Seq:'1512???????' Received within 18 seconds  
    or  TelePhone Seq:'1830???????' Received within 18 seconds  
    or  TelePhone Seq:'1210???????' Received within 18 seconds  
    or  TelePhone Seq:'1409???????' Received within 18 seconds  
    or  TelePhone Seq:'1281???????' Received within 18 seconds  
    or  TelePhone Seq:'1713???????' Received within 18 seconds  
    or  TelePhone Seq:'1956???????' Received within 18 seconds  
      -AND- 
    (T:1 min toll) is Not Running 
    " Above line keeps flags from " 
    " being reset during calls to VRUs " 
  Then 
    (F:Local toll)  SET 
    " Set state = local/in-state toll " 
     If 
       Time is After 6:57 AM .MTWTF. 
       and  Time is Before 7:03 PM .MTWTF. 
     Then 
       (F:Peak call time)  SET 
     Else 
       (F:Peak call time)  CLEAR 
      Nest End 
  End 
    
  EVENT:  Toll free discriminate 
  If 
    TelePhone Seq:'1800???????' Received within 18 seconds  
    or  TelePhone Seq:'1888???????' Received within 18 seconds  
    or  TelePhone Seq:'1877???????' Received within 18 seconds  
    or  TelePhone Seq:'1866???????' Received within 18 seconds  
    or  TelePhone Seq:'1855???????' Received within 18 seconds  
    or  TelePhone Seq:'1844???????' Received within 18 seconds  
    or  TelePhone Seq:'1833???????' Received within 18 seconds  
    or  TelePhone Seq:'1822???????' Received within 18 seconds  
  Then 
    (F:Toll free)  SET 
  End 
    
  EVENT:  End of toll free call 
  If 
    CO: Is ON Hook 
  Then 
    (F:Toll free)  CLEAR 
  End 
    
  EVENT:  LD/local toll call timer start 
  If 
    TelePhone Seq:'1??????????' Received within 18 seconds  
    and  (F:Toll free) is CLEAR 
    and  (T:1 min toll) is Not Running 
    " Above lines keep timers from " 
    " being started for 800 calls and " 
    " being reset during calls to VRUs " 
  Then 
    (T:1 min toll) LOAD with 0:01:00 
    (THEN MACRO:Toll timer start) 
  End 
    
  EVENT:  LD/local toll 1 min timer incr 
  If 
    (T:1 min toll) is Expiring 
  Then 
    (V:Toll mins)  INCREMENT 
    (T:1 min toll) LOAD with 0:01:00 
  End 
    
  EVENT:  Toll call cost reminder 
  If 
    (T:Toll reminder) is Expiring 
  Then 
    (THEN MACRO:Toll timer start) 
    (V:Toll call $)  LOAD with (V:Toll mins) 
     If 
       (F:Local toll) is SET 
     Then 
        If 
          (F:Peak call time) is SET 
        Then 
          (V:Toll call $)  = (V:Toll call $) / 4 
        Else 
          (V:Toll call $)  = (V:Toll call $) / 8 
         Nest End 
      Nest End 
     If 
       (F:Local toll) is CLEAR 
     Then 
       (V:Toll call $)  = (V:Toll call $) / 11 
      Nest End 
     If 
       (F:Local toll) is IDLE 
     Then 
       (V:Toll call $)  = (V:Toll call $) / 20 
      Nest End 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
    Voice:This call costs <Toll call $> dollars so far  [Spkr,Line] SYNC 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  End 
    
  EVENT:  Call end accounting 
  If 
    CO: Is ON Hook 
    and  (T:Toll reminder) is Running 
  Then 
    (T:Toll reminder)  STOP  
    (T:1 min toll)  STOP  
    " Increment min for seconds left " 
    (V:Toll mins)  INCREMENT 
    " Load $ var to be divided below " 
    " by correct value for call rate. " 
    (V:Toll call $)  LOAD with (V:Toll mins) 
     If 
       (F:Local toll) is SET 
       " Set flag=12 or 25 cent toll call " 
     Then 
        If 
          (F:Peak call time) is SET 
          " Peak set = $.25 per minute. " 
        Then 
          " Get even $ amount " 
          (V:Toll call $)  = (V:Toll call $) / 4 
          " Find left over mins that aren't " 
          " enough for even $ " 
          (V:Temp VAR1)  LOAD with (V:Toll call $) 
          (V:Temp VAR1)  = (V:Temp VAR1) * 4 
          (V:Toll mins)  = (V:Toll mins) - (V:Temp VAR1) 
          " Add leftover mins to any prev " 
          " leftover mins. " 
          (V:Toll pk rem mins)  = (V:Toll pk rem mins) + (V:Toll mins) 
          " See if leftover mins are enough " 
          " to add another $ to total dollrs " 
          " for this call. " 
          (V:Temp VAR1)  LOAD with (V:Toll pk rem mins) 
          (V:Temp VAR1)  = (V:Temp VAR1) / 4 
           If 
             (V:Temp VAR1) = 1 
           Then 
             (V:Toll call $)  INCREMENT 
             (V:Toll pk rem mins)  = (V:Toll pk rem mins) - 4 
            Nest End 
        Else 
          " Peak clear = $.12 per minute. " 
          " Get even $ amount " 
          (V:Toll call $)  = (V:Toll call $) / 8 
          " Find left over mins that aren't " 
          " enough for even $ " 
          (V:Temp VAR1)  LOAD with (V:Toll call $) 
          (V:Temp VAR1)  = (V:Temp VAR1) * 8 
          (V:Toll mins)  = (V:Toll mins) - (V:Temp VAR1) 
          " Add leftover mins to any prev " 
          " leftover mins. " 
          (V:Toll nrm rem min)  = (V:Toll nrm rem min) + (V:Toll mins) 
          " See if leftover mins are enough " 
          " to add another $ to total dollrs " 
          " for this call. " 
          (V:Temp VAR1)  LOAD with (V:Toll nrm rem min) 
          (V:Temp VAR1)  = (V:Temp VAR1) / 8 
           If 
             (V:Temp VAR1) = 1 
           Then 
             (V:Toll call $)  INCREMENT 
             (V:Toll nrm rem min)  = (V:Toll nrm rem min) - 8 
            Nest End 
         Nest End 
      Nest End 
     If 
       (F:Local toll) is CLEAR 
       " Clear flag=9 cent LD call. " 
     Then 
       " Get even $ amount " 
       (V:Toll call $)  = (V:Toll call $) / 11 
       " Find left over mins that aren't " 
       " enough for even $ " 
       (V:Temp VAR1)  LOAD with (V:Toll call $) 
       (V:Temp VAR1)  = (V:Temp VAR1) * 11 
       (V:Toll mins)  = (V:Toll mins) - (V:Temp VAR1) 
       " Add leftover mins to any prev " 
       " leftover mins. " 
       (V:LD rem mins)  = (V:LD rem mins) + (V:Toll mins) 
       " See if leftover mins are enough " 
       " to add another $ to total dollrs " 
       " for this call. " 
       (V:Temp VAR1)  LOAD with (V:LD rem mins) 
       (V:Temp VAR1)  = (V:Temp VAR1) / 11 
        If 
          (V:Temp VAR1) = 1 
        Then 
          (V:Toll call $)  INCREMENT 
          (V:LD rem mins)  = (V:LD rem mins) - 11 
         Nest End 
      Nest End 
     If 
       (F:Local toll) is IDLE 
       " Idle flag=5 cent weekend call. " 
     Then 
       " Get even $ amount " 
       (V:Toll call $)  = (V:Toll call $) / 20 
       " Find left over mins that aren't " 
       " enough for even $ " 
       (V:Temp VAR1)  LOAD with (V:Toll call $) 
       (V:Temp VAR1)  = (V:Temp VAR1) * 20 
       (V:Toll mins)  = (V:Toll mins) - (V:Temp VAR1) 
       " Add leftover mins to any prev " 
       " leftover mins. " 
       (V:5 cent rem mins)  = (V:5 cent rem mins) + (V:Toll mins) 
       " See if leftover mins are enough " 
       " to add another $ to total dollrs " 
       " for this call. " 
       (V:Temp VAR1)  LOAD with (V:5 cent rem mins) 
       (V:Temp VAR1)  = (V:Temp VAR1) / 20 
        If 
          (V:Temp VAR1) = 1 
        Then 
          (V:Toll call $)  INCREMENT 
          (V:5 cent rem mins)  = (V:5 cent rem mins) - 20 
         Nest End 
      Nest End 
    (V:Month total $)  = (V:Month total $) + (V:Toll call $) 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
     If 
       (V:Month total $) != 1 
     Then 
       Voice:LD calls cost <Month total $> dollars this mo  [Spkr,Line] SYNC 
     Else 
       Voice:LD calls cost <Month total $> dollar this mon  [Spkr,Line] SYNC 
      Nest End 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
    (T:Toll reminder)  CLEAR 
    (T:1 min toll)  CLEAR 
    (V:Toll mins)   CLEAR 
    (V:Toll call $)   CLEAR 
  End 
    
  EVENT:  Load day of month & year 
  If 
    Time is 12:01 AM SMTWTFS 
  Then 
    (V:Day of month)   load with Date 
    (V:Year)   load with Year 
  End 
    
  EVENT:  Call $ total reset 
  If 
    (V:Day of month) = 25 
    and  Time is 12:01 AM SMTWTFS 
  Then 
    (V:Month total $)   CLEAR 
    (F:A/C filters)  SET 
  End 
    
  EVENT:  Garbage flag set 
  If 
    Time is 11:00 AM ..T.... 
  Then 
    (F:Garbage)  SET 
  End 
    
  EVENT:  Garbage reminder 1 
  If 
    Time is 7:00 PM ..T.... 
    and  (F:Garbage) is SET 
  Then 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
    Voice:Garbage  [Spkr,Line] SYNC 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  End 
    
  EVENT:  Garbage reminder 2 
  If 
    Time is 7:15 AM ...W... 
    and  (F:Garbage) is SET 
  Then 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
    Voice:Garbage  [Spkr,Line] SYNC 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
    (F:Garbage)  CLEAR 
  End 
    
  EVENT:  Garbage flag clear 
  If 
    XSEQ:( J-8 ) Received within 2 seconds [Receive Only] 
  Then 
    (F:Garbage)  CLEAR 
    Voice:Reset Ack'd  [Spkr,Line] 
  End 
    
  EVENT:  Filter flag clear 
  If 
    XSEQ:( J-7 ) Received within 2 seconds  
  Then 
    (F:A/C filters)  CLEAR 
    Voice:Reset Ack'd  [Spkr,Line] 
  End 
    
  EVENT:  Alarm deactivate warning 
  If 
    (DI:Alarm armed) Goes OFF 
    and  (T:Alarm exit delay) is Not Running 
  Then 
    (T:Alarm exit delay) LOAD with 0:01:00 
    DELAY  0:00:06 
     If 
       (T:Alarm breach ck) is Running 
       and  (F:Good night) is CLEAR 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:WARNING SILENCE1 ALARM IS ACTIVE  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  End 
    
  FASTEVENT:  Alarm deactivate [ DI:Alarm armed Goes OFF]  
  Then 
     If 
       (F:Alarm active) is SET 
     Then 
       (T:Alarm breach ck) LOAD with 0:00:05 
       " Blinks back on faster than once " 
       " in 2 seconds during entry delay. " 
      Nest End 
  End 
    
  EVENT:  Alarm deactivate chk & remindrs 
  If 
    (T:Alarm breach ck) is Expiring 
    and  (DI:Alarm armed) is OFF 
    and  (F:Alarm active) is SET 
  Then 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
     If 
       (F:Good night) is CLEAR 
     Then 
       Voice:ALARM DE_ACTIV SILENCE1  [Spkr,Line] SYNC 
      Nest End 
     If 
       (F:Garbage) is SET 
       and  (F:Good night) is CLEAR 
     Then 
       Voice:Garbage SILENCE1  [Spkr,Line] SYNC 
      Nest End 
     If 
       (F:A/C filters) is SET 
       and  (F:Good night) is CLEAR 
     Then 
       Voice:Change filters SILENCE1  [Spkr,Line] SYNC 
      Nest End 
     If 
       (F:Good night) is CLEAR 
     Then 
       (THEN MACRO:Holiday/reminder) 
      Nest End 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
     If 
       (F:Heating Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) OFF 
       X10:  (I-16  2nd fl thrmostat) OFF 
      Nest End 
     If 
       (F:Cooling Season) is SET 
     Then 
       X10:  (H-16  1st fl thrmostat) ON 
       X10:  (I-16  2nd fl thrmostat) ON 
      Nest End 
    DELAY  0:00:07 
    (F:Alarm active)  CLEAR 
  End 
    
  EVENT:  Alarm audit 
  If 
    (T:Alarm audit) is Expiring 
    and  (DI:Alarm armed) is OFF 
    and  (F:Alarm active) is SET 
    and  (T:Alarm breach ck) is Not Running 
    " Bug band-aid.  Alarm active flag " 
    " occasionally is not cleared when " 
    " alarm is reset.  This causes " 
    " alarm set audio warnings during  " 
    " motion detector trips. " 
  Then 
    (F:Alarm active)  CLEAR 
  End 
    
  EVENT:  Alarm audit timer set 
  If 
    (T:Alarm audit) is Expiring 
  Then 
    (T:Alarm audit) LOAD with 0:01:00 
  End 
    
  EVENT:  Alarm activated 
  If 
    (DI:Alarm armed) Goes ON 
    and  (F:Alarm active) is Not SET 
  Then 
    (F:Alarm active)  SET 
    (T:Alarm exit delay) LOAD with 0:01:05 
     If 
       (F:Good night) is CLEAR 
     Then 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
       Voice:THE ALARM IS SET  [Spkr,Line] SYNC 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
    DELAY  0:01:00 
     If 
       (F:Good night) is CLEAR 
     Then 
        If 
          X10: (I-15  Holiday lights) is ON  
        Then 
          (F:Holiday lites on)  SET 
        Else 
          (F:Holiday lites on)  CLEAR 
         Nest End 
       X10: H - All Units OFF 
       X10: I - All Units OFF 
        If 
          (F:Heating Season) is SET 
        Then 
          X10:  (H-16  1st fl thrmostat) ON 
          X10:  (I-16  2nd fl thrmostat) ON 
         Nest End 
        If 
          (F:Cooling Season) is SET 
        Then 
          X10:  (H-16  1st fl thrmostat) OFF 
          X10:  (I-16  2nd fl thrmostat) OFF 
         Nest End 
        If 
          (F:Holiday lites on) is SET 
        Then 
          X10:  (I-15  Holiday lights) ON 
         Nest End 
      Nest End 
  End 
    
  SCHEDULE END   
Device DataBase Listing
IF MACROS
THEN MACROS
THEN Macro: Set alarm 
  MACRO BEGIN   
     If 
     (DI:Alarm armed) is OFF 
     (DI:Zn1 ft door) is OFF 
     (DI:Zn2 garage) is OFF 
     (DI:Zn3 bk dr/wn) is OFF 
     (DI:Zn4 ft wins) is OFF 
     Then 
       (RELAY:Alarm toggle) ON  
       DELAY  0:00:01 
       (RELAY:Alarm toggle) OFF  
     Else 
       (RELAY:Line-out gnd) ON  
       (RELAY:Line-out sig) ON  
        If 
        (DI:Alarm armed) is ON 
        Then 
          Voice:ALARM STATUS IS ON  [Spkr,Line] SYNC 
         Nest End 
        If 
        (DI:Zn1 ft door) is ON 
        Then 
          Voice:FRONT DOOR IS OPEN  [Spkr,Line] SYNC 
         Nest End 
       DELAY  0:00:02 
        If 
        (DI:Zn2 garage) is ON 
        Then 
          Voice:GARAGE DOOR IS OPEN  [Spkr,Line] SYNC 
         Nest End 
       DELAY  0:00:02 
        If 
        (DI:Zn3 bk dr/wn) is ON 
        Then 
          Voice:BACK DOOR OR WINDOW IS OPEN  [Spkr,Line] SYNC 
         Nest End 
       DELAY  0:00:02 
        If 
        (DI:Zn4 ft wins) is ON 
        Then 
          Voice:FRONT WINDOW IS OPEN  [Spkr,Line] SYNC 
         Nest End 
       (RELAY:Line-out gnd) OFF  
       (RELAY:Line-out sig) OFF  
      Nest End 
  MACRO END 
THEN Macro: Toll timer start 
  MACRO BEGIN   
     If 
     (F:Local toll) is SET 
       " Set flag=12 or 25 cent toll call " 
     Then 
        If 
        (F:Peak call time) is SET 
        Then 
          (T:Toll reminder) LOAD with 0:04:00 
        Else 
          (T:Toll reminder) LOAD with 0:08:00 
         Nest End 
      Nest End 
     If 
     (F:Local toll) is CLEAR 
       " Clear flag=9 cent LD call. " 
     Then 
       (T:Toll reminder) LOAD with 0:11:00 
      Nest End 
     If 
     (F:Local toll) is IDLE 
       " Idle flag=5 cent Sunday call. " 
     Then 
       (T:Toll reminder) LOAD with 0:20:00 
      Nest End 
  MACRO END 
THEN Macro: Holiday/reminder 
  MACRO BEGIN   
    (F:Holiday)  CLEAR 
    (RELAY:Line-out gnd) ON  
    (RELAY:Line-out sig) ON  
     If 
     Date is After Apr  1 
     Date is Before Apr  6 
       " Marta's Birthday " 
     Then 
       Voice:REMEMBER BIRTHDAY Marta  [Spkr,Line] SYNC 
      Nest End 
     If 
     If 
     Date is After Apr  19 
     Date is Before Apr  25 
       " Maureen's Birthday " 
     Then 
       Voice:REMEMBER BIRTHDAY Maureen  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is After May  7 
     Date is Before May  13 
       " Dustin's Birthday " 
     Then 
       Voice:REMEMBER BIRTHDAY Dustin  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is Jan  1 
     Then 
       Voice:HAPPY NEW YEAR DAY  [Spkr,Line] SYNC 
       (F:Holiday)  SET 
      Nest End 
     If 
     Date is After Jan  14 
     Date is Before Jan  22 
     Time is After 1:00 AM .M..... 
     Then 
       Voice:HAPPY Martin L King BIRTHDAY  [Spkr,Line] SYNC 
       (F:Holiday)  SET 
      Nest End 
     If 
     Date is Feb  2 
     Then 
       Voice:Its Grndhog Day  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is Feb  14 
     Then 
       Voice:HAPPY VALENTIN DAY  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is After Feb  14 
     Date is Before Feb  22 
     Time is After 1:00 AM .M..... 
     Then 
       Voice:HAPPY President's DAY  [Spkr,Line] SYNC 
       (F:Holiday)  SET 
      Nest End 
     If 
     Date is Mar  17 
     Then 
       Voice:HAPPY SAINTPAT DAY  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is Mar  20 
     (V:Year) = 99 
         -OR- 
     Date is Mar  20 
     (V:Year) >= 0 
     (V:Year) <= 5 
     Then 
       Voice:FIRST DAY OF Spring  [Spkr,Line] SYNC 
       " Spring " 
      Nest End 
     If 
     Date is After Mar  31 
     Date is Before Apr  8 
     Time is After 1:00 AM S...... 
     Then 
       Voice:DAYLIGHT SAVINGS SILENCEH SET CLOCK FORWARD 1 Hour  [Spkr,
Line] SYNC 
      Nest End 
     If 
     Date is Apr  4 
     (V:Year) = 99 
         -OR- 
     Date is Apr  23 
     (V:Year) = 0 
         -OR- 
     Date is Apr  15 
     (V:Year) = 1 
         -OR- 
     Date is Mar  31 
     (V:Year) = 2 
         -OR- 
     Date is Apr  20 
     (V:Year) = 3 
         -OR- 
     Date is Apr  11 
     (V:Year) = 4 
         -OR- 
     Date is Mar  27 
     (V:Year) = 5 
     Then 
       Voice:HAPPY EASTER  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is After May  7 
     Date is Before May  15 
     Time is After 1:00 AM S...... 
     Then 
       Voice:HAPPY MOTHERS DAY  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is After May  24 
     Date is Before June  1 
     Time is After 1:00 AM .M..... 
     Then 
       Voice:HAPPY MEMORIAL DAY  [Spkr,Line] SYNC 
       (F:Holiday)  SET 
      Nest End 
     If 
     Date is After June  14 
     Date is Before June  22 
     Time is After 1:00 AM S...... 
     Then 
       Voice:HAPPY FATHERS DAY  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is June  14 
     Then 
       Voice:TODAY IS FLAG DAY  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is June  21 
     (V:Year) = 99 
         -OR- 
     Date is June  20 
     (V:Year) = 0 
         -OR- 
     Date is June  21 
     (V:Year) >= 1 
     (V:Year) <= 3 
         -OR- 
     Date is June  20 
     (V:Year) = 4 
         -OR- 
     Date is June  21 
     (V:Year) = 5 
     Then 
       Voice:FIRST DAY OF Summer  [Spkr,Line] SYNC 
       " Summer " 
      Nest End 
     If 
     Date is July  4 
     Then 
       Voice:HAPPY Fourth OF JULY  [Spkr,Line] SYNC 
       (F:Holiday)  SET 
      Nest End 
     If 
     Date is After Aug  31 
     Date is Before Sept  8 
     Time is After 1:00 AM .M..... 
     Then 
       Voice:HAPPY LABOR DAY  [Spkr,Line] SYNC 
       (F:Holiday)  SET 
      Nest End 
     If 
     Date is Sept  23 
     (V:Year) = 99 
         -OR- 
     Date is Sept  22 
     (V:Year) < 3 
         -OR- 
     Date is Sept  23 
     (V:Year) = 3 
         -OR- 
     Date is Sept  22 
     (V:Year) >= 4 
     (V:Year) <= 5 
     Then 
       Voice:FIRST DAY OF Fall  [Spkr,Line] SYNC 
       " Autumn " 
      Nest End 
     If 
     Date is After Oct  24 
     Date is Before Nov  1 
     Time is After 1:00 AM S...... 
     Then 
       Voice:DAYLIGHT SAVINGS SILENCEH SET CLOCK BACKWARD 1 Hour  [Spkr,
Line] SYNC 
      Nest End 
     If 
     Date is Oct  31 
     Then 
       Voice:HAPPY HALLOWEE  [Spkr,Line] SYNC 
      Nest End 
     If 
     Date is After Nov  21 
     Date is Before Nov  29 
     Time is After 1:00 AM ....T.. 
     Then 
       Voice:HAPPY THANKSGI DAY  [Spkr,Line] SYNC 
       (F:Holiday)  SET 
      Nest End 
     If 
     Date is Dec  22 
     (V:Year) = 99 
         -OR- 
     Date is Dec  21 
     (V:Year) >= 0 
     (V:Year) <= 2 
         -OR- 
     Date is Dec  22 
     (V:Year) = 3 
         -OR- 
     Date is Dec  21 
     (V:Year) >= 4 
     (V:Year) <= 5 
     Then 
       Voice:FIRST DAY OF Winter  [Spkr,Line] SYNC 
       " Winter " 
      Nest End 
     If 
     Date is Dec  25 
     Then 
       Voice:MERRY CHRISTMA  [Spkr,Line] SYNC 
       (F:Holiday)  SET 
      Nest End 
    (RELAY:Line-out gnd) OFF  
    (RELAY:Line-out sig) OFF  
  MACRO END 

X10 DEVICES
House,Unit,Device Name,Location,Description,Inital,Type,R,P,F
A,1,,,,No Change,LAMP,N,N,N 
A,2,,,,No Change,LAMP,N,N,N 
A,3,,,,No Change,LAMP,N,N,N 
A,4,,,,No Change,LAMP,N,N,N 
A,5,,,,No Change,LAMP,N,N,N 
A,6,,,,No Change,LAMP,N,N,N 
A,7,,,,No Change,LAMP,N,N,N 
A,8,,,,No Change,LAMP,N,N,N 
A,9,,,,No Change,LAMP,N,N,N 
A,10,,,,No Change,LAMP,N,N,N 
A,11,,,,No Change,LAMP,N,N,N 
A,12,,,,No Change,LAMP,N,N,N 
A,13,,,,No Change,LAMP,N,N,N 
A,14,,,,No Change,LAMP,N,N,N 
A,15,,,,No Change,LAMP,N,N,N 
A,16,,,,No Change,LAMP,N,N,N 
B,1,,,,No Change,LAMP,N,N,N 
B,2,,,,No Change,LAMP,N,N,N 
B,3,,,,No Change,LAMP,N,N,N 
B,4,,,,No Change,LAMP,N,N,N 
B,5,,,,No Change,LAMP,N,N,N 
B,6,,,,No Change,LAMP,N,N,N 
B,7,,,,No Change,LAMP,N,N,N 
B,8,,,,No Change,LAMP,N,N,N 
B,9,,,,No Change,LAMP,N,N,N 
B,10,,,,No Change,LAMP,N,N,N 
B,11,,,,No Change,LAMP,N,N,N 
B,12,,,,No Change,LAMP,N,N,N 
B,13,,,,No Change,LAMP,N,N,N 
B,14,,,,No Change,LAMP,N,N,N 
B,15,,,,No Change,LAMP,N,N,N 
B,16,,,,No Change,LAMP,N,N,N 
C,1,,,,No Change,LAMP,N,N,N 
C,2,,,,No Change,LAMP,N,N,N 
C,3,,,,No Change,LAMP,N,N,N 
C,4,,,,No Change,LAMP,N,N,N 
C,5,,,,No Change,LAMP,N,N,N 
C,6,,,,No Change,LAMP,N,N,N 
C,7,,,,No Change,LAMP,N,N,N 
C,8,,,,No Change,LAMP,N,N,N 
C,9,,,,No Change,LAMP,N,N,N 
C,10,,,,No Change,LAMP,N,N,N 
C,11,,,,No Change,LAMP,N,N,N 
C,12,,,,No Change,LAMP,N,N,N 
C,13,,,,No Change,LAMP,N,N,N 
C,14,,,,No Change,LAMP,N,N,N 
C,15,,,,No Change,LAMP,N,N,N 
C,16,,,,No Change,LAMP,N,N,N 
D,1,,,,No Change,LAMP,N,N,N 
D,2,,,,No Change,LAMP,N,N,N 
D,3,,,,No Change,LAMP,N,N,N 
D,4,,,,No Change,LAMP,N,N,N 
D,5,,,,No Change,LAMP,N,N,N 
D,6,,,,No Change,LAMP,N,N,N 
D,7,,,,No Change,LAMP,N,N,N 
D,8,,,,No Change,LAMP,N,N,N 
D,9,,,,No Change,LAMP,N,N,N 
D,10,,,,No Change,LAMP,N,N,N 
D,11,,,,No Change,LAMP,N,N,N 
D,12,,,,No Change,LAMP,N,N,N 
D,13,,,,No Change,LAMP,N,N,N 
D,14,,,,No Change,LAMP,N,N,N 
D,15,,,,No Change,LAMP,N,N,N 
D,16,,,,No Change,LAMP,N,N,N 
E,1,,,,No Change,LAMP,N,N,N 
E,2,,,,No Change,LAMP,N,N,N 
E,3,,,,No Change,LAMP,N,N,N 
E,4,,,,No Change,LAMP,N,N,N 
E,5,,,,No Change,LAMP,N,N,N 
E,6,,,,No Change,LAMP,N,N,N 
E,7,,,,No Change,LAMP,N,N,N 
E,8,,,,No Change,LAMP,N,N,N 
E,9,,,,No Change,LAMP,N,N,N 
E,10,,,,No Change,LAMP,N,N,N 
E,11,,,,No Change,LAMP,N,N,N 
E,12,,,,No Change,LAMP,N,N,N 
E,13,,,,No Change,LAMP,N,N,N 
E,14,,,,No Change,LAMP,N,N,N 
E,15,,,,No Change,LAMP,N,N,N 
E,16,,,,No Change,LAMP,N,N,N 
F,1,,,,No Change,LAMP,N,N,N 
F,2,,,,No Change,LAMP,N,N,N 
F,3,,,,No Change,LAMP,N,N,N 
F,4,,,,No Change,LAMP,N,N,N 
F,5,,,,No Change,LAMP,N,N,N 
F,6,,,,No Change,LAMP,N,N,N 
F,7,,,,No Change,LAMP,N,N,N 
F,8,,,,No Change,LAMP,N,N,N 
F,9,,,,No Change,LAMP,N,N,N 
F,10,,,,No Change,LAMP,N,N,N 
F,11,,,,No Change,LAMP,N,N,N 
F,12,,,,No Change,LAMP,N,N,N 
F,13,,,,No Change,LAMP,N,N,N 
F,14,,,,No Change,LAMP,N,N,N 
F,15,,,,No Change,LAMP,N,N,N 
F,16,,,,No Change,LAMP,N,N,N 
G,1,,,,No Change,LAMP,N,N,N 
G,2,,,,No Change,LAMP,N,N,N 
G,3,,,,No Change,LAMP,N,N,N 
G,4,,,,No Change,LAMP,N,N,N 
G,5,,,,No Change,LAMP,N,N,N 
G,6,,,,No Change,LAMP,N,N,N 
G,7,,,,No Change,LAMP,N,N,N 
G,8,,,,No Change,LAMP,N,N,N 
G,9,,,,No Change,LAMP,N,N,N 
G,10,,,,No Change,LAMP,N,N,N 
G,11,,,,No Change,LAMP,N,N,N 
G,12,,,,No Change,LAMP,N,N,N 
G,13,,,,No Change,LAMP,N,N,N 
G,14,,,,No Change,LAMP,N,N,N 
G,15,,,,No Change,LAMP,N,N,N 
G,16,,,,No Change,LAMP,N,N,N 
H,1,FR light,,,No Change,LAMP-6381,N,N,N 
H,2,FR fan,,,No Change,APPLIANCE,N,N,N 
H,3,Mantle light,,,No Change,LAMP-6381,N,N,N 
H,4,Back porch light,,,No Change,LAMP,N,N,N 
H,5,Brkfstnook light,,,No Change,LAMP,N,N,N 
H,6,Kitchen flourec,,,No Change,APPLIANCE,N,N,N 
H,7,Pantry light,,,No Change,LAMP,N,N,N 
H,8,Washcloset light,,,No Change,LAMP,N,N,N 
H,9,Sink light,,,No Change,LAMP,N,N,N 
H,10,DR light,,,No Change,LAMP-6381,N,N,N 
H,11,Frnt porch light,,,No Change,LAMP,N,N,N 
H,12,Foyer light,,,No Change,LAMP-6381,N,N,N 
H,13,LR light,,,No Change,LAMP-6381,N,N,N 
H,14,Powder rm light,,,No Change,LAMP,N,N,N 
H,15,,,,No Change,LAMP,N,N,N 
H,16,1st fl thrmostat,,,No Change,APPLIANCE,N,N,N 
I,1,MBR light,,,No Change,LAMP-6381,N,N,N 
I,2,MBR fan,,,No Change,APPLIANCE,N,N,N 
I,3,Mster bath light,,,No Change,LAMP-6381,N,N,N 
I,4,Mster tub light,,,No Change,LAMP-6381,N,N,N 
I,5,Mster closet,,,No Change,LAMP,N,N,N 
I,6,Computer light,Master sitting,,No Change,LAMP,N,N,N 
I,7,Uppr porch light,,,No Change,LAMP,N,N,N 
I,8,BR4 light,SE bedroom,Toy room light,No Change,LAMP-6381,N,N,N 
I,9,BR4 fan,SE bedroom,Toy room fan,No Change,APPLIANCE,N,N,N 
I,10,Hall light,Stairs/hall,,No Change,LAMP-6381,N,N,N 
I,11,Upper bath light,2nd floor bathrm,,No Change,LAMP,N,N,N 
I,12,BR3 light,SW bedroom,Girls room light,No Change,LAMP-6381,N,N,N 
I,13,BR3 fan,SW bedroom,Girls room fan,No Change,APPLIANCE,N,N,N 
I,14,BR2 light,NW bedroom,Spare bedroom light,No Change,LAMP,N,N,N 
I,15,Holiday lights,,Xmas or Halloween lamp module,No Change,APPLIANCE,N,N,N 
I,16,2nd fl thrmostat,,,No Change,APPLIANCE,N,N,N 
J,1,Controller 1,,,No Change,REMOTE,N,N,N 
J,2,Controller 2,,,No Change,REMOTE,N,N,N 
J,3,Controller 3,,,No Change,REMOTE,N,N,N 
J,4,Controller 4,,,No Change,REMOTE,N,N,N 
J,5,Controller 5,,,No Change,REMOTE,N,N,N 
J,6,Controller 6,,,IDLE,REMOTE,N,N,N 
J,7,Controller 7,,,No Change,REMOTE,N,N,N 
J,8,Controller 8,,,No Change,REMOTE,N,N,N 
J,9,Front motion,,,No Change,REMOTE,N,N,N 
J,10,Front photocell,,,No Change,REMOTE,N,N,N 
J,11,Family rm motion,,,No Change,REMOTE,N,N,N 
J,12,Fmly rm photocel,,,No Change,REMOTE,N,N,N 
J,13,Controller 13,,,No Change,REMOTE,N,N,N 
J,14,Controller 14,,,No Change,REMOTE,N,N,N 
J,15,Controller 15,,,No Change,REMOTE,N,N,N 
J,16,Controller 16,,,No Change,REMOTE,N,N,N 
K,1,,,,No Change,LAMP,N,N,N 
K,2,,,,No Change,LAMP,N,N,N 
K,3,,,,No Change,LAMP,N,N,N 
K,4,,,,No Change,LAMP,N,N,N 
K,5,,,,No Change,LAMP,N,N,N 
K,6,,,,No Change,LAMP,N,N,N 
K,7,,,,No Change,LAMP,N,N,N 
K,8,,,,No Change,LAMP,N,N,N 
K,9,,,,No Change,LAMP,N,N,N 
K,10,,,,No Change,LAMP,N,N,N 
K,11,,,,No Change,LAMP,N,N,N 
K,12,,,,No Change,LAMP,N,N,N 
K,13,,,,No Change,LAMP,N,N,N 
K,14,,,,No Change,LAMP,N,N,N 
K,15,,,,No Change,LAMP,N,N,N 
K,16,,,,No Change,LAMP,N,N,N 
L,1,,,,No Change,LAMP,N,N,N 
L,2,,,,No Change,LAMP,N,N,N 
L,3,,,,No Change,LAMP,N,N,N 
L,4,,,,No Change,LAMP,N,N,N 
L,5,,,,No Change,LAMP,N,N,N 
L,6,,,,No Change,LAMP,N,N,N 
L,7,,,,No Change,LAMP,N,N,N 
L,8,,,,No Change,LAMP,N,N,N 
L,9,,,,No Change,LAMP,N,N,N 
L,10,,,,No Change,LAMP,N,N,N 
L,11,,,,No Change,LAMP,N,N,N 
L,12,,,,No Change,LAMP,N,N,N 
L,13,,,,No Change,LAMP,N,N,N 
L,14,,,,No Change,LAMP,N,N,N 
L,15,,,,No Change,LAMP,N,N,N 
L,16,,,,No Change,LAMP,N,N,N 
M,1,Bedside cntrlr 1,,,No Change,LAMP,N,N,N 
M,2,Bedside cntrlr 2,,,No Change,LAMP,N,N,N 
M,3,MBRctrlr/fotocel,,,No Change,LAMP,N,N,N 
M,4,Bedside cntrlr 4,,,No Change,LAMP,N,N,N 
M,5,,,,No Change,LAMP,N,N,N 
M,6,,,,IDLE,LAMP,N,N,N 
M,7,,,,No Change,LAMP,N,N,N 
M,8,,,,No Change,LAMP,N,N,N 
M,9,,,,No Change,LAMP,N,N,N 
M,10,,,,No Change,LAMP,N,N,N 
M,11,,,,No Change,LAMP,N,N,N 
M,12,,,,No Change,LAMP,N,N,N 
M,13,,,,No Change,LAMP,N,N,N 
M,14,,,,No Change,LAMP,N,N,N 
M,15,,,,No Change,LAMP,N,N,N 
M,16,,,,No Change,LAMP,N,N,N 
N,1,,,,No Change,LAMP,N,N,N 
N,2,,,,No Change,LAMP,N,N,N 
N,3,,,,No Change,LAMP,N,N,N 
N,4,,,,No Change,LAMP,N,N,N 
N,5,,,,No Change,LAMP,N,N,N 
N,6,,,,No Change,LAMP,N,N,N 
N,7,,,,No Change,LAMP,N,N,N 
N,8,,,,No Change,LAMP,N,N,N 
N,9,,,,No Change,LAMP,N,N,N 
N,10,,,,No Change,LAMP,N,N,N 
N,11,,,,No Change,LAMP,N,N,N 
N,12,,,,No Change,LAMP,N,N,N 
N,13,,,,No Change,LAMP,N,N,N 
N,14,,,,No Change,LAMP,N,N,N 
N,15,,,,No Change,LAMP,N,N,N 
N,16,,,,No Change,LAMP,N,N,N 
O,1,,,,No Change,LAMP,N,N,N 
O,2,,,,No Change,LAMP,N,N,N 
O,3,,,,No Change,LAMP,N,N,N 
O,4,,,,No Change,LAMP,N,N,N 
O,5,,,,No Change,LAMP,N,N,N 
O,6,,,,No Change,LAMP,N,N,N 
O,7,,,,No Change,LAMP,N,N,N 
O,8,,,,No Change,LAMP,N,N,N 
O,9,,,,No Change,LAMP,N,N,N 
O,10,,,,No Change,LAMP,N,N,N 
O,11,,,,No Change,LAMP,N,N,N 
O,12,,,,No Change,LAMP,N,N,N 
O,13,,,,No Change,LAMP,N,N,N 
O,14,,,,No Change,LAMP,N,N,N 
O,15,,,,No Change,LAMP,N,N,N 
O,16,,,,No Change,LAMP,N,N,N 
P,1,,,,No Change,LAMP,N,N,N 
P,2,,,,No Change,LAMP,N,N,N 
P,3,,,,No Change,LAMP,N,N,N 
P,4,,,,No Change,LAMP,N,N,N 
P,5,,,,No Change,LAMP,N,N,N 
P,6,,,,No Change,LAMP,N,N,N 
P,7,,,,No Change,LAMP,N,N,N 
P,8,,,,No Change,LAMP,N,N,N 
P,9,,,,No Change,LAMP,N,N,N 
P,10,,,,No Change,LAMP,N,N,N 
P,11,,,,No Change,LAMP,N,N,N 
P,12,,,,No Change,LAMP,N,N,N 
P,13,,,,No Change,LAMP,N,N,N 
P,14,,,,No Change,LAMP,N,N,N 
P,15,,,,No Change,LAMP,N,N,N 
P,16,,,,No Change,LAMP,N,N,N 
TIMERS
Name            Description 
----------------------------------------------- 
MBR closet IDL   No closet motion timer           
Hall IDL         No hall motion timer             
MBR IDL          No MBR motion timer              
Master bath IDL  No Master bath motion timer      
BR4 IDL          No BR4 motion timer              
Upper bath IDL   No upper bathroom  motion timer  
BR3 IDL          No BR3 motion timer              
BR2 IDL          No BR2 motion timer              
FR IDL           No family room  motion timer     
Kithen IDL       No kitchen motion timer          
Powder rm IDL    No powder room  motion timer     
Front porch IDL  No front porch  motion timer     
Alrm toggle timr Suppress motn warn on act/deact  
Alarm audit      Audit for alm flg set&alm DI off 
MBR ON           MBR ON received                  
Alarm breach ck  Alarm breach check timer         
Alarm exit delay Alarm exit/entry delay           
Generic use timr Used for various events          
1 min toll       1 minute LD/local toll call timr 
Toll reminder    Periodic toll call reminder      
Wash closet      Open too long timer              
Pantry           Open too long timer              
Recent frnt motn Recent J-9 outside motion detctr 
Time Labels 
----------------------------------------------- 
Name: Wakeup 
Description: Morning startup time 
Time = 6:00 AM 
Name: Getting Dark 
Description: 45 minutes before sunset 
Time Based on: Sunset minus(-) 0:45 
Name: Getting Light 
Description: 50 minutes after sunrise 
Time Based on: Sunrise plus(+) 0:50 

Flag Devices
Name            Description                    Inital Value 
----------------------------------------------------------- 
Alarm active     Security system armed            CLEAR 
Examine CID      Load CID in vars, avoid CPU hog  CLEAR 
Hall was on      Hall light was on                CLEAR 
Peak call time   True when pk local toll made     CLEAR 
CID match found  Prevent number announce          CLEAR 
MBR motion       Prevent xmit appear as rcv       CLEAR 
MBR was on       MBR light was on                 CLEAR 
Girls rm was on  Girls room light was on          CLEAR 
Mastr bth was on Master bath light was on         CLEAR 
Good night       Good night                       CLEAR 
A/C filters      Filters need changing            CLEAR 
Garbage          Take out the garbage             CLEAR 
Alarm went off   Alarm went off                   CLEAR 
MBR fan was on   MBR fan was on                   CLEAR 
BR3 fan was on   BR3 fan was on                   CLEAR 
Dark outside     Front porch photocell            CLEAR 
Family room dark Dark in family room              CLEAR 
Toll free        Set=800,888,877,866,855,844,833  CLEAR 
Local toll       Set=toll, Clear=LD, Idle=5 cent  CLEAR 
1st Fl Therm on  First floor thermostat was on    CLEAR 
2nd Fl Therm on  Second floor thermostat was on   CLEAR 
Holiday          Any holiday defined in then macr CLEAR 
Holiday lites on Holiday lights were on (alarm)   CLEAR 
Heating Season   Manual flag to tell schedule     SET 
Cooling Season   Manual flag                      CLEAR 
Variables
Name            Description                    Inital Value
----------------------------------------------------------- 
Month total $    $ this month for toll/LD calls.      0 
MBR lock mins    30 mins per incr.                    0 
Year                                                 99 
Open window cnt  Number of alarm zones open           0 
Alarm breach     Alarm status toggle counter          0 
Lost keys digit# Which digit is being tested for      0 
Lost keys digit  Count rings                          0 
CID NPA digit 1  CID area code digit 1                0 
CID NPA digit 2  CID area code digit 2                0 
CID NPA digit 3  CID area code digit 3                0 
CID NXX digit 1  CID office code digit 1              0 
CID NXX digit 2  CID office code digit 2              0 
CID NXX digit 3  CID office code digit 3              0 
CID XXXX digit 1 CID station code digit 1             0 
CID XXXX digit 2 CID station code digit 2             0 
CID XXXX digit 3 CID station code digit 3             0 
CID XXXX digit 4 CID station code digit 4             0 
Day of month     Day of month                         0 
Toll pk rem mins Remainder pk mins @ call end         0 
Toll nrm rem min Remainder norm mins @ call end       0 
LD rem mins      Remainder LD mins @ call end         0 
5 cent rem mins  Remainder 5 cent mins @ call end     0 
Toll mins        # mins on a single call              0 
Toll call $      Cost of call so far                  0 
Temp VAR1        Generic temporary variable           0 
TCM+
----------------------------------------------------------- 
Digitial In-1: MBR Motion       Digitial In- 9: BR2 motion       Relay-1: 
Alarm toggle    
Digitial In-2: Mbath Motion     Digitial In-10: Hall fotocel     Relay-2: 
Garage door     
Digitial In-3: Mbath closet     Digitial In-11: Hll/str motn     Relay-3: 
Line-in gnd     
Digitial In-4: Hall motion      Digitial In-12: Alarm armed      Relay-4: 
Line-in sgnl    
Digitial In-5: BR4 motion       Digitial In-13: Zn1 ft door      Relay-5: 
Line-out gnd    
Digitial In-6: Doorbell         Digitial In-14: Zn2 garage       Relay-6: 
Line-out sig    
Digitial In-7: Uppr bth mot     Digitial In-15: Zn3 bk dr/wn     Relay-7:  
Digitial In-8: BR3 motion       Digitial In-16: Zn4 ft wins      Relay-8:  
A/D-1: FamlyRm motn     Gain = 1   Offset = 0
A/D-2: Kitchen motn     Gain = 1   Offset = 0
A/D-3: Wshclst door     Gain = 1   Offset = 0
A/D-4: Pantry door      Gain = 1   Offset = 0
A/D-5: Pwdr rm door     Gain = 1   Offset = 0
IO-Xpander-1
----------------------------------------------------------- 
Digitial In-1:                  Digitial In- 9:                  Relay-1:  
Digitial In-2:                  Digitial In-10:                  Relay-2:  
Digitial In-3:                  Digitial In-11:                  Relay-3:  
Digitial In-4:                  Digitial In-12:                  Relay-4:  
Digitial In-5:                  Digitial In-13:                  Relay-5:  
Digitial In-6:                  Digitial In-14:                  Relay-6:  
Digitial In-7:                  Digitial In-15:                  Relay-7:  
Digitial In-8:                  Digitial In-16:                  Relay-8:  

IO-Xpander-2
----------------------------------------------------------- 
Digitial In-1:                  Digitial In- 9:                  Relay-1:  
Digitial In-2:                  Digitial In-10:                  Relay-2:  
Digitial In-3:                  Digitial In-11:                  Relay-3:  
Digitial In-4:                  Digitial In-12:                  Relay-4:  
Digitial In-5:                  Digitial In-13:                  Relay-5:  
Digitial In-6:                  Digitial In-14:                  Relay-6:  
Digitial In-7:                  Digitial In-15:                  Relay-7:  
Digitial In-8:                  Digitial In-16:                  Relay-8:  

IO-Xpander-3
----------------------------------------------------------- 
Digitial In-1:                  Digitial In- 9:                  Relay-1:  
Digitial In-2:                  Digitial In-10:                  Relay-2:  
Digitial In-3:                  Digitial In-11:                  Relay-3:  
Digitial In-4:                  Digitial In-12:                  Relay-4:  
Digitial In-5:                  Digitial In-13:                  Relay-5:  
Digitial In-6:                  Digitial In-14:                  Relay-6:  
Digitial In-7:                  Digitial In-15:                  Relay-7:  
Digitial In-8:                  Digitial In-16:                  Relay-8:  

IO-Xpander-4
----------------------------------------------------------- 
Digitial In-1:                  Digitial In- 9:                  Relay-1:  
Digitial In-2:                  Digitial In-10:                  Relay-2:  
Digitial In-3:                  Digitial In-11:                  Relay-3:  
Digitial In-4:                  Digitial In-12:                  Relay-4:  
Digitial In-5:                  Digitial In-13:                  Relay-5:  
Digitial In-6:                  Digitial In-14:                  Relay-6:  
Digitial In-7:                  Digitial In-15:                  Relay-7:  
Digitial In-8:                  Digitial In-16:                  Relay-8:  

DI-Xpander-1
----------------------------------------------------------- 
DI-Xpander-2
----------------------------------------------------------- 
DI-Xpander-3
----------------------------------------------------------- 
DI-Xpander-4
----------------------------------------------------------- 
RO-Xpander-1
----------------------------------------------------------- 
RO-Xpander-2
----------------------------------------------------------- 
RO-Xpander-3
----------------------------------------------------------- 
RO-Xpander-4
-----------------------------------------------------------