nsheldon wrote:Another possibility (one that's a lot more "hackish") might be to create a generic X10 dimmer device in Indigo then create a device brightness change trigger whose action is to execute a shell command using the brightness value of the X10 device. This would require that 1) you have an X10 interface such as the 2413U PowerLinc Modem (the main INSTEON one supported by Indigo), and 2) you don't have a lot of X10 devices already on your network (so that you'll have a free X10 house code and device number).
Thanks for the suggestion- that sounds a lot more like something I can personally accomplish. I will report my findings once I get something together. Appreciate the help folks!
EDIT- and here is the code for anyone reading this and looking for a similar very easy (though hackish) solution:
- Code: Select all
--Choose Indigo Generic Device and also Lutron device.
set IndigoDevice to "Kitchen Light_L"
set LutronDevice to 5 --Kitchen
tell application "IndigoServer"
set theBrightness to brightness of device IndigoDevice
end tell
--Set brightness level from Indigo X10 value
set LutronLevel to theBrightness
--Login to Lutron via Telnet
tell application "System Events"
if "Terminal" is not in name of processes then launch application "Terminal"
tell process "Terminal"
set frontmost to true
if (count windows) is 0 then
tell application "Terminal"
set newTab to do script -- create a new window with no initial command
delay 0.1
do script "telnet 10.0.1.201" in front window
delay 0.1
do script "USERNAME" in front window
delay 0.1
do script "USERPASSWORD" in front window
end tell
end if
end tell
end tell
--Call Subroutine to set value
SetLutron(LutronDevice, LutronLevel)
--Close Terminal Window out
delay 2
tell application "Terminal"
quit
end tell
--Subroutine to login to Lutron Radio RA2 and set device and level.
on SetLutron(device, level)
tell application "Terminal"
do script "#OUTPUT," & device & ",1," & level in front window
--quit
end tell
end SetLutron
I only changed the actual username and password- though these are listed right in the RadioRA2 installer's manual. Ping me directly if you're trying to do this and need help finding them.
The one thing I notice is that these devices are now marked in RED in the DEVICES list, even though they technically function as expected. Anything I could/should do to avoid this? -Noah