This Attachment Script will allow you to set up soft-fade dimming scenes with just a few simple AppleScript commands. Using the methods in the attachment script, you can easily start dimming:
- Code: Select all
InitializeDim of "1st Floor - Family Room - Track Lights" to 0 given steps:30, rate:1, completionAction:"Dim Completion"
InitializeDim of "1st Floor - Family Room - Front Soffit Lights" to 0 given steps:10, rate:2, completionAction:""
ExecuteDimming()
Or, stop dimming for a device:
- Code: Select all
CancelDim for "1st Floor - Family Room - Track Lights"
Using script commands, you control how fast dimming should take place. You can event specify that an action group should be automatically executed when dimming is complete (if, for example, you want to take some sort of clean-up action or start up another dimmer).
And, because you would expect a dimmer to stop dimming if you tap the switch, this script also monitors INSTEON and X10 commands. If someone pushes the switch, dimming for all devices in the scene will stop. (Unfortunately, you may encounter a brief flicker as the levels update; due to queuing of commands by the interface controller, there isn't a whole lot you can do if a dimming command has already been readied for transmission.)
Follow the comments at the top of the script for set-up instructions.
Disclaimer: I've tested it with several dimmers in my INSTEON-enabled house with good results. I'll probably make a few changes here and there, and will be happy to re-post if there is any interest. I don't have any X10 devices to work with, though in theory, there is nothing to prevent this from working for X10.
The script is in the file library.