-
Notifications
You must be signed in to change notification settings - Fork 130
x10 dimming
There is a lot of confusion about dimming X10 lamp modules and wall switches in Misterhouse. I will try to address the following issues to hopefully shed some light (pun intended) on the issue:
- X10 commands that effect dimming
- Dimming capabilities of various X10 lamp modules and wall switches
- Limitations of various X10 interfaces
- Dimming and X10_Item
- Strategies for keeping track of dim levels in Misterhouse
The four basic X10 commands supported by all interfaces and all the dimmable lamp modules and wall switches are on, off, brighten, and dim. Usually, if a light is off, sending an on, brighten, or even a dim command will turn the light on at full brightness. There are some modules that remember the previous brightness when turned off and will return to that level the next time it's turned on, and some can be programmed to come on at a set brightness. Some modules will go to full brightness if you send two on commands in a row. These command sequences are usually detailed in the module's manual.
There are also X10 commands for setting the brightness level directly, but you have to pay more for modules that accept these commands.
The original method specified by the X10 company used the "preset dim 1" and "preset dim 2" commands with a preceeding housecode command. The housecode specifies the dim level, which differs from the way all other X10 commands work. This method was never used by the X10 company and has been removed from their protocol specification, though there are still some third party modules that accept these commands (from Switchlinc and PCS, for example.)
The currently prefered method for setting brightness level directly uses the "extended data" X10 command. The first module from the X10 company to support this method was the LM14A lamp module, which is why you will see it refered to often in the Misterhouse code and documentation. Many third party modules support this method including Leviton.
Other commands related to dimming are the status commands: "status", "status on", and "status off". These commands are supported by modules that advertise "Two Way" capability, like the LM14A. Modules with this capability will report to Misterhouse any dim level change made locally, and can also be queried for their current brightness setting.
For a complete list of X10 commands supported by Misterhouse, see http://w3.misterhouse.com:81/faq.html#2_15__what_is_the_format_of_misterhouse_x10_codes
Inexpensive modules are usually "dumb" and don't support the direct dim commands or two way capability. Usually these modules come on at full brightness. Misterhouse keeps track of changes it makes to "dumb" modules, but easily gets out sync when local changes are made.
Some modules support direct dim, but not two way. So Misterhouse will not know about changes made locally at the switch.
There are at least 22 dim levels in all dimmable lamp modules and wall switches (including on and off.) That is, if you turn on a light and then send 21 dim commands, it should end up at 0 brightness (off.) Modules that support the older preset dim commands have 32 dim levels. Modules that support the new extended data dim commands have 64 dim levels.
Currently, only the ACT TI-103, BSC, CM11, Lynx10PLC and Ocelot interfaces support sending the extended data dim command (&P in Misterhouse.) Only the Lynx10PLC interface knows how to receive extended data dim information from two way capable modules. Also, many of the interfaces do not support the "preset dim 1" and "preset dim 2" commands.
You can't use any of the direct dim or status commands with the CM17.
Most of the complexity of the low level X10 commands is hidden from the user by the X10_Item. You can set an X10_Item to any brightness level from 0% to 100%. It will select the closest level and the commands supported by the device. You can also increase or decrease the brightness relative to the current level. The change can be in points or a percentage. For example, if the current level is 80% and you set the item to "-50", the result will be 30%. If you set it to "-50%" instead, the result will be 40%.
If you have a dumb lamp module, Misterhouse will assume it comes on at full brightness and keep track of changes in 5% increments. So if you turn a light off, then set it to 90%, Misterhouse will send "off, on, dim, dim". If you later set the light to 75%, Misterhouse will send "dim, dim, dim".
If you have a module that supports the extended data dim command, put lm14a, preset, or preset2 in the options field of your X10I entry in your mht file. This will change the behavior of your X10 item and cause it to use the extended data dim commands when you set the level explicitly (40%) or when you change the level relatively (+35, -50%).
Use the preset3 option or the X10_Switchlinc item to work with modules that support the "preset dim 1" and "preset dim 2" commands.
If you have a two way capable module, changes made locally at the switch should be reflected in your item.
A strategy used by some with dumb modules is to never turn a light off, but instead send 22 dim commands. This way, the light can be ramped up slowly later without the harsh full on. However, it takes over ten seconds to send 22 dim commands.
created by David Norwood