Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
indigo_2025.1_documentation:overview [2025/10/21 23:03] – [Web Server Event] davel17indigo_2025.1_documentation:overview [2025/10/22 20:48] (current) – [Web Server Event] davel17
Line 168: Line 168:
 ^ Field ^ Description ^ ^ Field ^ Description ^
 | Webhook ID | This is a random code generated by Indigo. It's used to identify which webhook is associated with the event. You can use the code provided or use one of your own. NOTE: if someone has your Reflector URL and the webhook ID, they can cause the event to fire. If you use your own ID, it's best not to make it easily guessable.| | Webhook ID | This is a random code generated by Indigo. It's used to identify which webhook is associated with the event. You can use the code provided or use one of your own. NOTE: if someone has your Reflector URL and the webhook ID, they can cause the event to fire. If you use your own ID, it's best not to make it easily guessable.|
-| Webhook Method [POST] | | +| Webhook Method\\ [POST] | Use //''POST''// to indicate that the webhook is sending information to Indigo and not expecting data in return (your call will be 
-Webhook Method [GET] | | +POST Processing\\ [JSON] | this type of webhook will accept a POST and interpret the payload as JSON. 
-| Processing [JSON] | | +POST Processing\\ [HTML Form] | this type of webhook will accept a POST with optional form data, which will be converted into a dict of name value pairs and passed through as data. 
-Processing [HTML Form] | |+Webhook Method\\ [GET] | this type of webhook will accept a GET and will pass through any query arguments as the data element. GET webhooks do not have settings for processing the associated payload. |
  
-You can find more information on the [[indigo_2025.1_documentation:webhooks|Webhooks]] page.+You can find more information on the [[indigo_2025.1_documentation:webhooks|Webhooks]] page. You can find more information about using substitutions on the Indigo [[indigo_2025.1_documentation:substitutions|substitutions page]].
 ===== Schedules ===== ===== Schedules =====
  
Line 455: Line 455:
 {{open_file_action.png?nolink|Open File Action Image}} {{open_file_action.png?nolink|Open File Action Image}}
  
-This will open the specified file (full path using *nix slashes ("/")) using the default application. If it's the path to an application (e.g. "/Applications/TextEdit.app") then it will launch that app. You can also add command-line options and include markup that will do variable (<nowiki>%%v:VARIDHERE%%</nowiki>) and device state (<nowiki>%%d:DEVIDHERE:STATEIDHERE%%</nowiki>substitutions. <color red>Note</color>: file paths that contain spaces will need to have the spaces escaped with a backslash - /some\ path/that\ has/escaped\ spaces/.+This will open the specified file (full path using *nix slashes ("/")) using the default application. If it's the path to an application (e.g. "/Applications/TextEdit.app") then it will launch that app. You can also add command-line options and include [[indigo_2025.1_documentation:substitutions|Indigo substitutions]]. <color red>Note</color>: file paths that contain spaces will need to have the spaces escaped with a backslash - /some\ path/that\ has/escaped\ spaces/.
 == Run Shell Script == == Run Shell Script ==
 {{run_shell_script_action.png?nolink|Run Shell Script Action Image}} {{run_shell_script_action.png?nolink|Run Shell Script Action Image}}
Line 467: Line 467:
  
 == Write to Log == == Write to Log ==
-{{write_to_log_action_2023_1.png?nolink|Write to Log Action Image}}+{{:indigo_2025.1_documentation:write_to_log.png?600|}}
  
-This will write the specified text into the event log - optionally with the specified type string. In addition, you can select from three logging levels: ''**Info (normal)**'', ''**Warning**'', or ''**Error**''. The log message will be appropriately colored based on the chosen logging level.+This will write the specified text into the event log - optionally with the specified type string. The **Text to Log** field supports the various [[indigo_2025.1_documentation:substitutions|Indigo substitutions]]. 
 + 
 +In addition, you can select from three logging levels: ''**Info (normal)**'', ''**Warning**'', or ''**Error**''. The log message will be appropriately colored based on the chosen logging level.
 == Email Event Log Data == == Email Event Log Data ==
 {{email_log_action.png?nolink|Email Log Action Image}} {{email_log_action.png?nolink|Email Log Action Image}}
Line 501: Line 503:
 Use this action type to allow Indigo to fire Apple Shortcuts, provided your server is running a version of macOS that supports the Shortcuts app. The configuration dialog will present a list of all Shortcuts on the server machine as well as an input field to pass optional text to the selected shortcut when it's run. Use this action type to allow Indigo to fire Apple Shortcuts, provided your server is running a version of macOS that supports the Shortcuts app. The configuration dialog will present a list of all Shortcuts on the server machine as well as an input field to pass optional text to the selected shortcut when it's run.
  
