
Re: AppleScript Implementation Help
Here is the code I use to check my garage door status. You'll notice I don't check a variable value with Indigo but a hardware state instead. Sometimes the hardware inputs (in this case and EZIO8SA) do not get up updated on my system (usually because I have scripts running at the 5 or 10 minute intervals and some Insteon signals get missed by the receiving PLM.)
I use the first button of my KeypadLinc to indicate the status of my garage door (LED on is closed, LED off is open).
- Code: Select all
--delay 10
tell application "Finder"
set volume 5.3
end tell
tell application "IndigoServer"
status request "EZIO8SA"
delay 10
set firstBinaryInput to item 1 of (get binary inputs of device "EZIO8SA")
if firstBinaryInput is equal to true then set value of variable "Garagedoor" to "false"
if firstBinaryInput is equal to true then turn on "Keypadlinc"
if firstBinaryInput is equal to false then set value of variable "Garagedoor" to "true"
if firstBinaryInput is equal to false then turn off "Keypadlinc"
if value of variable "Garagedoor" is "true" then
say "Garage door is open"
log "GARAGE DOOR IS OPEN"
return firstBinaryInput
end if
--return firstBinaryInput
end tell
I know this post doesn't address all of your issues, but hopefully you can use a large part of my code to do what you want. I am not sure how to applescript the botton 7 on the keypadLinc, I just use the Insteon Group on/off action in Indigo to control individual LEDs other than button 1.