XTension Logo

Making it a little easier and smarter !

We've managed to get the coffee pot and bed lamp to come on each workday morning, but not only are there other things to manage in the morning, the manual scheduling of events is just too much of a bother !

Although it may be a while before you have accumulated a 'lot' of devices in your system, if you start early, it will be easier later to add things to what you want XTension to do each Morning.

What we need is a single place where we write down all of the things that we want to happen when we say that it's time for "Morning Wakeup".

From then on, we need only modify those 'orders' whenever we want to change our minds. Just like when you change the morning orders for your maid.

In XTension, we can create sets of orders with Scripts.

Don't run away, this is going to be easier than you ever thought.

Pulling down the Scripts window,
and selecting New Global Script,
the Edit Script window appears.

If we want the coffee to come on and then 15 minutes later, the bedside lamp brightens, then this is all we have to type in :

OK, so the
15*minutes thing looks funny, but this is how you say minutes instead of hours or seconds or days...

But come on,
this isn't that bad...
Wake Up?

Click Save
XTension asks for a name.
Name this script "Morning Things"

This name will now appear in the list under the Scripts menu whenever you pull it down.

From now on, whenever we want these things to happen, we just tell XTension to perform the "Morning Things".....

We want these things to happen on weekday mornings, so we need only create a new scheduled event which will 'execute' this script on the days and at the time we want. We need only pull down the Scheduled events window, and create a new scheduled event like before :

Let's name the new event "Morning Wakeup"

and tell XTension to 'execute' it

every weekday at
7 AM

wake event

The coffee will be ready now each weekday morning just as the lamp
next your bed brightens up to 50 percent. !

BUT, this time
we've got a single place where we add things which are done in the morning, and we can now use the same script to wake us up on the weekends, but maybe a little later ...like this :


Notice that this time we call it "Weekend Wakeup"
and wait until 8:30AM ....!

WHOA !, did you get it ?

We forgot something !

The Coffee Pot and the Bed Lamp are still left ON in the mornings !

We need to make a few changes to the "Morning Things" script.

The coffee pot shouldn't stay on for more than two hours,
whenever we turn it on.
And couldn't we decide to turn on the coffee pot at any hour?

So, why don't we do something special to the Coffee Pot which
will make it turn OFF in exactly two hours,
any time we turn it on ?
( So I'm a purist and after two hours it is either gone or goo... )

The Coffee Pot is a special appliance, (like the towel warmers and the curlers). Anytime we turn it on, it's a pretty good chance that after two hours, it should be turned off. Although your preferences may vary, you can certainly see how the following logic would take care of the Coffee Pot (et al) :

Notice: Units normally do not need scripts at all !
The Coffee Pot is a special case where we know that whenever
it is turned ON, we want to turn it OFF after a certain period.

A common misconception is that you must create a script
for every unit before any commands can be sent.
This is not necessary.
For example the Bed Lamp in this example has no scripts at all.

By attaching a simple script to the coffee pot, we are creating somewhat of an intelligent coffee pot that always knows to turn itself off (like an "object" in the current programming world).

Let's make sure that every time we turn the Coffee Pot ON, that we schedule a 'one time event' which will turn the Coffee Pot OFF in two hours.

You need only select the "Coffee Pot" in the Master List,
and an OPTION-O ... will take you directly into the
XTension mini script editor, looking at the ON script for the "Coffee Pot" :

Simply type in this line.

Anytime XTension sees the Coffee Pot turn on, it will schedule an event to turn the Coffee Pot off in two hours...

You don't have to use the pop-down selectors, if you can tpye gud...

Now the Coffee Pot will take care of itself,
regardless of when we turn it ON.
Now let's take care of the Bed Lamp...

On weekday mornings, we certainly don't want it to stay on after we've gone to work. Let's just make it simple for now and add a line to the "Morning Things" script :

We only need to add the line that says "dim Bed Lamp ...."

Ok, what happens if I wake up early and want to start the coffee and turn on the lamp right now ?

Back to Home Page
Macros ?

Copyright 2007, Sand Hill Engineering Inc. All rights reserved.

Mac Made

Last modified: July 1, 2007
Michael Ferguson, webmaster@shed.com