AppleScript verbage to trigger an action group

Posted on
Thu Apr 24, 2003 12:27 am
bobeast offline
User avatar
Posts: 400
Joined: Apr 16, 2003

AppleScript verbage to trigger an action group

Hi Matt,

I've written a cgi which allows me to control Indigo via the web. In doing so I've run into some unexpected behavior. I've set up a "dummy" device whose only purpose is to trigger an action group. The idea is that if I use a remote, and send a 'B4', then when Indigo receives that B4, it knows to send the commands nessesary to start the pool pump, heater, and spa valves. My problem is that if I use AppleScript (from my cgi) to turn on B4, Indigo sends a B4, and the Action group never gets activated.
What I'd really like to do is to be able to trigger an action group directly from AppleScript, but there doesn't seem to be verbage to do so.
Am I missing something?

thanks
Bob

Posted on
Thu Apr 24, 2003 8:31 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: AppleScript verbage to trigger an action group

bobeast wrote:
I've written a cgi which allows me to control Indigo via the web.

Neat! If you don't mind sharing, I'd like to see an example of what you've done at some point.
bobeast wrote:
In doing so I've run into some unexpected behavior. I've set up a "dummy" device whose only purpose is to trigger an action group. The idea is that if I use a remote, and send a 'B4', then when Indigo receives that B4, it knows to send the commands nessesary to start the pool pump, heater, and spa valves. My problem is that if I use AppleScript (from my cgi) to turn on B4, Indigo sends a B4, and the Action group never gets activated.

I presume the trigger action type is "X10/MR26 Command Received?" These triggers only trip when Indigo thinks it receives an X10 command from an X10 interface (like CM11). If you are using the "turn on" verb, then Indigo just sends out the x10 command but does not trigger actions based on it. But you can send Indigo the event just like the interfaces do, which should trip your trigger. Try this in your AppleScript:

  receive x10 event turnOn for address "b4"

Note with this technique you pass the X10 address, so you don't need the dummy device at all. Just make sure your trigger action is set to trip off of the X10 address itself, and not the device name.

We do need to add some type of execute action group verb. This should be trivial, so I'll make sure it gets into the next 1.1 beta. Speaking of, since you are using scripting, make sure you try the latest 1.1 beta if you haven't already:

http://www.perceptiveautomation.com/ind ... o_beta.dmg

regards,
matt
Last edited by matt (support) on Mon May 12, 2003 11:53 pm, edited 1 time in total.

Posted on
Thu Apr 24, 2003 9:51 am
bobeast offline
User avatar
Posts: 400
Joined: Apr 16, 2003

Re: AppleScript verbage to trigger an action group

support wrote:
bobeast wrote:
I've written a cgi which allows me to control Indigo via the web.

Neat! If you don't mind sharing, I'd like to see an example of what you've done at some point.

No problem but we should probably do that offline. Send me an email, and we'll get together on it.

bobeast wrote:
In doing so I've run into some unexpected behavior. I've set up a "dummy" device whose only purpose is to trigger an action group. The idea is that if I use a remote, and send a 'B4', then when Indigo receives that B4, it knows to send the commands nessesary to start the pool pump, heater, and spa valves. My problem is that if I use AppleScript (from my cgi) to turn on B4, Indigo sends a B4, and the Action group never gets activated.

I presume the trigger action type is "X10/MR26 Command Received?" These triggers only trip when Indigo thinks it receives an X10 command from an X10 interface (like CM11). If you are using the "turn on" verb, then Indigo just sends out the x10 command but does not trigger actions based on it. But you can send Indigo the event just like the interfaces do, which should trip your trigger. Try this in your AppleScript:

  receive x10 event turnOn for address "b4"

Note with this technique you pass the X10 address, so you don't need the dummy device at all. Just make sure your trigger action is set to trip off of the X10 address itself, and not the device name.

We do need to add some type of execute action group verb. This should be trivial, so I'll make sure it gets into the next 1.1 beta. Speaking of, since you are using scripting, make sure you try the latest 1.1 beta if you haven't already:

http://www.perceptiveautomation.com/ind ... o_beta.dmg

regards,
matt


I missed the "receive" verbage. Is that in the dictionary? At any rate,
that technique should work in the short term, but the added verbage would
allow me to provide a list of action groups to the user for activation and turn them into true macros. I'll look forward to the addition.

Thanks!
Bob

Posted on
Mon May 05, 2003 1:47 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: AppleScript verbage to trigger an action group

bobeast wrote:
... At any rate,
that technique should work in the short term, but the added verbage would allow me to provide a list of action groups to the user for activation and turn them into true macros. I'll look forward to the addition.

The latest beta version 1.1 now has an "execute group" verb to execute action groups directly.

You can download the beta at:

http://www.perceptiveautomation.com/ind ... o_beta.dmg

regards,
matt
Last edited by matt (support) on Mon May 12, 2003 11:52 pm, edited 1 time in total.

Posted on
Mon May 05, 2003 9:55 am
bobeast offline
User avatar
Posts: 400
Joined: Apr 16, 2003

action group verbiage

Thank You! this is just what the doctor ordered!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 26 guests