Programming and Using X10 Scenes: A TutorialI. IntoductionOver the past two years X10 has been producing new “soft start” modules with many new features. The new features include soft start, resume dim, extended code Dirrect Dim, and extended code Group functions. Current units that have been identified as having the “new features” include:
A) X10 Units – LM465 Lamp Module, WS467 Wall dimmer, WS13a Dimmer (Decora),
B) X10Pro Units – PLM01 Lamp Module, PLW01 Wall Dimmer, XPDI3 Inductive Wall dimmer (Decora), XPD3 Incandescent Wall Dimmer (Decora), XPDF Inline Dimmer
While these are “Premium features” the ActiveHomePro software interface has not been updated to take advantage of them. Many users have experienced problems interfacing these units to Active Home Pro and are wondering whether they are worth the effort. The answer to this is
yes.
Step 1 in interfacing these units is to change the ActiveHomePro identification to a “LM14a 2-Way Lamp module”. OK, so now you’re saying “My unit is an XPDI3 Decora Style Inductive Dimmer”. No worries – these modules all use common IC’s. If your unit incorporates the “soft start feature” the LM14a interface should work.
Now that we’ve interfaced the “new unit” properly, it’s time to take advantage of one of the “new features". The “new feature” in question is the ability to assign these units to
X10 Scenes or Groups. Previously, this feature was only offered in Leviton, PCS, and Lightolier units which cost 4X the price of your X10 unit (at a minimum). Using this feature, you can program any number of units to a scene address (all on one house code) and, with a single command from AHP, turn that Scene on.
If you’ve noticed, I keep referring to this capability as “X10 Scenes or Groups”. That’s because different manufacturers each use their own terminology. The X10 protocol (which all units use) refers to “Groups” of units (groups that respond to 1 command). Most other manufacturers refer to groups of devices as “Scenes” (Leviton, Lightolier, PCS and Smarthome). Just a warning, I tend to use these terms interchangeably (as if this wasn’t confusing enough).
II. Hardware/Software Requirements –Before going any further, let’s go over what you’ll need to program and activate a scene:
- A newer “Soft Start” X10 unit (or Leviton unit) with scene capability.
- Active Home Pro with the Smart Macros plug in.
- If using a repeater, a newer extended code capable unit is required.
How do I know if my X10 unit supports scenes?Try re-identifying the unit as a “LM14a 2-Way Lamp Module” within AHP. If you can operate the module using the bright/dim slider in AHP, you have a new unit. These units are based on the same IC’s and include scene programming.
Most Leviton dimmers made since ’97 will also operate with the LM14a interface.
Why do I need the Smart Macros plug –in?In order to activate a scene, you’ll need the “advanced function” that’s included in the Smart Macro’s package.
What are X10 extended codes and how can I tell if my repeater and handle them?X10 extended codes are used to access the “advanced features” of these new units. Without going into the details of how repeaters function, older units simply can’t repeat these codes and therefore won’t amplify them (they simply pass them). The good news is that, if you are using the LM14a 2-way module interface in AHP, you are already using the extended code transmission format. Assuming that this is working, you have a passive coupler (not a problem with extended codes) or an extended code capable repeater.
III. The advantages of using Scenes (Groups).Active Home Pro already supports a form of “Scenes” by using macros, what advantage could using these new module “Scenes” offer?
The best way to explain this is through an example. The following assumes that you are already using the LM14a 2-way interface for your modules (uses extended codes). If you are not, the timing differences will be far greater than those shown.
So what are the differences in the above?
The “Standard sequence using extended codes” is a typical macro (using the LM14a interface). It communicates with my 6 modules, one at a time, and sets them to their proper levels.
The “X10 Extended Code Scene Activation” consists of 1 command telling all members of Housecode L,
Group 0 to execute their preprogrammed scene. The “group 0” consists of the same 6 units that are shown in the macro shown on the left.
The difference in the second macro is that I’m taking advantage of the “Smart group feature” of the units and
“pre-programming” them with their settings. When I execute the “Group 0 Command”, all of the units go to their preprogrammed Group 0 levels
at the same time. By “at the same time” I mean all 6 units Dim/Brighten, turn on/off simultaneously, not one at a time as in the Macro example. This is both more “esthetically pleasing” and less prone to error or interruption.
As a side note, I mentioned at the beginning that I “assumed” that you were using the LM14a extended code protocol for the scene on the left hand side. If this isn’t the case (you’re using one of the standard WS457, LM465, etc Interfaces) the left side macro timing would look a bit different, and would require roughly
9.5 seconds to execute.
IV. Programming Scenes: The Procedure.Programming scenes requires two steps:
1) Programming individual units with their scene level (bright/dim level) and scene number (group number). This is where most of the “work” is done. The following AHP macro performs the following steps:
- Sets my LM465 at address A2 to 81% output level
- Includes the LM465 at address A2 in “Group 0” at the current output level (81%)
- Sets my LM465 at address A1 to 51% output level
- Includes the LM465 at address A1 in “Group 0” at the current output level (51%)
- Sets my Leviton 6381 at address A3 to 0% output level.
- Includes the 6381 at address A0 in “Group 0” at the current output level (0%)
The above only needs to be executed once (you only need to program your units once). Keeping the macro around (disabled) can be handy for future reference.
2) Programming a AHP macro to “execute the scene” using the smart macro advanced function extended code (shown below). This is the easy part. Triggering macro G2 sends the extended code “Group Execute” command to the units I just programmed. They simultaneously go to their preprogrammed output levels (81%, 51% and off).
Sounds simple right? Well it actually is as long as you are accustomed to binary and hexadecimal notation. For those who are, the X10 document covering extended codes is located here (bottom of the link page)–
XTDCode FormatV. Choosing a Group FormatThere are actually 3 different extended code commands that can be used to program Group information into your modules. Let’s look at the command formats and explain the differences.
This is normally where I lose people. Binary and Hexadecimal notation?? Groups and relative addresses?? Don’t worry, we’ll break down the nuts and bolts later – it’s not all that complicated and you won’t need a degree in computer engineering to figure this out.
What I do want to get across here is that there are different types of commands. Each has its benefits.
1. Format 1 – This group format allows you to have up to 4 different groups on a given housecode.
- Housecode A can have 4 groups (G1,G0 = 0 to 3) and any device on that housecode can be a member.
- Housecode B would have a separate 4 groups of units.
- You cannot include units on different house codes in the same group.
- When a unit receives this command, it will include itself in the requested group at its current output level. In other words, you will need to set the desired output level of the device first, then issue the group include command.
- Newer Leviton units (HCM series) are not compatible with this format.
2. Format 2 – Since having only 4 groups (scenes) per housecode is a bit limiting, format 2 expands on this by adding the S0 – S3 relative address modifier.
- Total of 64 groups per housecode.
- The way that this has been implemented for the X10 units you wind up having 16 sets of 4 groups (G0,G1 = 00b to 11b= 4 groups). Set number is controlled by bit S0 to S3 (S3 to S0 = 0000b to 1111b = 16 sets).
- A given unit can still only be a member of a single set (still a max of 4 groups per housecode). In other words a unit cannot be a member of set 0 (S3 to S0 = 0000b) and set 1 (S3 to S0 = 0001b) at the same time.
- When a unit receives this command, it will include itself in the requested group/set at its current output level.
3. Format 3 – Format 3 is similar to format 1, bit it allows you to specify the output level of the device (B0 though B16). Since we are using 6 bits for the brightness level, we have 2^6 (64) different levels to choose from ( 000000b = Off, 111111b = 100%).
- Same group restrictions as the Format 1 commands.
- Newer Leviton units are not compatible with this format.
- Although it’s handy to be able to specify the output level, there are other ways of automating this with the Format 1 and 2 commands.
So, which format to use?
I tend to use Format 2 for my Leviton and X10 units. I like the fact that it allows more than 4 groups per housecode. For the purposes of this Tutorial, we’ll deal with the Format 1 group commands.
In addition to the programming commands above, you’ll need commands to “trigger” the scene (Group Execute Trigger) and remove devices from a scene. The formats for these commands are presented below. Again these will be broken down in the following sections.
VI. Format 1 ProgrammingSince Group programming with format 1 far more straightforward, we’ll use that as a starting point. Remember that this format limits you to 4 scenes per housecode.
The above format instructs you on how to construct the “Data” using binary notation (the “X” are “don’t cares”, i.e. they can be a 1 or 0). What we really need to output to the CM15a is Hexadecimal data. The following shows how to convert the binary “Group” bits to Hex data for output. Since we have 4 possible groups (0,1,2,and 3) we have 4 possible Data bytes (00h, 40h, 80h, and C0h).
The following macro shows how to assign a single unit to 4 different groups. The steps for doing this are:
- Set lamp A2 to 81%
- Include lamp A2 in group 0 at the current output level (81%)
- Set lamp A2 to 44%
- Include lamp A2 in group 1 at the current output level (44%)
- Set lamp A2 to 22%
- Include lamp A2 in group 2 at the current output level (22%)
- Set lamp A2 to 0% (off)
- Include lamp A2 in group 3 at the current output level (0%)
VII. Format 1 TriggerNow that the hard work of programming the group members is complete, all that is left is generating a macro to issue the “Group Execute Trigger” (extended code command 36H) to initiate the Group (scene). Fortunately, for format 1 groups, the data part of the Group Execute Trigger is identical to the group programming shown above. This makes things rather easy.
The following macro issues the Group Execute Trigger for groups 1 through 4 on housecode A. Basically, it’s the same data bytes that we used to program the units in the previous step. We’re just using the data with the 36H command byte to execute the scene.
VIII. Removing Units from GroupsSooner or later you will want to re-allocate your units between groups. If you want to move a unit from Group1 to Group2, you’ll need to remove it from Group1 and program it for Group1. X10 provides two instructions for removing units from groups (extended code 35H).
The first instruction shown above is Unit code specific. The second command applies to all units on a give house code (you can delete all of the groups on a house code with this one command).
The table below shows the bit coding for removing Groups 0 – 3 for the unit code specific command (msb = 0).
The bit coding for the house code specific command (affects all unit codes) is identical to the first table. It simply inserts all “1’s” in the msb of the data word (msb = Fh).
Applying the above to AHP macro’s, the first macro below will delete all of the groups from the unit(s) at address A1.
The second macro is not unit code specific (even though it shows an A1). It applies to all units on house code A and will delete all of the group information from them.
Notes on deleting groups: Most of my playing with group programming has been with Leviton and Smarthome units. Prior to writing this I did acquire 2 of the new LM465 Soft Start units to verify that they performed per the X10 standard.
I did find one curious difference in the LM465’s. After issuing a Group Delete command,
you must unplug (remove power) from the LM465’s for ~ 10 seconds. If you do not remove/reapply power the command will have no effect. It’s very possible that the same applies to the new switches (WS467, WS12, etc) as well. I don’t have any of these units so I cannot verify the removal procedure. If someone can verify this, I will happily add it to the Tutorial.
IX. ToolsYou might be surprised to find that you have access to a calculator with binary/decimal/hexadecimal conversion on your desktop. If you bring up the windows calculator and switch the “view” to Scientific, you’ll find that you can enter and convert between the various number formats.
I hope to be adding to this Tutorial (additional group programming examples) as time allows. Until then, Happy Automating-
Boiler
[/list]