Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
indigo_2025.2_documentation:api [2026/04/07 18:27] – created - external edit 127.0.0.1indigo_2025.2_documentation:api [2026/05/01 18:12] (current) – [variable command messages] davel17
Line 519: Line 519:
  
 === variable command messages === === variable command messages ===
-The ''updateValue'' command is currently the only command message you can send to the variable feed. It closely mirrors the Python-based [[indigo_2025.2_documentation:object_model_reference|IOM command for updating variables]]. This was completely intentional to make learning one API a stepping stone to another. The HTTP API messages and the Websocket API messages are identical, and are very clearly a JSON-rendered version of the associated IOM command.+Variable commands closely mirror the Python-based [[indigo_2025.2_documentation:object_model_reference|IOM command for variable objects]]. This was completely intentional to make learning one API a stepping stone to another. The HTTP API messages and the Websocket API messages are identical, and are very clearly a JSON-rendered version of the associated IOM command. 
 + 
 +== create == 
 + 
 +The id key is optional, but may contain a user generated ID that will be logged and returned to help match up with message requests. Custom id values should be strings. The parameters dict is required and must contain a value key/value pair. The value must be a string, but an empty string is accepted. The folder key/value pair is optional. If a folder ID is included that doesn't exist, Indigo will ignore it and create the variable outside all folders. 
 + 
 +<code json> 
 +
 +  "id": "optional-message-id", 
 +  "message": "indigo.variable.create", 
 +  "objectId": "new_name", 
 +  "parameters":
 +    "value": "new value", 
 +    "folder": 12345678, 
 +  } 
 +
 +</code>
  
 == updateValue == == updateValue ==
Line 2127: Line 2143:
  
 === Variable Command Messages === === Variable Command Messages ===
-The only action that can currently be performed on variable is to update the value. The ''id'' key is optional, but may contain a user generated ID that will be logged and returned to help match up with message requests. Custom ''id'' values should be strings.+ 
 +== indigo.variable.create == 
 +The ''id'' key is optional, but may contain a user generated ID that will be logged and returned to help match up with message requests. Custom ''id'' values should be strings. The ''parameters'' dict is required and must contain ''value'' key/value pair. The value must be a string, but an empty string is accepted. The ''folder'' key/value pair is optional. If a folder ID is included that doesn't exist, Indigo will ignore it and create the variable outside all folders. 
 + 
 +**create**  ''[[variable_class#create|indigo.variable.create(123456789, value="Some string value", folder=12345678)]]'' 
 + 
 +<code json> 
 +
 +  "id": "optional-message-id", 
 +  "message": "indigo.variable.create", 
 +  "objectId": "new_name", 
 +  "parameters":
 +    "value": "new value", 
 +    "folder": 12345678, 
 +  } 
 +}</code> 
 + 
 +== indigo.variable.updateValue == 
 +The ''id'' key is optional, but may contain a user generated ID that will be logged and returned to help match up with message requests. Custom ''id'' values should be strings.
  
 **updateValue**  ''[[variable_class#update_value|indigo.variable.updateValue(123456789, value="Some string value")]]'' **updateValue**  ''[[variable_class#update_value|indigo.variable.updateValue(123456789, value="Some string value")]]''
  • /www/perceptive/wiki/data/attic/indigo_2025.2_documentation/api.1775586473.txt.gz
  • Last modified: 2026/04/07 18:27
  • by 127.0.0.1