Page 1 of 1

Trigger on Any Command / Any Device ?

PostPosted: Sat Aug 14, 2021 5:01 pm
by SearchCz
Let's say I ad a trigger that listens for any Insteon command from any Insteon device. Is there a way my script can know what command and device are involved ?

Re: Trigger on Any Command / Any Device ?

PostPosted: Sun Aug 15, 2021 12:00 pm
by jay (support)
Unfortunately, no, that information isn't passed from the trigger to the action.

Re: Trigger on Any Command / Any Device ?

PostPosted: Mon Oct 11, 2021 7:48 am
by WagnerOne
I came here looking for similar information.

Using a python action script I wondered if I can get the command "Received" via "Any Command".

I'm guessing no after reading this, but my case is a bit different in that I am trying to obtain it from a particular Device receiving the "Any Command" .

I want to use this information in the action to do various things (e.g., include the command in the notification, etc.).

Alternatively I was thinking I could have a trigger that listens for "Any Command" and, when the python action runs, it could get the state of the particular Device.

I'm not sure how reliable this approach is and/or what I should assume is the default in case it fails or the command isn't received and interpreted quickly enough for the python action state check to get a reliable, accurate state. In this case it's a TriggerLinc that is attached to a door. I guess I could assume the state is "open" in this use case and then at worst I'd have false positives the door is open.

Thanks,
Mike

Re: Trigger on Any Command / Any Device ?

PostPosted: Mon Oct 11, 2021 9:20 am
by jay (support)
Doing an Any Command trigger on your TriggerLinc will always fire (well, assuming that the PowerLinc sees the command). Then your python script can just check the state of it before performing any actions. The amount of time beween Indigo receiving the command from the TriggerLinc and when it starts the script will be very short (tenths of a second at worst probably).

Re: Trigger on Any Command / Any Device ?

PostPosted: Mon Oct 11, 2021 9:24 am
by WagnerOne
Excellent. Thanks, Jay!