Noob question - finding Indigo objects in an embedded script

Posted on
Fri Nov 11, 2016 1:58 pm
turtle offline
Posts: 26
Joined: Oct 20, 2016

Noob question - finding Indigo objects in an embedded script

I am a noob with Indigo, but I am enjoying the power of the Python scripting capability, its amazing what you can do with it.

I want to write a trigger that uses "X10/RF Command Received" from "Any address" received "Any Command". My plan is to create multiple X10 devices, each attached to a unique X10 address, but process them through the one trigger.

Question - Can the embedded script find the trigger object that caused it to be called? Is there something like
Code: Select all
myTrigger = indigo.triggers.currentTrigger

Posted on
Fri Nov 11, 2016 5:01 pm
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Noob question - finding Indigo objects in an embedded sc

As far as I know, the answer is no--although it's on the feature request list. One work around would be to use a variable. As a part of the trigger, change the value of the variable to the name of the calling trigger (or whatever you want). Then, within the script, you can check the value of the variable to see which trigger called it.

Screen Shot 2016-11-11 at 4.59.59 PM.png
Screen Shot 2016-11-11 at 4.59.59 PM.png (33.36 KiB) Viewed 1339 times

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Nov 12, 2016 11:54 am
turtle offline
Posts: 26
Joined: Oct 20, 2016

Re: Noob question - finding Indigo objects in an embedded sc

Thanks for the info. I'm a big DIO fan, but I guess this is what I must do.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 5 guests