Table of Contents

Action Collection

Note: the Action Collection plugin has been more directly integrated into Indigo 6 and so the action descriptions have moved to the normal Actions documentation for the releases from now on.

As the name implies, this plugin is a collection of miscellaneous actions that you may find useful (the Indigo version in which the action was made available is in parenthesis):

Scripting Support

As with all plugins, actions defined by this plugin may be executed by Python scripts. Here's the information you need to script the actions in this plugin.

Plugin ID: com.perceptiveautomation.indigoplugin.ActionCollection

Action specific properties

Insert Device State into Variable

Action id: insertState

Properties for scripting:

devState the string key (name) of the device state to use
variable the variable ID of target variable

Example:

acId = "com.perceptiveautomation.indigoplugin.ActionCollection"
actionPlugin = indigo.server.getPlugin(acId)
if actionPlugin.isEnabled():
	actionPlugin.executeAction("insertState", deviceId=135305663, props={'devState':'playStatus','variable':1229620185})

Insert Timestamp into Variable

Action id: insertTimestamp

Properties for scripting:

useCustomFormat boolean to specify whether to use a custom date time format (True or False)
format the format string as defined in the Python datetime string formatting documentation (only needed if useCustomFormat is True)
variable the variable ID of target variable

Example:

acId = "com.perceptiveautomation.indigoplugin.ActionCollection"
actionPlugin = indigo.server.getPlugin(acId)
if actionPlugin.isEnabled():
	actionPlugin.executeAction("insertTimestamp", props={'useCustomFormat':True, 'format':'%Y-%m-%d %H:%M:%S','variable':1229620185})
	actionPlugin.executeAction("insertTimestamp", props={'useCustomFormat':False, 'variable':1229620185})

Open File

Action id: openFile

Properties for scripting:

path the path to the file

Example:

acId = "com.perceptiveautomation.indigoplugin.ActionCollection"
actionPlugin = indigo.server.getPlugin(acId)
if actionPlugin.isEnabled():
	actionPlugin.executeAction("openFile", props={'path':'/Users/jay/temp/temp.png'})

Run Script

Action id: runScript

Note: the script must be marked executable and must have the shebang line at the top that directs the shell processor to the right shell to run the script in.

Properties for scripting:

path the path to the file
storeReturnValue boolean indicating that the action should insert the return value from the script into a variable (True or False)
variable the variable ID of target variable (only needed if storeReturnValue is True)

Example:

acId = "com.perceptiveautomation.indigoplugin.ActionCollection"
actionPlugin = indigo.server.getPlugin(acId)
if actionPlugin.isEnabled():
	actionPlugin.executeAction("runScript", props={'path':'/Users/jay/temp/temp.sh', 'storeReturnValue':False})
	actionPlugin.executeAction("runScript", props={'path':'/Users/jay/temp/temp.sh', 'storeReturnValue':True, 'variable':1229620185})

Write to Log

Pretty useless - just use the indigo.server.log() method directly

Cycle Through Thermostat Modes

Action id: cycleHvacMode

No properties for scripting required.

Example:

acId = "com.perceptiveautomation.indigoplugin.ActionCollection"
actionPlugin = indigo.server.getPlugin(acId)
if actionPlugin.isEnabled():
	actionPlugin.executeAction("cycleHvacMode", deviceId=135305663)

Toggle Thermostat Fan Mode

Action id: toggleHvacFanMode

No properties for scripting required.

Example:

acId = "com.perceptiveautomation.indigoplugin.ActionCollection"
actionPlugin = indigo.server.getPlugin(acId)
if actionPlugin.isEnabled():
	actionPlugin.executeAction("toggleHvacFanMode", deviceId=135305663)

Cycle Through Speed Control (FanLinc) States

Action id: cycleSpeedControlState

No properties for scripting required.

Example:

acId = "com.perceptiveautomation.indigoplugin.ActionCollection"
actionPlugin = indigo.server.getPlugin(acId)
if actionPlugin.isEnabled():
	actionPlugin.executeAction("cycleSpeedControlState", deviceId=1117643510)