|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Newbie - Insteon Motion Sensor in AppleScript
| Author |
Message |
|
hail2victors
Joined: Apr 05, 2011 Posts: 5
|
 Newbie - Insteon Motion Sensor in AppleScript
I am new to using Applescript in Indigo. I have written a few scripts, but I just replaced an X10 Motion Sensor with an Insteon one. In my old Script, I did some functions triggered by motion and conditioned by the Dawn/Dusk detector being on or off (along with some other things).
I just don't know the proper way to test the on state of my new motion sensor in the script with button 1 and button 2...
I used to do this: if (on state of device "OUT_SW_Garage Lights" is false and on state of device "OUT_DD_Garage is True) then
the DD is the Dawn Dusk detector. How do I test it button 2?
|
| Tue Apr 05, 2011 8:29 am |
|
 |
|
jay (support)
Site Admin
Joined: Mar 19, 2008 Posts: 6851 Location: Austin, Texas
|
 Re: Newbie - Insteon Motion Sensor in AppleScript
If you're wanting to track dawn/dusk state according to what the Motion Sensor is reading, then you'll need to use a variable to hold that state (the INSTEON Motion Sensor doesn't hold any states - we create a virtual ON/OFF state for the convenience of users but we don't create one for daylight/dark). Create two triggers which fire when they see Group/Button 2 ON and Group/Button 2 OFF respectively - they should set the variable (named, say, "ms_is_dark") to "true" and "false". Then in your script you just test the variable to see if it's true (which would indicate it's dark).
_________________ Jay (Indigo Support)
|
| Tue Apr 05, 2011 9:39 am |
|
 |
|
hail2victors
Joined: Apr 05, 2011 Posts: 5
|
 Re: Newbie - Insteon Motion Sensor in AppleScript
okay thank you. So in other words, I really can't run the same script and just change the syntax? The variable will work for me though! Thank you!
|
| Tue Apr 05, 2011 9:50 am |
|
|
|
Page 1 of 1
|
[ 3 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|