PluginFunction
Purpose
Call a function in a plugin. This can only be used to call functions and subs. If you need to access a property, use PluginPropertyGet .
Parameters
Parameter: Plugin Name
Type: String
Description: The name of the plugin to access. The plugin must be enabled and running.
Parameter: Instance Name
Type: String
Description: The instance name of the plugin to access if this is a multi-instance plugin. For single instance plugins, pass an empty string
Parameter: Function Name
Type: String
Description: The name of the function to call. The name is case sensitive.
Parameter: Parameters
Type: Array
Description: An array of parameters to pass to the function, if the function accepts parameters. If the function does not take any parameters, pass "Nothing".
Returns
Return value: Result
Type: varies
Description: The return value from the function call.
Example
The following .vb script will access the AccessLevel function in the Z-Wave plugin.
Sample Code
Sub Main(parm as object)
dim level as integer
level = hs.PluginFunction("Z-Wave", "", "AccessLevel", nothing)
hs.writelog("Plugin name",level.ToString)
End Sub