#15770 - 05/15/06 04:55 PM
Morning Alarm (Wake Up) Code???
|
sash18
journeyman
Registered: 08/31/05
Posts: 61
Loc: Melbourne
|
Hi Guy's, I'm wondering if anyone has coded a morning wake up alarm that can be set using say a keypad (screen page) on the touchscreen rather than having to breakout into programming via c-max everytime you want to change the wake up time. Snooze button would be great also Anyone have a code like this or even an example so I can start coding it myself (both tch and prg files would be good if your sending them over)??
Kind Regards Sash
|
|
Top
|
|
|
|
#15772 - 05/15/06 07:53 PM
Re: Morning Alarm (Wake Up) Code???
[Re: Guy Lavoie]
|
sash18
journeyman
Registered: 08/31/05
Posts: 61
Loc: Melbourne
|
Thanks Guy, dont you ever sleep man!
|
|
Top
|
|
|
|
#15773 - 03/08/07 09:13 AM
Re: Morning Alarm (Wake Up) Code???
[Re: sash18]
|
edr
junior
Registered: 01/20/03
Posts: 36
Loc: south jersey
|
try this. it uses keypad from above. looks at wakeup time and starts coffee 10 min before. and graduly brightens lights. hope you get the gist of it.
0106 - IF WAKE-UP-VALUE is = WAKEUPVALUE // . 0107 - THEN WAKE-UP-MINUS-5 = WAKE-UP-VALUE // . 0108 - THEN WAKE-UP-MINUS-5 - 5 // . 0109 - THEN WAKEUP-COFFEE-START = WAKE-UP-VALUE // . 0110 - THEN WAKEUP-COFFEE-START - 10 // COFFEE START 0111 - IF Time of Day becomes = WAKE-UP-MINUS-5 // WAKE UP MINUS 5 MIN 0112 - AND 1=WEEKEND-2=WEEKDAY is = 2 // WEEKDAY 0113 - AND 0=HOME-1=AWAY is = 0 // HOME 0114 - THEN Send Module #6 -SPEAK-EZ FIVE-MORE-MINUTES // . 0115 - IF BEDROOM-KEYPAD-KEY-4, ON Command Pair // KEYPAD KEY 4 ON WD 0116 - OR Time of Day becomes = WAKE-UP-VALUE // . 0117 - AND 1=WEEKEND-2=WEEKDAY is = 2 // WEEKDAY 0118 - AND 0=HOME-1=AWAY is = 0 // HOME 0119 - THEN Send Module #6 -SPEAK-EZ GOOD-MORNING // . 0120 - THEN BEDROOM-FAN, Turn OFF // BED FAN. 0121 - THEN LIVING-AREA-CEILING-FANS, Turn OFF // CEILING FANS 0122 - THEN DINING-TRACK-LTS, Turn ON // DINING TRK. 0123 - THEN KITCHEN-COUNTER-LTS, Turn ON // KIT COUNTER LT. 0124 - THEN COFFEE-POT, Turn ON // 0125 - THEN Module #3 -SECU16-IR, CABLE-BOX IR CABLE-BOX-EXIT // CABLE EXIT 0126 - THEN Module #3 -SECU16-IR, CABLE-BOX IR CABLE-BOX-CH-0 // 0 0127 - THEN Module #3 -SECU16-IR, CABLE-BOX IR CABLE-BOX-CH-0 // 0 0128 - THEN Module #3 -SECU16-IR, CABLE-BOX IR CABLE-BOX-CH-6 // 6 0129 - THEN Module #3 -SECU16-IR, BIG-TV IR MAIN-TV-POWER // TV POWER 0130 - THEN Transmit X10, A - 10 // BATH LT 0131 - THEN Transmit X10, A - 6 // LIVING TRK 0132 - THEN Transmit X10, A - Bright (22), 8 time(s) // BRIGHT 0133 - THEN Transmit X10, B - 1 // BEDROOM LIGHT 0134 - THEN Transmit X10, B - Bright (22), 8 time(s) r
Edited by edr (03/08/07 09:20 AM)
|
|
Top
|
|
|
|
#15774 - 03/11/07 02:48 PM
Re: Morning Alarm (Wake Up) Code???
[Re: edr]
|
blawre0000
junior
Registered: 04/01/06
Posts: 43
Loc: Scotland
|
This is my effort. I only put it into action the other day and it is not fully tried out. It seems to work ok. you might be able to pick out some bits to help.
0001 - IF Time of Day is > 00:00 // 0002 - THEN Load Data to: Variable #110 // 0003 - ELSE Load Data to: Variable #110 // 0004 - IF Variable #110 is = Variable #110 // 0005 - THEN Variable #111 = Variable #110 // 0006 - THEN Variable #111 / 60 // 0007 - THEN Variable #112 = Variable #111 // 0008 - THEN Variable #110 % 60 // 0009 - THEN Variable #113 = Variable #110 // 0010 - // xxxxxxxxxxxx 0011 - // ALARM CLOCK 0012 - IF 121, Button Ocelot is pressed // Alarm clock on or off 0013 - AND Variable #117 is = 0 // 0014 - THEN Variable #117 = 1 // 0015 - THEN Skip to line 115 // 0016 - IF 121, Button Ocelot is pressed // 0017 - AND Variable #117 is = 1 // 0018 - THEN Variable #117 = 0 // 0019 - // xxxxxxxxx 0020 - IF Variable #117 becomes = 1 // If Alarm is to be set then show on the buttons 0021 - // 0022 - // 0023 - // 0024 - // xxxxxxxxx 0025 - IF Variable #117 becomes = 0 // if Alarm is not to be set show on the buttons 0026 - THEN Variable #50 = 0 // 0027 - // 0028 - // 0029 - // 0030 - // xxxxxxxxxxxxxxxxxxx 0031 - // CHANGE ALARM CLOCK TIME 0032 - IF 112, Button Ocelot is pressed // hours 0033 - THEN Variable #115 + 1 // 0034 - IF Variable #115 becomes > 23 // 0035 - THEN Variable #115 = 0 // 0036 - IF 113, Button Ocelot is pressed // 0037 - AND Variable #115 is = 0 // 0038 - THEN Variable #115 = 23 // 0039 - THEN Skip to line 117 // 0040 - IF 113, Button Ocelot is pressed // 0041 - THEN Variable #115 - 1 // 0042 - // 0043 - // 0044 - // 0045 - // 0046 - IF 114, Button Ocelot is pressed // minutes 0047 - THEN Variable #116 + 1 // 0048 - IF Variable #116 becomes > 59 // 0049 - THEN Variable #116 = 0 // 0050 - IF 115, Button Ocelot is pressed // 0051 - AND Variable #116 is = 0 // 0052 - THEN Variable #116 = 59 // 0053 - THEN Skip to line 114 // 0054 - IF 115, Button Ocelot is pressed // 0055 - THEN Variable #116 - 1 // 0056 - // xxxxxxxxxxxxx 0057 - IF Variable #117 is = Variable #117 // convert hour and mins to var 118 for 0058 - THEN Variable #118 = Variable #115 // comparing with the real time 0059 - THEN Variable #119 = Variable #116 // ready to switch on the radio 0060 - THEN Variable #118 * 60 // 0061 - THEN Variable #118 + Variable #119 // 0062 - // xxxxxxxx 0063 - IF 114, Button Ocelot is pressed // if the time is changed 0064 - OR 115, Button Ocelot is pressed // 0065 - OR 112, Button Ocelot is pressed // 0066 - OR 113, Button Ocelot is pressed // 0067 - THEN Variable #120 = 1 // put to overide 0068 - THEN Variable #117 = 1 // 0069 - // xxxxxxxxxx 0070 - IF Variable #120 becomes = 0 // this will put it back to auto if brian at home 0071 - AND Variable #54 is = 0 // and we are at work 0072 - AND Variable #55 is = 0 // and Brian is home 0073 - THEN Variable #115 = 6 // set the time to 6-45 0074 - THEN Variable #116 = 45 // 0075 - // xxxxxxxxxx BRIAN AWAY TUESDAY 0076 - IF Variable #120 becomes = 0 // if over ride canceled 0077 - AND Variable #55 is = 1 // and Brian is away 0078 - AND Day of Week is = Monday (1) // set for 1 day ahead 0079 - THEN Variable #115 = 6 // set the time to 6-45 0080 - THEN Variable #116 = 45 // 0081 - // xxxxxxxx BRIAN AWAY REST OF WEEK 0082 - IF Variable #120 becomes = 0 // if over ride canceled 0083 - AND Variable #55 is = 1 // and brian is away 0084 - AND Day of Week is NOT = Monday (1) // set for 1 day ahead 0085 - AND Variable #56 is NOT = 0 // 0086 - THEN Variable #115 = 7 // set time to 7-45 0087 - THEN Variable #116 = 45 // 0088 - // 0089 - // xxxxxxxxxx 0090 - IF 158, Button Ocelot is pressed // BRIAN AWAY ON?OFF 0091 - AND Variable #55 is = 0 // 0092 - THEN Variable #55 = 1 // 0093 - THEN Skip to line 115 // 0094 - IF 158, Button Ocelot is pressed // 0095 - AND Variable #55 is = 1 // 0096 - THEN Variable #55 = 0 // 0097 - // xxxxxxxxx 0098 - IF Variable #55 becomes = 0 // 0099 - // 0100 - IF Variable #55 becomes = 1 // 0101 - // 0102 - // 0103 - // xxxxxxxxxxx 0104 - IF Variable #56 is = 0 // 0105 - AND Variable #120 is = 0 // 0106 - THEN Skip to line 120 // 0107 - IF Variable #57 becomes = Variable #118 // RADIO ON TIME 0108 - AND Variable #117 is = 1 // and the alarm cloc is set to on 0109 - THEN Variable #50 = 1 // then turn on the radio
|
|
Top
|
|
|
|
#15775 - 03/18/07 09:37 PM
Re: Morning Alarm (Wake Up) Code???
[Re: blawre0000]
|
sash18
journeyman
Registered: 08/31/05
Posts: 61
Loc: Melbourne
|
Thanks guy's, I'll try and put both of those into practice as soon as I have more gadgets connected to my LEO 2.
Now that I know how to make things work based on an alarm style control set from the night before;
How would I get the LEO 2 to recognise that its a Saturday or Sunday if I base everything to happen on a daily basis without using the alarm clock system above?
|
|
Top
|
|
|
|
#15777 - 03/19/07 02:41 PM
Re: Morning Alarm (Wake Up) Code???
[Re: Guy Lavoie]
|
sash18
journeyman
Registered: 08/31/05
Posts: 61
Loc: Melbourne
|
OOOOOOO this is good, thanks guy's/guy....lol
Cheer's Sash
|
|
Top
|
|
|
|
Moderator: Dan Smith, Monte G, ADI Tech Support, Guy Lavoie
|
1 registered
(kuro)
and 21 anonymous users online.
|
|
2747 Members
19 Forums
3837 Topics
22714 Posts
Max Online: 67 @ 08/16/11 03:08 PM
|
|
|
|
|
|
1
|
2
|
3
|
4
|
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
|
26
|
27
|
28
|
29
|
|
|
|
|
|