Skip to content

scripting

DaveL17 edited this page Jun 12, 2022 · 7 revisions

The bundle identifier for the Matplotlib plugin is:
com.fogbert.indigoplugin.multitool


Modify Numeric Variable
Modify Time Variable

Modify Numeric Variable

You can invoke the Indigo Action item Modify Numeric Variable through a simple Python script:

plugin=indigo.server.getPlugin("com.fogbert.indigoplugin.multitool")  # noqa
plugin.executeAction("modify_numeric_variable", 0, {'list_of_variables': 1249311912, 'modifier': '* 2 + 1'})

where

modify_numeric_variable (action ID - str - required)
0 (Indigo Device ID - int - must be zero)
{'list_of_variables': 1249311912, 'modifier': '* 2 + 1'} Variable ID (required), Formula (required)

return

The action will return True if successful, and False in there is a problem.

The "Modify Numeric Value" action does not require any other props, and (if provided) will either be ignored or Indigo will throw an error.

If you receive a ValueError, it is likely due to an invalid device ID (must be zero). If you receive a InvalidParameter error or an ArgumentError error, it is likely because you did not include a valid props dictionary. See the actions page for more information.


Modify Time Variable

You can invoke the Indigo Action item Modify Time Variable through a simple Python script:

plugin=indigo.server.getPlugin("com.fogbert.indigoplugin.multitool")  # noqa
plugin.executeAction("modify_time_variable", 0, {'list_of_variables': 389753528, 'modifier': 'add', 'days': 0, 'hours': 1, 'minutes': 0, 'seconds': 0})

where

modify_time_variable (action ID - str - required)
0 (Indigo Device ID - int - must be zero)
{'list_of_variables': 389753528, 'modifier': 'add', 'days': 0, 'hours': 1, 'minutes': 0, 'seconds': 0} Variable ID (required), attributes (all are required)

return

The action will return True if successful, and False in there is a problem.

The "Modify Time Value" action does not require any other props, and (if provided) will either be ignored or Indigo will throw an error.

If you receive a ValueError, it is likely due to an invalid device ID (must be zero). If you receive a InvalidParameter error or an ArgumentError error, it is likely because you did not include a valid props dictionary. See the actions page for more information.

Clone this wiki locally