-{{:indigo_2025.1_documentation:run_shortcut_action_2023_1.png?nolink|Run Shortcut Action Image}}+{{:indigo_2025.1_documentation:run_apple_shortcut.png?600|}} 
 + 
 +The mechanism in Shortcuts to get a dictionary from input is extremely picky about the JSON that it's fed. When checked, the checkbox in this dialog explicitly encodes the input as JSON to make things work better. It defaults to off so existing shortcuts won't be encoded. If you pass an [[indigo_2025.1_documentation:substitutions|event substitution]] in the input field like //''%%e:"some_data[0].value"%%''//, you will need to tick the Send JSON checkbox before the shortcut will work. 
 + 
 +You can also optionally save any return data to a variable.
 ==== Variable Actions ==== ==== Variable Actions ====
 {{variable_actions_type_menu.png?nolink|Variable Actions Type Menu Image}} {{variable_actions_type_menu.png?nolink|Variable Actions Type Menu Image}}
Line 526: Line 532:
 {{:indigo_2023.2_documentation:insert_event_data_into_variable.png?600|}} {{:indigo_2023.2_documentation:insert_event_data_into_variable.png?600|}}
  
-Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the variable and, optionally, the ''**Path specifier**'' if you want to access specific parts of the event data. More information can be found on the [[indigo_2025.1_documentation:events_data_path_specifiers|Path Specifiers]] page.+Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the variable and, optionally, the ''**Path string**'' if you want to access specific parts of the event data. More information can be found on the [[indigo_2025.1_documentation:events_data_path_specifiers|Path Strings]] page.
 === Toggle Variable === === Toggle Variable ===
 {{toggle_variable_action.png?nolink|Toggle Variable Action Image}} {{toggle_variable_action.png?nolink|Toggle Variable Action Image}}
Line 836: Line 842:
   "If variable" test3 "is between" "5" "and" "10"   "If variable" test3 "is between" "5" "and" "10"
 </code> </code>
 +
 +==== Condition Scripts ====
  
 If, however, you still can't express your conditional logic using the rule editor, you can still select the ''**If Python script returns True:**'' radio button and write a Python script that programmatically returns **True** or **False**. If, however, you still can't express your conditional logic using the rule editor, you can still select the ''**If Python script returns True:**'' radio button and write a Python script that programmatically returns **True** or **False**.
Line 847: Line 855:
 </code> </code>
 The ''//return False//'' component is optional since only a ''//True//'' return will be acted upon. The ''//return False//'' component is optional since only a ''//True//'' return will be acted upon.
 +
 +In Indigo 2025.1+, you can access the new Event Data dictionary that's passed through the chain to perform custom logic. For instance, you can create a simple condition script that will look at the event data from a Z-Wave Command Received trigger to decide if you want the actions to process or not. This is what the event_data dictionary would look like from a Z-Wave Command Received trigger:
 +
 +<code>
 +event_data = {
 +  "event-indigo-id": 886317539,
 +  "event-plugin-event-id": "zwaveCommand",
 +  "event-plugin-id": "com.perceptiveautomation.indigoplugin.zwave",
 +  "event-plugin-name": "Z-Wave",
 +  "event-type": "PluginEventTrigger",
 +  "timestamp": "2025-07-25T17:18:25",
 +  "zwavecmd-device-id": 1191650674,
 +  "zwavecmd-node-id": 2,
 +  "zwavecmd-scene-id": 255
 +}
 +</code>
 +
 +The script could look something like this:
 +
 +<code>
 +# Devices that you want to continue processing
 +my_device_list = [1234567890, 837603829, 1191650674]
 +if event_data["zwavecmd-device-id"] in my_device_list:
 +    return True
 +return False
 +</code>
 +
 +The **''event_data''** dictionary is automatically made available to your script, so you can just get the Indigo device ID out of that dict and see if it's in the list of device IDs in your condition script. If it is, it will continue processing, if not it will stop processing.
 ----------------------- -----------------------
 //Z-Wave® is a registered trademark of Sigma Designs, Inc. Indigo's support of Z-Wave hardware is neither endorsed nor certified by Sigma Designs.// //Z-Wave® is a registered trademark of Sigma Designs, Inc. Indigo's support of Z-Wave hardware is neither endorsed nor certified by Sigma Designs.//
  
  • /www/perceptive/wiki/data/attic/indigo_2025.1_documentation/overview.1761087822.txt.gz
  • Last modified: 2025/10/21 23:03
  • by davel17