Phil
I’ve cut this out of Craigs how to Doc
I use this with my LD 11 and it works very well
Hope it helps the Brain fade J
Mike
RESTORING X-10 LIGHTS TO THEIR PRIOR LEVEL
INTRODUCTION
Many
people
like to use their home automation system to temporarily turn lights on or
off,
then return them to their prior level. Here are some common uses:
·
Have
an “All Lights On” command which you run if you hear a noise
and want to scare
off a potential intruder. But
later, you’ll want to put the lights back where they were. You probably don’t want to
just do “All
Lights Off”, as that will turn everything off.
·
A
porch light is left on at a dim level throughout the night. But when a motion sensor detects
motion, the light goes to full brightness. After a few minutes, the light should return to the
previous
level (not just be turned off).
Both of
these
scenarios require the automation system to store the initial level of the
light(s), then later return the lights to the same level. HomeVision is one of the very few
systems that provide this capability.
Most other systems would, at best, require you to use flags to keep
track of the on/off state of each light, then turn the light on or off
based on
these flags. You could never
keep
track of the level of a dimmed light and restore it with such
systems.
HOMEVISION COMMANDS
HomeVision
has
two primary commands to implement this feature:
X-10
Module ## - Put Current Level Into Variable ##
X-10
Module ## - Set To Level In Variable ##
The first
command puts the X-10 light’s current level into the specified
variable. Use it to store the light level
prior
to changing it. The second
command
sets the light to the level contained in the specified variable. Use it to restore the light to the
previous level.
EXAMPLE
Here’s an
example of how to use these commands.
It shows how to implement a simple “All Lights On” macro
and a “Cancel
All Lights On” macro.
Assume you
have three X-10 light modules:
A-1
= Family Room Light
A-2
= Dining Room Light
A-3
= Bedroom Light
First,
create
three variables to temporarily hold the light levels:
Variable
#1 = Family Room Level
Variable
#2 = Dining Room Level
Variable
#3 = Bedroom Level
Next,
create
the “All Lights On” macro with these commands in
it:
X-10
A-1 (Family Room Light) - Put Current Level Into Variable #1 (Family Room
Level)
X-10
A-2 (Dining Room Light) - Put Current Level Into Variable #2 (Dining Room
Level)
X-10
A-3 (Bedroom Light) - Put Current Level Into Variable #3 (Bedroom
Level)
X-10:
Transmit House Code ‘A’ ALL LIGHTS ON
Finally, create the “Cancel All Lights On” macro
with these
commands:
X-10
A-1 (Family Room Light) - Set To Level In Variable #1 (Family Room
Level)
X-10
A-2 (Dining Room Light) - Set To Level In Variable #2 (Dining Room
Level)
X-10
A-3 (Bedroom Light) - Set To Level In Variable #3 (Bedroom
Level)
Here’s how
this works. The “All
Lights On”
macro first stores the initial light levels into the three variables, then
turns them all on. When you
later
run the “Cancel All Lights On” macro, it will set the lights to
the levels
specified in the three variables, thereby putting them back where they
were.
TECHNICAL NOTE
Different
variable values are used to indicate the module's current state (On, Off,
or
Neutral), as follows:
Off
=
255
Neutral
=
254
On
=
0 to 16 (depending on the light's level)
You don't
have
to be concerned with this if you use the "Put Current Level Into
Variable
##" to get the current level and then use the "Set To Level In
Variable ##" command.
CONCLUSION
As you
expand
your home’s lighting system controls, you’ll run into many
other cases where
you want to restore a light to a previous level. HomeVision provides this ability, allowing you to
develop an
elegant, professional lighting system.
Mike
Sent from Home
-----Original
Message-----
From: Phillip Harris
[mailto:phillip.harris1@xxxxxxx]
Sent: Sun 08 Apr 01 18:37
To: ukha_d@xxxxxxx
Subject: [ukha_d] HomeVision
programming query...
Hi Guys,
Just starting to actually look at *programming* HomeVision rather than
using
it as an expensive X10 timer ... looking for a pointer as to how
to
implement the following:
I have a macro "Cinema Mode" in which the X10 part drops my
screen (using an
SW10G), turns on my video scaler (using an LW10) and - with this being
the
part I need help with - dims my lights with an AD10/11 (DIN rail dimmer
with
preset dim capability). There is a further macro "TV Mode" in
which the X10
part reverses that process.
I know I'll need three variables "tv dim" "cinema
dim"
and "lights were on"
to implement this but I'm just having trouble deciding how to code this
as
I
want the lights to work semi intelligently but I guess the following is
what
I need to do...
Upon execution of the "Cinema Mode" macro:
IF (lights are on) THEN
lights
were
on = TRUE
tv dim =
(current lamp brightness)
IF
(cinema
dim < tv dim) THEN
SET(current lamp brightness) = cinema
dim
ENDIF
ELSE
lights
were
on = FALSE
ENDIF
Upon the execution of the "TV Mode" macro:
cinema dim = (current lamp
brightness)
IF (lights were on = TRUE) THEN
SET(current
lamp brightness) = tv dim
ENDIF
Just haven't been able to get my head quite round the HomeVision
programming
instructions yet to be able to do this ... any starting points would
be
greatly appreciated as I've just got a complete mental no go area of
even
how to start getting HV to do this!
Cheers
Phil
Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.