Dimmer Extender - Brightness at a Different Rate Each Time

Posted on
Tue Sep 04, 2012 1:00 am
nsheldon offline
Posts: 1839
Joined: Aug 09, 2010
Location: CA

Dimmer Extender - Brightness at a Different Rate Each Time

Dimmer Extender 1.1.1

(FREE Indigo Pro 5 and 6 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 normally triggerable through Indigo Pro.

When using Dimmer Extender to brighten or dim your SmartLabs 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 in Indigo.
  • 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 currently 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 currently 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, 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, 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 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.

Posted on
Tue Sep 04, 2012 5:55 am
matt (support) offline
Site Admin
User avatar
Posts: 18006
Joined: Jan 27, 2003
Location: Texas

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

Awesome contribution. Looks like a great plugin, and thanks for the thorough documentation.

Image

Posted on
Tue Sep 04, 2012 9:52 am
nsheldon offline
Posts: 1839
Joined: Aug 09, 2010
Location: CA

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

Thanks Matt! I hope others can get as much use out of it as I've been getting.

Posted on
Wed Sep 05, 2012 8:01 pm
ryanbuckner offline
Posts: 214
Joined: Oct 08, 2011

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

Love this.. thanks!

Posted on
Wed Sep 05, 2012 8:21 pm
nsheldon offline
Posts: 1839
Joined: Aug 09, 2010
Location: CA

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

ryanbuckner wrote:
Love this.. thanks!

Thanks! Glad you like it.

Posted on
Mon Oct 01, 2012 2:50 am
nsheldon offline
Posts: 1839
Joined: Aug 09, 2010
Location: CA

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

Version 0.9.1 Posted
(See original post for link).

  • Improved method of applying user-specified delay to INSTEON message sending which helps reduce signal collision in high-traffic instances.
  • Changed logging behavior so that a "Sent INSTEON" message in the Indigo log only appears after acknowledgement of receipt by the device. Modified log message to be more concise.

Posted on
Wed Nov 14, 2012 2:11 am
nsheldon offline
Posts: 1839
Joined: Aug 09, 2010
Location: CA

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

Version 1.0 Posted!
(See original post for link).

  • Updated actions and dialogs for Indigo 6 UI.
  • Added triggerable events. Dimmer Extender now generates events for INSTEON Start Brightening, INSTEON Stop Brightening, INSTEON Start Dimming, and INSTEON Stop Dimming. These events can be selected in any Indigo Trigger configuration window.
  • Fixed bug that would incorrectly report an error if a ramp rate variable was specified in the UI configuration.
  • Fixed some error message typos.

Posted on
Tue Nov 27, 2012 5:39 pm
justlen offline
Posts: 41
Joined: May 05, 2005

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

This does not appear to be working with older LampLinc ((Firmware 28, i1 engine) controllers. The module seems to acknowledge the command, as shown by the log:

Nov 27, 2012 3:29:43 PM
Action Group Ramp Up
Sent INSTEON "Family Room Couch Lamp" on to 100 at ramp rate 6.5 sec.

For an experiment I tried sending the module a raw Insteon command of 0x2E 0xFC (and got an ack: FC) but the lamp did not turn on as well, so I guess it's possible that this command is not supported in such old firmware.

Posted on
Tue Nov 27, 2012 5:59 pm
nsheldon offline
Posts: 1839
Joined: Aug 09, 2010
Location: CA

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

justlen wrote:
This does not appear to be working with older LampLinc ((Firmware 28, i1 engine) controllers. The module seems to acknowledge the command, as shown by the log:

Nov 27, 2012 3:29:43 PM
Action Group Ramp Up
Sent INSTEON "Family Room Couch Lamp" on to 100 at ramp rate 6.5 sec.

For an experiment I tried sending the module a raw Insteon command of 0x2E 0xFC (and got an ack: FC) but the lamp did not turn on as well, so I guess it's possible that this command is not supported in such old firmware.

Thant's actually very good information to know. Thanks for testing it on the i1 firmware version of the LampLinc. I figured it wouldn't work on i1 engine devices since the document I used to create the dimming with rate command was from the SmartLabs docs on INSTEON version 2.

Posted on
Wed Nov 28, 2012 1:33 pm
justlen offline
Posts: 41
Joined: May 05, 2005

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

No problem, I'd be glad to test anything if it helps, although these modules are so old it might not be worth addressing.

Posted on
Tue Dec 04, 2012 7:42 pm
bbruck offline
Posts: 303
Joined: Oct 05, 2008

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

Wonderful plugin!

Have you thought of adding the "auto-off after" found in the regular control? Most of my motion-driven lights are currently using that feature; dunno if others use it too or not.

Posted on
Tue Dec 04, 2012 11:49 pm
nsheldon offline
Posts: 1839
Joined: Aug 09, 2010
Location: CA

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

bbruck wrote:
Wonderful plugin!

Have you thought of adding the "auto-off after" found in the regular control? Most of my motion-driven lights are currently using that feature; dunno if others use it too or not.

Hi.

Thanks for the suggestion. It would technically be possible to add such a feature. However, it would not currently be possible to implement it in the same way that is done with native Indigo actions. With native actions, when you put a check in the box to automatically turn off a device after having turned it on, that "on" action actually creates an Indigo schedule to automatically turn off the device after the time specified. it's not currently possible to create schedules using Python, so the Dimmer Extender plugin couldn't do that.

As a workaround, I'd suggest that after you create the Dinner Extender action to turn on the dimmer, click the "Show All" button at the bottom of the actions window then click "Duplicate" to duplicate the action. Then double-click on the duplicate action to edit it. Put a check in the box next to "Delay by" at the bottom of the window and enter the amount of time to wait before turning off the device. Click the "Edit Action Settings..." button and change the brightness level to 0 (zero) then click "Save". Now, when the trigger (or schedule) fires, the dimmer will come on to the desired level, then automatically turn off after the "Delay by" time you specified.

Posted on
Mon Aug 12, 2013 3:28 pm
nsheldon offline
Posts: 1839
Joined: Aug 09, 2010
Location: CA

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

Version 1.1 Posted!
(See original post for link).

  • Added: Brighten by 1 Step and Dim by 1 Step actions which can be sent to any INSTEON device.
  • Added: Start Brightening, Start Dimming, and Stop Brightening/Dimming actions which can be sent to any INSTEON device.

Posted on
Tue Aug 13, 2013 1:47 pm
nsheldon offline
Posts: 1839
Joined: Aug 09, 2010
Location: CA

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

Version 1.1.1 Posted!

(See original post for link).

  • 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.

Posted on
Tue May 20, 2014 7:05 pm
gskarp offline
Posts: 85
Joined: Apr 19, 2012

Re: Dimmer Extender - Brightness at a Different Rate Each Ti

Does this set the default level of an Insteon switch? What I would like to do is set the default level of a light that is linked to a sensor to be lower late at night. I figured I could create a scheduled event that would change the default level to 20% at 10 PM and at 100% at 7 AM. When I run the first example, it seems like it just sets the brightness to 20%, but not the default level. Am I on the right track?

Who is online

Users browsing this forum: No registered users and 1 guest