Dimmer Extender - Brightness at a Different Rate Each Time
Posted: Tue Sep 04, 2012 1:00 am
Dimmer Extender 1.1.1
(FREE Indigo plugin)
Download version 1.1.1 here.
Dimmer Extender extends Indigo's functionality by adding the ability to specify a different dimming/brightening rate each time you set the brightness of a SmartLabs INSTEON dimmer. It also allows you to create Indigo triggers based on the start and stop brightening and dimming INSTEON commands not otherwise triggerable through Indigo.
When using Dimmer Extender to brighten or dim your SmartLabs INSTEON dimmers, it offers the following options.
And when using Dimmer Extender events to trigger actions in Indigo, it offers the following trigger-able events.
Installation
Download the Dimmer Extender zip file (link above) to the computer running the Indigo server. If the file is not already unzipped, double-click the .zip file to unzip it. Open the folder that is expanded from the zip file and double-click the Dimmer Extender.indigoPlugin file. The Indigo client will open and prompt to install the plugin. Click the option to install and enable the plugin. You'll be prompted to configure the plugin. The only configuration is to enable debugging. You won't want to do this unless trouble-shooting a problem, so just click OK. All done!
Usage
Within any Indigo action dialog (from a Trigger, Action Group, Schedule, Control Page action, etc), with Indigo 5, set the action "Type" to "Plugin". Select "Dimmer Extender" as the plugin to use. For Indigo 6 and later, simply go to the "Device Actions" menu and the "Dimmer Extender Actions" sub-menu. Select the Action "Set Brightness with Ramp Rate" (the only action available). Choose a device from the "Device" menu that appears. Click "Edit Action Settings...". Follow the instructions in the "Configure Set Brightness with Ramp Rate" dialog that appears.
When createing an INSTEON Start/Stop Brightening/Dimming trigger, within Indigo 5, select "Plugin" as the event Type. With Indigo 6 and later, select "Dimmer Extender Events" from the Type menu. Select the brightening/dimming event type. Click Edit Event Settings and select the INSTEON dimmer device you want the trigger to be based on. Select the Button or Group to monitor. Not all devices send commands on all 8 groups listed. For example, the SwitchLinc Dimmer only sends button/group 1 commands. A 4-button RemoteLinc 2 only sends on button/groups 1 through 4 and an 8-button RemoteLinc 2 sends on all 8 button/groups. The 6-button KeypadLinc Dimmer and Relay send on button/groups 1 through 6 while the 8-button versions send on all 8 button/groups. Be sure to test the trigger after selecting the button/group to be sure it is being triggered off the correct button.
Scripting Examples:
Dimmer Extender (like all Indigo plugins) supports embedded scripts within Indigo actions. Scripting the "Set Brightness with Ramp Rate" action can be most useful when you want to dim the lights quickly sometimes and slowly at other times, based on other conditions in the room. For example, if you're watching a movie in your family room, you may want the lights to only come on to 25% brightness, brightening slowly when activated by motion in the room, but come on to 100% brightness more quickly if you're not watching anything. Here are some examples of how to use embedded Python scripts within Indigo actions to execute the "Set Brightness with Ramp Rate" action.
Set brightness of "Master Bed Dresser Lamp" to 50 percent at a ramp rate of 6.5 seconds.
Set brightness of "Front Porch Light" to 100 percent at the fastest ramp rate possible, retrying 2 times if there are INSTEON send errors.
Turn off "Family Room Lights" at a ramp rate of 4 minutes, 30 seconds, delaying the INSTEON command by 0.5 seconds.
Start manually increasing brightness of "Dining Room Light".
Start manually decreasing brightness of "Dining Room Light".
Stop manually changing brightness of "Dining Room Light".
Increment the brightness of "Hallway Light".
Decrement the brightness of "Hallway Light".
When executing the "setBrightness" action through a Python script, the only properties required are "brightness" and "rate". All other properties like "delay" and "retries" are optional. It's also important to note that SmartLabs INSTEON dimmers have a limited number of ramp rates to choose from. Dimmer Extender will choose the ramp rate closest to the number of seconds you specify if the ramp rate you send for the "rate" does not match a preset rate on the dimmer. The maximum dimming time is 480 seconds (8 minutes). The minimum is 0.1 seconds. Dimmer Extender also has limits on how long it will delay sending an INSTEON command and on how many retries it will attempt if the command fails. The "delay" property has a limit of 0 (default) to 1 second. The "retries" property has a limit of 0 (default) to 10 retry attempts. Be careful in using the "retries" feature. If a destination device becomes unavailable and you've specified a retry count of 10, all INSTEON commands (even those not sent by Dimmer Extender) will be delayed until Dimmer Extender exhausts all retries. If INSTEON commands are failing frequently, it's better to fix the source of the command failures, but the "retries" feature allows for a bit more confidence that a command will be sent for devices with intermittent acknowledgement errors.
A Note About Compatibility
Dimmer Extender only supports dimmable INSTEON products. It uses SmartLabs defined standard INSTEON messages to set both brightness and ramp rate with each command, tell dimmers to start manually adjusting brightness, and tell dimmers to increment or decrement brightness. During testing, it was noticed that with some SwitchLinc Dimmers, when sent a standard ON or OFF command, they would use the most recent ramp rate sent by Dimmer Extender instead of their internal default ramp rate. Also, Dimmer Extender has only been tested with a few SmartLabs INSTEON dimmers, such as the SwitchLinc Dimmer (both dual-band and power line only models) and LampLinc Dimmer (both dual-band and power line only models). Dimmer Extender has also been tested and confirmed to work with newer i2CS engine SwitchLinc Dimmers. I'd be interested in knowing if Dimmer Extender works with older INSTEON dimmers or with the ICON dimmers. However, Dimmer Extender will NOT work with X10 or other protocol dimmers.
Changes Since Version 1.1.0
(FREE Indigo plugin)
Download version 1.1.1 here.
Dimmer Extender extends Indigo's functionality by adding the ability to specify a different dimming/brightening rate each time you set the brightness of a SmartLabs INSTEON dimmer. It also allows you to create Indigo triggers based on the start and stop brightening and dimming INSTEON commands not otherwise triggerable through Indigo.
When using Dimmer Extender to brighten or dim your SmartLabs INSTEON dimmers, it offers the following options.
- Selectable Brightness Source. Set the brightness level of a dimmer either using a value you enter (such as "25" or "80" percent), using the value of any Indigo variable, or using the current brightness of any other dimmer device in Indigo, regardless of whether it's an INSTEON dimmer or not.
- Selectable Ramp Rate Source. Set the rate at which the dimmer changes brightness based on either a ramp rate time you specify (e.g. 0.3 seconds, 8 minutes) or from the value of an Indigo variable.
- Optional Short Delay. Specify a brief delay before Dimmer Extender sends the INSTEON command to the dimmer. This can be useful in larger, more complex installations where INSTEON message collision is encountered frequently. Setting a brief delay can reduce instances where messages fail to send or be acknowledged.
- Optional Retries on Error. If sending a message to a dimmer fails, you can specify how many times Dimmer Extender should attempt to resend the command to the dimmer before giving up. This can be useful if sending messages to a dimmer fails on occasion and its important that every effort is made to confirm that it's on or off (e.g. a porch light is on at night while you're away, etc).
- Send Start Brightening, Start Dimming, and Stop Brightening/Dimming INSTEON Commands. While Indigo recognizes the commands, it does not provide the ability to send commands to INSTEON devices that instruct them to start manually adjusting brightness until told to stop. Dimmer Extender allows you to send these commands. This can be useful if you wish to trigger the brightening of a light through some other device (such as a Z-Wave or X10 remote). It can also be useful in telling the INSTEON Micro Open/Close Module to start and stop raising or lowering blinds without moving them all the way up or down.
- Send Brighten by 1 Step and Dim by 1 Step INSTEON Commands. Most INSTEON dimmers not only respond to commands setting the brightness to a specific level, a specific level at a specific rate, and commands to manually start and stop changing brightness, but they also respond to incremental brighten and dim commands that Indigo does not support. While the 1 step brightening/dimming commands may not be useful for dimmers (since Indigo does offer the "brighten by %" and "dim by %" actions), these special INSTEON incremental change commands might be useful for non-dimmer devices that respond to dimming commands.
And when using Dimmer Extender events to trigger actions in Indigo, it offers the following trigger-able events.
- INSTEON Start Brightening. This is the INSTEON command sent by INSTEON devices like SwtichLinc Dimmers and RemoteLincs when you press and hold the UP paddle or button. It normally tells all linked devices to begin brightening their connected load. Now you can use the same command to trigger any event you like, such as turning up the volume in your home theater.
- INSTEON Stop Brightening. This is the corresponding INSTEON command sent by the same INSTEON deivces above when you let go of the UP paddle or button. It tells all linked devices to stop brightening their connected load. You can use it for anything you like now, such as to stop turning up the volume in your home theater.
- INSTEON Start Dimming. Similar to Start Brightening, but sent when pressing and holding the DOWN paddle or button, this normally tells linked devices to start dimming their connected load. You can trigger any event you like now, like turning down your home theater volume.
- INSTEON Stop Dimming. This, of course, is the counterpart to the Start Dimming command and tells linked devices to stop dimming their connected load. You can use it to do whatever you like, such as to stop turning down the volume in your home theater.
Installation
Download the Dimmer Extender zip file (link above) to the computer running the Indigo server. If the file is not already unzipped, double-click the .zip file to unzip it. Open the folder that is expanded from the zip file and double-click the Dimmer Extender.indigoPlugin file. The Indigo client will open and prompt to install the plugin. Click the option to install and enable the plugin. You'll be prompted to configure the plugin. The only configuration is to enable debugging. You won't want to do this unless trouble-shooting a problem, so just click OK. All done!
Usage
Within any Indigo action dialog (from a Trigger, Action Group, Schedule, Control Page action, etc), with Indigo 5, set the action "Type" to "Plugin". Select "Dimmer Extender" as the plugin to use. For Indigo 6 and later, simply go to the "Device Actions" menu and the "Dimmer Extender Actions" sub-menu. Select the Action "Set Brightness with Ramp Rate" (the only action available). Choose a device from the "Device" menu that appears. Click "Edit Action Settings...". Follow the instructions in the "Configure Set Brightness with Ramp Rate" dialog that appears.
When createing an INSTEON Start/Stop Brightening/Dimming trigger, within Indigo 5, select "Plugin" as the event Type. With Indigo 6 and later, select "Dimmer Extender Events" from the Type menu. Select the brightening/dimming event type. Click Edit Event Settings and select the INSTEON dimmer device you want the trigger to be based on. Select the Button or Group to monitor. Not all devices send commands on all 8 groups listed. For example, the SwitchLinc Dimmer only sends button/group 1 commands. A 4-button RemoteLinc 2 only sends on button/groups 1 through 4 and an 8-button RemoteLinc 2 sends on all 8 button/groups. The 6-button KeypadLinc Dimmer and Relay send on button/groups 1 through 6 while the 8-button versions send on all 8 button/groups. Be sure to test the trigger after selecting the button/group to be sure it is being triggered off the correct button.
Scripting Examples:
Dimmer Extender (like all Indigo plugins) supports embedded scripts within Indigo actions. Scripting the "Set Brightness with Ramp Rate" action can be most useful when you want to dim the lights quickly sometimes and slowly at other times, based on other conditions in the room. For example, if you're watching a movie in your family room, you may want the lights to only come on to 25% brightness, brightening slowly when activated by motion in the room, but come on to 100% brightness more quickly if you're not watching anything. Here are some examples of how to use embedded Python scripts within Indigo actions to execute the "Set Brightness with Ramp Rate" action.
Set brightness of "Master Bed Dresser Lamp" to 50 percent at a ramp rate of 6.5 seconds.
- Code: Select all
plug = indigo.server.getPlugin("com.nathansheldon.indigoplugin.DimmerExtender")
if plug.isEnabled():
plug.executeAction("setBrightness", indigo.devices["Master Bed Dresser Lamp"].id, props={"brightness":50, "rate":6.5})
Set brightness of "Front Porch Light" to 100 percent at the fastest ramp rate possible, retrying 2 times if there are INSTEON send errors.
- Code: Select all
plug = indigo.server.getPlugin("com.nathansheldon.indigoplugin.DimmerExtender")
if plug.isEnabled():
plug.executeAction("setBrightness", indigo.devices["Front Porch Light"].id, props={"brightness":100, "rate":0, "retries":2})
Turn off "Family Room Lights" at a ramp rate of 4 minutes, 30 seconds, delaying the INSTEON command by 0.5 seconds.
- Code: Select all
plug = indigo.server.getPlugin("com.nathansheldon.indigoplugin.DimmerExtender")
if plug.isEnabled():
plug.executeAction("setBrightness", indigo.devices["Family Room Lights"].id, props={"brightness":0, "rate":270, "delay":0.5})
Start manually increasing brightness of "Dining Room Light".
- Code: Select all
plug = indigo.server.getPlugin("com.nathansheldon.indigoplugin.DimmerExtender")
if plug.isEnabled():
plug.executeAction("startBrightening", indigo.devices["Dining Room Light"].id)
Start manually decreasing brightness of "Dining Room Light".
- Code: Select all
plug = indigo.server.getPlugin("com.nathansheldon.indigoplugin.DimmerExtender")
if plug.isEnabled():
plug.executeAction("startDimming", indigo.devices["Dining Room Light"].id)
Stop manually changing brightness of "Dining Room Light".
- Code: Select all
plug = indigo.server.getPlugin("com.nathansheldon.indigoplugin.DimmerExtender")
if plug.isEnabled():
plug.executeAction("stopBrighteningDimming", indigo.devices["Dining Room Light"].id)
Increment the brightness of "Hallway Light".
- Code: Select all
plug = indigo.server.getPlugin("com.nathansheldon.indigoplugin.DimmerExtender")
if plug.isEnabled():
plug.executeAction("brightenOneStep", indigo.devices["Hallway Light"].id)
Decrement the brightness of "Hallway Light".
- Code: Select all
plug = indigo.server.getPlugin("com.nathansheldon.indigoplugin.DimmerExtender")
if plug.isEnabled():
plug.executeAction("dimOneStep", indigo.devices["Hallway Light"].id)
When executing the "setBrightness" action through a Python script, the only properties required are "brightness" and "rate". All other properties like "delay" and "retries" are optional. It's also important to note that SmartLabs INSTEON dimmers have a limited number of ramp rates to choose from. Dimmer Extender will choose the ramp rate closest to the number of seconds you specify if the ramp rate you send for the "rate" does not match a preset rate on the dimmer. The maximum dimming time is 480 seconds (8 minutes). The minimum is 0.1 seconds. Dimmer Extender also has limits on how long it will delay sending an INSTEON command and on how many retries it will attempt if the command fails. The "delay" property has a limit of 0 (default) to 1 second. The "retries" property has a limit of 0 (default) to 10 retry attempts. Be careful in using the "retries" feature. If a destination device becomes unavailable and you've specified a retry count of 10, all INSTEON commands (even those not sent by Dimmer Extender) will be delayed until Dimmer Extender exhausts all retries. If INSTEON commands are failing frequently, it's better to fix the source of the command failures, but the "retries" feature allows for a bit more confidence that a command will be sent for devices with intermittent acknowledgement errors.
A Note About Compatibility
Dimmer Extender only supports dimmable INSTEON products. It uses SmartLabs defined standard INSTEON messages to set both brightness and ramp rate with each command, tell dimmers to start manually adjusting brightness, and tell dimmers to increment or decrement brightness. During testing, it was noticed that with some SwitchLinc Dimmers, when sent a standard ON or OFF command, they would use the most recent ramp rate sent by Dimmer Extender instead of their internal default ramp rate. Also, Dimmer Extender has only been tested with a few SmartLabs INSTEON dimmers, such as the SwitchLinc Dimmer (both dual-band and power line only models) and LampLinc Dimmer (both dual-band and power line only models). Dimmer Extender has also been tested and confirmed to work with newer i2CS engine SwitchLinc Dimmers. I'd be interested in knowing if Dimmer Extender works with older INSTEON dimmers or with the ICON dimmers. However, Dimmer Extender will NOT work with X10 or other protocol dimmers.
Changes Since Version 1.1.0
- Fixed a bug that updated Indigo with the wrong actual brightness of a dimmer after Dimmer Extender sent a Set Brightness with Ramp Rate command to it. NOTE: Because using the Set Brightness at Ramp Rate feature built-in to INSTEON dimmers limits the number of selectable brightness levels to only 16 discrete levels, this update will cause the brightness percentage values shown in Indigo to almost never match the exact brightness percentage you choose. Previous versions of Dimmer Extender incorrectly told Indigo that it had set the dimmer to the exact brightness you requested, but in reality, it selected the closest of the 16 brightness levels available. Now, Indigo correctly shows that brightness level.