Please login or register.

Login with username, password and session length
Advanced search  

News:

The New WIFI Module is now available!
                   *****Here's the link******

Author Topic: Voice Controlled Wakeup Macro  (Read 15223 times)

glacier991

  • Sr. Member
  • ****
  • Helpful Post Rating: 11
  • Posts: 83
Voice Controlled Wakeup Macro
« on: April 26, 2010, 01:22:12 PM »

I have a fairly robust X-10 based HA system, running AHP 3.236 with all the plug ins, and including Bill's BVC voice control (which is still in its infancy insofar as implementation is concerned - another story though). I have set up my voice control to actually "interact" with me in a semi conversational setting in some instances. One day I was postulating a "discussion" about going to bed and having my "AI Butler", Mike, turn off the lights for me. I thought it would be cool if I could also have him ask if I wanted to be awakened in the am, and if I replied affirmatively, then ask what time, and follow that command the next morning. It seemed a little far fetched and I dropped it.

Like so many things, it just would not go away and I started thinking about how, using macros, conditions and possibly flags or timers, I might make it happen. I discussed my ideas with Dave X-10 and Bill Johns (creator of BVC) and they gave ideas and encouragement. The result is that I can ask "Mike" to wake me at either 6 AM, 7am or 7:30 am and he will do so.

Before I post the macro, let me describe how I get awakened under this scheme, and the general components of the programming that make it work.

CONCEPT

My bed has a "lightbar" between two drawer/armoire units on either side of the head of the bed. I use it to read and for general illumination, and X-10 controls it. I also have an X-10 chime in my bedroom. These form the "alarm".

If I want to awaken at 7 (for example) the following occurs: at 6:40, the lightbar comes on and dims to 50% and the chime sounds. At 6:50 the lightbar goes up to 75% and the chime sounds. Then at 7am, the lights come on full and the chime sounds twice, and Mike speaks to me telling me good morning, and that it is time to get up, and the jetson's theme song (well an abbreviated version) plays.

IMPLEMENTATION SCHEME

To make this work by voice control, I had to set up 3 things.

First I set up 3 phantom modules - using on/off switches. I assigned each a monitored address - in my case A8 for 6AM, A12 for 7AM and A14 for 7:30AM. These I control using BVC to turn them on. (If BVC "hears" me say "Wake me at Seven Thirty", for example, A14 switch goes to the "ON" position - and similarly for 6 am and 7 am setting the appropriate switch to "ON"). [I add that is you don't have BVC you COULD just manually turn these on using a remote or within AHP, just less "gee whiz" - try BVC, you'll love it.]

Next I created a long macro to accomplish the sequence of turning ON the lightbar and sounding the chime.. this was pretty basic, and used delays to do the sequencing. It had enough events though that the 1st  Macro (at address E1) has to call E2 at the end to pick up the work and in turn E2 calls E3 to finish. These series are specific to my situation, and anyone doing their own would need to create one to do what they wanted it to do to wake them. At the end, E3 turns off ALL wake up switches, resetting the wake up for another cycle the next day. The call for E-3 is also the BVC listener trigger to have "Mike" wish me good morning.

Finally, I set up 3 conditional Macros that run off a timer. One starts at 5:40, one at 6:40 and one at 7:10. Each looks to see if it's "alarm switch" (the 6am, 7 am or 7:30 am Voice controlled phantom switch) is on. If it is, it starts the E1 wake up macro. If not, it does nothing. Presumably, only one wake up switch has been set, and that is the one that will run, and because the timed conditional macro started the wake up sequence at the "right" time, all works as planned.

MACRO AND DESIGN SPECIFICS

In a room I have called Wake Up, I have installed 3 appliance switches, labeled 6 am wakeup, 7 am wakeup and 7:30 am wakeup.

I have a series of 3 macros called Wakeup macro 1, wakeup macro 2 and wakeup macro 3. They are addressed E1, E2 and E3 respectively.

