ph_pitrigger PowerHome formula function
Description
Calls the Generic Plugin Trigger (Trigger type 27).
Syntax
ph_pitrigger ( id, number, value, dim, command, data, formula, auxvalue )
Argument Description
id The trigger ID to call. Within the Generic Plugin Trigger, this is the ID of the plugin.
number The trigger number to call. This will be a value from 1 to 256.
value The trigger value to call. This will be a value from 1 to 256.
dim A double representing the dim value. This value will simply be passed to the trigger in the [TEMP2] variable.
command An unsigned long representing the command. This value will be passed to the [TEMP3] variable.
data A long representing the data. This value will be passed to the [TEMP4] variable.
formula A string representing the formula. This value will be passed to the [TEMP5] variable.
auxvalue A string representing the auxillary value. This value will be passed to the [TEMP10] variable.
Return value
Integer. The return value is the binary addition of the four individual trigger calls. This sum consists of 1 if the first check returns no rows, 2 if the second check returns no rows, 4 if the third check returns no rows, and 8 if the fourth check returns no rows.
Usage
This function is very similar to the ph_checktrigger function except that it only calls trigger types of 27 (Generic Plugin Trigger). It is provided as a simple interface for generic plugins to fire the generic plugin trigger. Using a single function call, 4 individual trigger checks will be made. The first will be made for [Any], [Any], the second for [Any], Specific Value, the third for Specific Number, [Any], and the fourth for Specific Number, Specific Value.

While a plugin can fire ANY trigger using the ph_checktrigger function, for plugin specific triggers not handled by the other existing trigger types, the Generic Plugin Trigger should be used along with this function call.