BrightenWithRate 1.02
NOTE: This AppleScript Attachment is obsolete. While this will work in Indigo 5 and 6, I've created the Dimmer Extender plugin which does everything this AppleScript does and much more.
I've created an Indigo Pro 4 and 5 compatible Attachment AppleScript which allows you to set the on-level (brightness) of an INSTEON dimmable device, specifying a ramping time that is different from the device's programmed default ramp rate.
This has been tested and found to work on Smarthome SwitchLinc Dimmers, LampLinc Dimmers and KeypadLinc Dimmers. It should also work on In-Line Linc Dimmers and the dual-band versions of these devices. It may or may not work on other INSTEON dimmable devices (like ICON dimmers).
Changes:
1.02: Slightly changed the way log messages show up in Indigo to make it more clear that the messages are coming from the script and not from Indigo. It also now allows any communication (no acknowledgement) errors to appear.
1.0: Initial release.
Installation:
Download the zip file and (if it isn't done automatically) decompress it. A folder containing a Read Me file and the BrightenWithRate.scpt file will be created.
Put the BrightenWithRate.scpt file in the Attachments folder for the version of Indigo Pro you are using. The path to the folder is listed below for the specific Indigo Pro version being used.
Indigo Pro 4:
/Library/Application Support/Perceptive Automation/Indigo 4/Scripts/Attachments
Indigo Pro 5:
/Library/Application Support/Perceptive Automation/Indigo 5/Scripts/Attachments
Indigo Pro 6:
/Library/Application Support/Perceptive Automation/Indigo 6/Scripts/Attachments
Once the file has been moved into one of the above folders, reload attachments from within the Indigo Pro client (in Indigo 5, that means going to the "Plugins" menu and selecting "Reload Libraries and Attachments").
Usage:
Within an Indigo "Execute Script" AppleScript action, simply enter the text
BrightenWithRate(<bright percent>,<ramp time seconds>,"<device name>")
where <bright percent> is the brightness on-level percentage, from 0 to 100, you'd like the device change to, <ramp time seconds> is the number of seconds (including fractional seconds) desired, and <device name> is the name of the device in Indigo. Some important things to remember: specifying a brightness of 0, perhaps obviously, actually turns off the device in the ramp time. Note that INSTEON dimmers that support per-request ramp rates only provide 16 different ramp rates, so this function simply chooses the available ramp rate closest to the number of seconds specified when calling this function. Also note that ramp times are based on going from fully off (0 percent) to fully on (100 percent).