ECS-L Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
My Favorite Event
A.J. Griglak
Mon, 15 May 2000 19:49:32 -0400
Mon, 15 May 2000 19:49:32 -0400
This list has been pretty quiet lately.  In an effort to prime the pump for
a discussion, I throw out the question to all of you:  What is your favorite
ECS event?  Maybe it can spark some new ideas for everyone, or provide some
suggestions or comments about your event.

Mine is the first one that I created.  I actually thought it up even before
I even installed ECS, refining the idea in my head before writing the event.
That seems to be the best way for me to program ECS.

My wife and I watch TV while falling asleep 95% of the time.  At night when
going to bed, I push an X-10 button on my Ultimate remote
(http://www.x10.com/products/x10_ur47a.htm) - the best X-10 remote.  ECS
than performs the following:

Shuts off all lights, TV, Stereo downstairs.  In the "heating season" it
also turns off the heat downstairs.  Hank (my ECS computer) then announces
the status of the alarm clock - "Alarm is set for 7:30" or "Alarm clock
turned off," etc.  The lights in the master bedroom are dimmed to a very low
level.  A timer is set for 90 minutes.  After 15 minutes, the lights are
turned off.  At 80 minutes, a short announcement is made - simply "10",
meaning there are 10 minutes before the TV will shut off.  This way if I'm
still awake and watching a movie or something, I hit the X-10 TV on button,
and the sleep timer is changed back to 40 (subtracting a half hour).
Another short announcement - "40."  These are short so they won't disturb my
wife is she's sleeping - "Will you shut that thing UP!"  ;-)  If I had been
listening to some audio stuff - Winamp for example, that is also shut off.

In the morning, if the alarm clock is set, the heat downstairs will come on
30 minutes before the alarm is sounded.  If the alarm clock is off, the heat
comes on as we wake up.  When the alarm goes off, wind chimes are played
until I hit the same button that I hit to go to sleep.  If the alarm goes
off for more than 15 minutes, gunshots and a loud siren are played instead
of the wind chimes.  Hank then announces "Get your ass out of bed."  When
the awake button is hit, Hank responds with "Good morning, today is May
15th."  If there are any reminders set, they are announced here - "May 20th
is Dad's birthday"  Then the weather report is read.  Hank then says "Have a
good day."  [OK, the alarm clock is part of another event, but I included
some of it because of its close relationship with "Sleep"]

Once awake status is active, Hank announces the time every fifteen minutes
until 10:00 am.  This way we can keep track of the time if we need to get
out of the house at a certain time.  [Another event sounds a grandfather
clock chime hourly]

I've included the code for my event.  This is optional for the discussion.  

-=A.J.


Event:	Sleep				Called ?:No
	If	Sleep Timer		Is Now		75
	Then	Bedroom Lights		Set		Off
	;
	;
	BEGINIF	Sleep Timer		Is LE		30
	And	Sleep Timer		Is GT		0
	And	Sign Of Life		Is Now		True
	Then	Sleep Timer		Add		30
	Then	Text-A			T1<-Stt		Sleep Timer
	Then	Text-A			Set		Speak->VC
	ENDIF
	;
	BEGINIF	Sleep Timer		Is Now		10
	Then	Text-A			T1<-Stt		Sleep Timer
	Then	Text-A			Set		Speak->VC
	ENDIF
	;
	;
	BEGINIF	Sleep Timer		Is Now		0
	Then	Bedroom TV		Set		Off
	Then	Bedroom Lights		Set		Off
	Then	aud-ctrl		Set		Stop
	ENDIF
	;
	;-------------------------------Go to sleep
	BEGINIF	Button-A		Is Now		5/Off
	And	Awake			Is		True
	;
	If	Alarm-Clock		Is		Off
	Then	msg:Alarm-Clock Off	Set		Speak->VC
	Then	Sys:Event-Line		Set		LABEL1
	;
	If	Alarm-Clock		Is		On
	Then	msg:Alarm-Clock On	Set		Speak->VC
	Then	Text-A			T1<-Stt		Alarm-Clock time
	Then	Text-A			Set		Speak->VC
	;
	LABEL1:
	Then	Bedroom Lights		Set		36%
	Then	msg:Sleep		Set		Speak
	Then	Sleep Timer		Set		90
	Then	Awake			Set		False
	Then	A/V - Stereo		Set		Off
	Then	A/V - cassette		Set		Off
	Then	A/V - TV		Set		Off
	Then	Family Room light	Set		Off
	Then	kit - cabinet		Set		Off
	Then	kit - fridge lights	Set		Off
	Then	Kit - island		Set		Off
	Then	kit - sink		Set		Off
	Then	Sys:Event-Exit		Set		True
	ENDIF
	;
	;-------------------------------Wake up
	BEGINIF	Button-A		Is Now		5/Off
	And	Awake			Is		False
	Then	Awake			Set		True
	Then	msg:good morning	Set		Speak
	Then	Text-A			T1<-T1		msg:today is
	Then	Text-A			T1/A<-Stt	Time:Day
	Then	Text-A			T1/A<-Stt	Time:Month
	Then	Text-A			T1/A<-Stt	Time:Date
	Then	Text-A			Set		Speak
	Then	msg:Current temp	Set		Speak->VC
	Then	wx:cur temp		Set		Speak->VC
	Then	msg:today wx		Set		Speak
	Then	wx:today		Set		Speak
	Then	msg:have a good		Set		Speak
	Then	Sys:Event-Exit		Set		True
	ENDIF
	;
	;-----Announce the time every 15 minutes between
	;-----Awake and 9:45am
	If	Awake			Is		False
	Or	Time:Current Time	Is GT		10:00 AM
	Or	Time:Current Time	Is LT		6:00 AM
	Then	Sys:Event-Exit		Set		True
	And	Time:Minute		Is Now		15
	Or	Time:Minute		Is Now		30
	Or	Time:Minute		Is Now		45
	Then	Text-A			T1<-Stt		Time:Short
	Then	Text-A			Set		Speak->VC
	;
	; Reset awake/asleep if no buttons pressed
	If	Time:Current Time	Is Now		1:00 PM
	And	Awake			Is		False
	Then	Awake			Set		True
	;
	If	Time:Current Time	Is Now		5:00 AM
	And	Awake			Is		True
	Then	Awake			Set		False
	End


["application/ms-tnef" not shown]
  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.