Wakeup Macro 1 (address E1) contents:

Trigger E1 ON

Bed lightbridge A2 ON 50%
Delay 5 seconds
Bedroom Chime
Delay 10 minutes
Bedroom lightbridge A2 70%
Delay 2 seconds
Bedroom Chime
Module Control E2 ON

Wakeup macro 2 contents

Trigger  E2 ON

Delay 10 minutes
Bedroom lightbridge on 100%
Delay 2 seconds
Bedroom chime
Delay 10 seconds
Bedroom Chime
Module Control E3 on

Wakeup Macro 3 contents

Trigger E3 ON  (the BVC voice of Mike saying "good morning" triggers off this command using a listener)

6 am wakeup module (A8) Off
Delay 1 second
7am wakeup module OFF
Delay 1 second
7:30 wakeup module OFF
Delay 10 seconds
Issue X10 command E10 (triggers a listener in BVC to play Jetson's theme song)

Conditional macros

6am wakeup

Trigger E6
Timer set to turn on macro at 5:40 AM
Delay 2 seonds
Module Control E1 On

Conditions 

E6 on (by timer as above)
and
Module status of A8=ON

7AM wakeup identical except for looks to se if Module A12 is on, 7:30 wakeup looks for A14 to see if it is on.

All macros can be either run from computer or interface.

That's it.  Have fun!
« Last Edit: May 16, 2010, 01:06:43 AM by glacier991 »
Logged

HA Dave

  • Community Organizer
  • Hero Member
  • **
  • Helpful Post Rating: 172
  • Posts: 6408
Re: Voice Controlled Wakeup Macro
« Reply #1 on: April 26, 2010, 04:17:51 PM »

Awesome!

This is the type of human-computer interaction that every geek, or nerd [or otherwise overtly intelligent young man] has dreamed of. This is certainly what I would call a S.A.R.A. approved macro. I think we are still just at the beginning of what can be done with X10, the CM15A, AHP, and BVC. Thank you for inspiring us all.

Now... maybe a macro that detects that you are preparing for bed... and can remind you to set a wake-up call.
Logged
Modern automation is much more than turning things on and off.
The use of Home Automation is limited... only by our imaginations.

glacier991

  • Sr. Member
  • ****
  • Helpful Post Rating: 11
  • Posts: 83
Re: Voice Controlled Wakeup Macro
« Reply #2 on: April 26, 2010, 05:26:23 PM »

"Now... maybe a macro that detects that you are preparing for bed... and can remind you to set a wake-up call."

No, before that is the one that will visit the bathroom for me in the middle of the night, leaving me to sleep. -:)

[Actually a motion detector and a conditional macro timed for the bedtime hour could easily accomplish what you seek]
« Last Edit: April 26, 2010, 07:20:43 PM by glacier991 »
Logged

Knightrider

  • Community Organizer
  • Hero Member
  • **
  • Helpful Post Rating: 60
  • Posts: 1623
  • I love my WM100!
    • This Automated House
Re: Voice Controlled Wakeup Macro
« Reply #3 on: April 26, 2010, 07:58:14 PM »

Genius!

+1 from me
Logged
Remote control is cool,

but automation rules!

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1428
  • He's just this guy. You know?
    • wgjohns.com
Re: Voice Controlled Wakeup Macro
« Reply #4 on: April 27, 2010, 02:51:37 AM »

So, that's what all those questions were about!   ;)

A wonderful example of how to "think outside the box" and get around the "limits" of AHP, BVC and X10 to do something that most would expect was "impossible".   8)   :)%

A "helpful" from me, as well! #:)

 >!
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!

IPS

  • Hero Member
  • *****
  • Helpful Post Rating: 3
  • Posts: 180
Re: Voice Controlled Wakeup Macro
« Reply #5 on: July 13, 2010, 07:53:54 PM »

That is a good one.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.