Please login or register.

Login with username, password and session length
Advanced search  

News:

The Buster PiX10Hub is here! Created by the Community, for the Community.:)% #:)

Pages: [1] 2

Author Topic: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)  (Read 38948 times)

Boiler

  • Guest

    Programming and Using X10 Scenes: A Tutorial

    I.   Intoduction

    Over 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 Format


    V.   Choosing a Group Format

    There 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 Programming

    Since 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 Trigger


    Now 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 Groups


    Sooner 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.   Tools

    You 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]
    « Last Edit: October 25, 2009, 05:36:43 PM by Boiler »
    Logged

    Brian H

    • Community Organizer
    • Hero Member
    • ***
    • Helpful Post Rating: 289
    • Posts: 12766
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #1 on: October 19, 2008, 01:31:52 PM »

    Thank you again for all the work on the tutorials. Will be a BIG help to all users.
    One added 'Thank For Help' from me.  :)% :)%
    Logged

    TemplarJosh

    • Newbie
    • Helpful Post Rating: 0
    • Posts: 2
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #2 on: February 06, 2009, 10:21:24 PM »

    Great info, Helped me alot. I am having a little trouble  ???  I can do the 1st format no problem. Seems to be working fine, except for the Leviton. I want the leviton to work, but I am not sure how to use format 2, what do I code in? When I try to put 0000b in, it changes to 0B. Could yolu please post an example of the other formats?
    I have 4 WS467's and 1 HCM10 1000w dimmer. I want one program to dim all to 40% then another to bring all back to 100%.

    Can this be done.

    Thanks for any help,
    Josh
    Logged

    Boiler

    • Guest
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #3 on: February 07, 2009, 01:37:52 PM »

    Great info, Helped me alot. I am having a little trouble  ???  I can do the 1st format no problem. Seems to be working fine, except for the Leviton. I want the leviton to work, but I am not sure how to use format 2, what do I code in? When I try to put 0000b in, it changes to 0B. Could yolu please post an example of the other formats?
    I have 4 WS467's and 1 HCM10 1000w dimmer. I want one program to dim all to 40% then another to bring all back to 100%.

    Can this be done.

    Thanks for any help,
    Josh

    Josh,

    Welcome to the forum.  You've made my day by jumping into the deep end of X10 programming.

    Your Leviton HCM10 can be used along with your X10 units if you use the Format 2 for both (Leviton and X10).

    From your description, you are trying to program Group 0, Section 0.  The following illustrates how to program (command 30h) and execute (command 36h) units for Group 0, Section 0.  If you are using a different house code, simply substitute it in the extended code command.  Note that both your Leviton and X10 modules must be programmed using format 2 to allow them to respond to the format 2 GET (group execute trigger) command.



    Notice something I left out??  I do not remember how to remove Groups from the Leviton HCM units (this happens when you get to my age bracket).  The Leviton line of HCM units allow the units to be a member of up to 64 scenes at the same time (as opposed to 4 scenes for the X10 units).  As a result, the standard "Group remove" command won't work.  It can be done, I just don't remember how.

    Unfortunately, I'm not in a position to investigate this right now.  My X10 system has been disassembled and my documentation is located on my now inoperative Linux server (motherboard sitting in front of me).

    I'm hoping another forum member may be able to provide insight on how to perform a "group remove" on the HCM units.  At worst, you should be able to reset the switch by performing an "address capture" (I hope).

    Try some experimenting and let us know how things are progressing.

    Boiler
    « Last Edit: October 25, 2009, 05:39:08 PM by Boiler »
    Logged

    TemplarJosh

    • Newbie
    • Helpful Post Rating: 0
    • Posts: 2
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #4 on: February 07, 2009, 03:21:31 PM »

    Thanks a bunch, I will try playing around with it & I will post my progress.  ;D
    Logged

    dellzip

    • Full Member
    • ***
    • Helpful Post Rating: 1
    • Posts: 29
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #5 on: February 13, 2009, 07:40:23 AM »

    Thanks...

    [Removed quote. A repeat of Boiler's original post is not required to say thanks.]
    « Last Edit: February 13, 2009, 09:48:14 AM by Puck »
    Logged

    whsbuss

    • Full Member
    • ***
    • Helpful Post Rating: 2
    • Posts: 60
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #6 on: September 11, 2009, 12:31:11 PM »

    Have a quick questions on this. I plan on getting newer lamp modules and wall switches which (hopefully) support soft-start. After I setup my scenes using as described can the be stored in the CM15a?

    Can I control a single device with my palm remote as I do now or will it turn on to the dim level?
    Logged

    Charles Sullivan

    • Hero Member
    • *****
    • Helpful Post Rating: 94
    • Posts: 1565
      • HEYU - X10 Automation for Linux, Unix, and Mac OSX
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #7 on: September 11, 2009, 01:26:35 PM »


    Boiler:
    Quote
    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.

    The module group programming is stored in volatile memory and will be forgotten in the event of an interruption in AC power.  You may want to expand the above statement.

    Logged
    Yesterday it worked.
    Today it doesn't work.
    X10 on Windows is like that.

    HEYU - X10 Automation for Linux, Unix, and Mac OS X     http://www.heyu.org

    Boiler

    • Guest
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #8 on: September 12, 2009, 02:07:05 PM »

    Have a quick questions on this. I plan on getting newer lamp modules and wall switches which (hopefully) support soft-start. After I setup my scenes using as described can the be stored in the CM15a?

    Can I control a single device with my palm remote as I do now or will it turn on to the dim level?

    whsbuss,

    The new softstart units can be programed to respond as described above but it is not "required".  Scenes are simply a way of getting multiple units to respond to a single command.  The scene programming resides in the units themselves. 

    As an example, I can program a group of four units to do the following in response to a group 1 command:

    • LM465a at A1 go to 80%
    • WS467a at A2 turn off
    • LM465a at A3 go to 50%
    • WS467a at A10 go to 80%

    Upon issuing the group command from the CM15a, all of the above units will respond in unison.

    You can accomplish the same function with a macro in AHP, but it would require 4 separate commands.  As a result, the units will respond sequentially.

    Using a palmpad (On/Off) command with a softstart unit will transmit a normal X10 On/Off command.  Your unit will go to the last programmed level (resume dim feature).  Using a dim/bright command on the palmpad will work with the LM465a units, but not with the WS467 if it is in the off condition.  When off, the WS467 will not respond to a bright/dim command.

    Again, you can program a macro to get around this.  You would use the pamlpad to activate the macro (on/off) and the macro would communicate with your units using the LM14a interface (Extended code).  Using the LM14a interface within AHP gets around the resume dim problems by using the extended code protocol.

    The above most likely reads like Greek since you don't have any softstart units to play with.  Nonetheless, there are ways around most problems presented by the newer units.

    Boiler
    Logged

    Boiler

    • Guest
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #9 on: September 12, 2009, 02:14:22 PM »

    The module group programming is stored in volatile memory and will be forgotten in the event of an interruption in AC power.  You may want to expand the above statement.

    Charles,

    That's a news item for me.  I had assumed that the newer units utilized EEprom memory (like my Insteon units).  Once again, this is somewhat of a feature since the group remove function is rather a pain in the butt.  The group remove command is unnecessary if you can simply cycle power to the device and remove all of the group programming.

    I'm not in a position to verify it, but I don't believe that my Leviton units will reset on a power removal.  I think I've tried this in the past (although going on memory is a dangerous thing for me).

    Would you happen to have any Leviton units that you could try this on?

    Thanks for the correction,
    Boiler
    Logged

    Charles Sullivan

    • Hero Member
    • *****
    • Helpful Post Rating: 94
    • Posts: 1565
      • HEYU - X10 Automation for Linux, Unix, and Mac OSX
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #10 on: September 12, 2009, 06:24:11 PM »

    The module group programming is stored in volatile memory and will be forgotten in the event of an interruption in AC power.  You may want to expand the above statement.

    Charles,

    That's a news item for me.  I had assumed that the newer units utilized EEprom memory (like my Insteon units).  Once again, this is somewhat of a feature since the group remove function is rather a pain in the butt.  The group remove command is unnecessary if you can simply cycle power to the device and remove all of the group programming.

    I'm not in a position to verify it, but I don't believe that my Leviton units will reset on a power removal.  I think I've tried this in the past (although going on memory is a dangerous thing for me).

    Would you happen to have any Leviton units that you could try this on?

    Thanks for the correction,
    Boiler

    Boiler,
    The loss of group settings is not instantaneous - it may survive for 10-30 seconds of power interruption.

    Sorry, I don't own any Leviton devices.   If the Leviton address was set with codewheels it probably behaves the same as X10.  But if it already had nonvolatile memory to store the address, it would make sense to store group settings there also.

    It's too bad AHP hasn't the capability for executing a macro upon restoration of AC power after an interruption.  I'm pretty sure the CM15A notifies the software following a power interruption as the old CM11A does.

    Regards,
    Charles Sullivan
     
    Logged
    Yesterday it worked.
    Today it doesn't work.
    X10 on Windows is like that.

    HEYU - X10 Automation for Linux, Unix, and Mac OS X     http://www.heyu.org

    whsbuss

    • Full Member
    • ***
    • Helpful Post Rating: 2
    • Posts: 60
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #11 on: September 13, 2009, 10:49:24 AM »

    Boiler,

    Actually is makes perfect sense. I currently have a macro that turns on evening lighting in my family room using the sequential method since none of my devices have soft start. It takes 5-8 seconds to get the lighting to the dim levels.

    Using soft start I would re-write the macro to execute a group command to set the lighting after programming the devices to their pre-set levels. During day hours we use the palm remotes to switch and dim some of the evening lights. We also dim/bright some devices in the scene for reading purposes, etc.

    So let me know if this would work:

    1. change the housecodes from their "A" code to say "C"
    2. pre-set devices to the evening levels and put them in an extended code group to execute at dusk
    3. create macros for each device to receive "A ON" from the palm remote and execute their respective
    "C extended code" for 100% bright.

    So I would need something to dim/bright each device from the palm remote. Also would any manual operation of these devices nullify the pre-settings for the evening lighting macro?
    Logged

    Boiler

    • Guest
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #12 on: September 13, 2009, 01:35:40 PM »

    whsbuss,

    You've nailed the operation.  The sequence you outlined should work fine.

    Also, manual operation should have no effect on the group settings.  When the units receive the group execute command, they will go to their defined states regardless of their current state.

    Have fun,
    Boiler
    Logged

    Mellowmark

    • Hero Member
    • *****
    • Helpful Post Rating: 6
    • Posts: 195
    • M M Electric
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #13 on: October 07, 2009, 09:49:28 PM »

    wow this is some very complex program info.  Do i understand that if i set a device up for a scene on say house code A with a group setting to dim to 45percent it will forget the group setting when I lose power.  like unplug it. or something, because if i figure out how to program it the first time I sure in the heck don't want it to forget what I did...    seems like I might have to get the cm15 to reprogram all my  scene settings every time it turns on like maybe that's why it sends out that p 16  command i herd of.
    Logged
    M M ElectricMan

    HA Dave

    • Hero Member
    • *****
    • Helpful Post Rating: 174
    • Posts: 7027
    Re: Tutorial - Soft Start Unit Scene Programming (A Work in Progress)
    « Reply #14 on: October 07, 2009, 10:27:03 PM »

    Impressive!
    Logged
    Home Automation is an always changing technology
    Pages: [1] 2
     

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