Plugin Trigger

Post your questions and help other users.

Moderator: Martin

Post Reply
Rm.
Posts: 6
Joined: 02 May 2013 09:15

Plugin Trigger

Post by Rm. » 17 Aug 2015 16:19

Hello,

Automagic documentation for "Trigger Plugin" (not Trigger Plugin Event) states that "The trigger Plugin (Experimental) executes a flow when the condition of a plugin changes to true and/or false.".

Can you please tell me whether Automagic queries the Plugin regularly in some interval? (if so, how often?) Or does Automagic query the plugin only after it receives ACTION_REQUEST_QUERY from the plugin itself? If so, what's the difference between Trigger Plugin and Trigger Plugin Event?

Thanks in advance for your answers.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Plugin Trigger

Post by Martin » 19 Aug 2015 20:06

Hi,

Trigger Plugin queries the plugin when the plugin sends an ACTION_REQUEST_QUERY (and once to get the initial state when the trigger becomes active). The trigger does not use a timer to periodically check the plugin.

Trigger Plugin and Plugin Event are very similar. Main difference is that Plugin internally holds the last reported state from the plugin and executes the flow only when the state changes so it's more suitable for states the persist for a duration. Plugin Event executes the flow whenever the Plugin sends ACTION_REQUEST_QUERY and the plugin then returns RESULT_CODE_SATISFIED (irrespective if it was RESULT_CODE_SATISFIED before). Plugin Event also supports pass through data which might be helpful for some plugins to pass an ID of the event or something similar.
Plugin Event was an extension introduced by Tasker so it might not be supported by all automation tools.

Regards,
Martin

Post Reply