| Both sides previous revision Previous revision | |
| indigo_2024.1_documentation:overview [2024/12/14 02:22] – [Refreshing Image URL] davel17 | indigo_2024.1_documentation:overview [2025/04/14 20:10] (current) – external edit 127.0.0.1 |
|---|
| Here is the device dialog: | Here is the device dialog: |
| |
| {{device_dialog_new.png?nolink|}} | {{device_dialog_new.png?nolink|Device Dialog New Image}} |
| |
| The first thing that you need to select is the ''**Type**''. Indigo includes support for the following device types: [[Managing Z-Wave Devices|Z-Wave]], [[Managing INSTEON Devices|INSTEON]], and [[Managing X10 Devices|X10]] (click on the types for details of how to manage devices of that type). Indigo also has a [[indigo_2024.1_documentation:virtual_devices_interface|Virtual Devices interface type]] and the following plugins which add additional device types: | The first thing that you need to select is the ''**Type**''. Indigo includes support for the following device types: [[Managing Z-Wave Devices|Z-Wave]], [[Managing INSTEON Devices|INSTEON]], and [[Managing X10 Devices|X10]] (click on the types for details of how to manage devices of that type). Indigo also has a [[indigo_2024.1_documentation:virtual_devices_interface|Virtual Devices interface type]] and the following plugins which add additional device types: |
| Once you've selected a device type, the fields and buttons between the ''**Type**'' popup and the tab view at the bottom of the screen will adjust based on the type of device that you select. The tab view will show at least one tab (titled "Settings") for every device. Here's an example of a Z-Wave module: | Once you've selected a device type, the fields and buttons between the ''**Type**'' popup and the tab view at the bottom of the screen will adjust based on the type of device that you select. The tab view will show at least one tab (titled "Settings") for every device. Here's an example of a Z-Wave module: |
| |
| {{device_dialog_zwave.png?nolink|}} | {{device_dialog_zwave.png?nolink|Device Dialog Z-Wave Image}} |
| |
| Inside each tab, you have the ''**Name**'' field, which represents the unique name of this device. Next you have the ''**Notes**'' field - it's a free-form text field that you can put anything into you want - perhaps to help describe what features you're using, where it's physically located, or significant triggers that use it. You can put whatever you like in that field. | Inside each tab, you have the ''**Name**'' field, which represents the unique name of this device. Next you have the ''**Notes**'' field - it's a free-form text field that you can put anything into you want - perhaps to help describe what features you're using, where it's physically located, or significant triggers that use it. You can put whatever you like in that field. |
| Some devices have multiple "personalities" - in other words a single physical device can actually represent multiple devices. The INSTEON FanLinc is one example: it's a single module that has Fan Speed controls and Dimmer controls. In Indigo, each of these is represented as a different device in the various device lists. However, when you edit one of them, each device will be represented in a single dialog with multiple tabs: | Some devices have multiple "personalities" - in other words a single physical device can actually represent multiple devices. The INSTEON FanLinc is one example: it's a single module that has Fan Speed controls and Dimmer controls. In Indigo, each of these is represented as a different device in the various device lists. However, when you edit one of them, each device will be represented in a single dialog with multiple tabs: |
| |
| {{fanlinc_dimmer.png?nolink}} | {{fanlinc_dimmer.png?nolink|Fanlinc Dimmer Image}} |
| {{fanlinc_fanspeed.png?nolink}} | {{fanlinc_fanspeed.png?nolink|Fanlinc Fanspeed Image}} |
| {{device_dialog_multiple_personalities.png?nolink|}} | {{device_dialog_multiple_personalities.png?nolink|Device Dialog Multiple Personalities Image}} |
| |
| To get started adding devices to Indigo, visit the page that's appropriate for the technology you're using: [[Managing Z-Wave Devices|Z-Wave]], [[Managing INSTEON Devices|INSTEON]], [[Managing X10 Devices|X10]], or visit the documentation for the [[http://www.indigodomo.com/plugins|plugin]] that supports the devices you want to add. | To get started adding devices to Indigo, visit the page that's appropriate for the technology you're using: [[Managing Z-Wave Devices|Z-Wave]], [[Managing INSTEON Devices|INSTEON]], [[Managing X10 Devices|X10]], or visit the documentation for the [[http://www.indigodomo.com/plugins|plugin]] that supports the devices you want to add. |
| A trigger is an action (or collection of actions) that Indigo executes when some "event" occurs - the event "triggers" the actions. For instance, when a motion sensor detects motion, that's an event. When Indigo gets a signal from the motion sensor that it has detected motion, it will look for triggers that need to be executed based on that event. Here's the Trigger dialog: | A trigger is an action (or collection of actions) that Indigo executes when some "event" occurs - the event "triggers" the actions. For instance, when a motion sensor detects motion, that's an event. When Indigo gets a signal from the motion sensor that it has detected motion, it will look for triggers that need to be executed based on that event. Here's the Trigger dialog: |
| |
| {{trigger_dialog.png?nolink}} | {{trigger_dialog.png?nolink|Trigger Dialog Image}} |
| |
| We'll look at each of the specific trigger types next, but first we'd like to point out a couple of other features. First, you'll notice that there are three tabs in the dialog: Trigger, Condition, and Actions. The first tab lets you define the trigger event. The second allows you to specify conditions which will be evaluated at runtime to determine whether the actions should be executed. See the [[#Conditions]] section for more information. Lastly, the Actions tab allows you to define the actions that this trigger will execute. See [[#Actions and Action Groups]] for more information. | We'll look at each of the specific trigger types next, but first we'd like to point out a couple of other features. First, you'll notice that there are three tabs in the dialog: Trigger, Condition, and Actions. The first tab lets you define the trigger event. The second allows you to specify conditions which will be evaluated at runtime to determine whether the actions should be executed. See the [[#Conditions]] section for more information. Lastly, the Actions tab allows you to define the actions that this trigger will execute. See [[#Actions and Action Groups]] for more information. |
| ==== Device State Changed ==== | ==== Device State Changed ==== |
| |
| {{device_state_changed_trigger.png?nolink}} | {{device_state_changed_trigger.png?nolink|Device State Changed Trigger Image}} |
| |
| Use the Type ''**Device State Changed**'' to trigger an action whenever a device's state changes. For example, you could create a Trigger Action for whenever a specific light's brightness becomes greater than 75% or for when your thermostat's temperature drops below 55 degrees. | Use the Type ''**Device State Changed**'' to trigger an action whenever a device's state changes. For example, you could create a Trigger Action for whenever a specific light's brightness becomes greater than 75% or for when your thermostat's temperature drops below 55 degrees. |
| ==== Variable Changed ==== | ==== Variable Changed ==== |
| |
| {{variable_changed_trigger.png?nolink}} | {{variable_changed_trigger.png?nolink|Variable Changed Trigger Image}} |
| |
| Use the Type ''**Variable Changed**'' to trigger an action whenever an Indigo variable value changes. Variable values can change as a result of a Modify Variable action or from the user directly modifying the value. See the [[#Variables]] section for more information about using variables. | Use the Type ''**Variable Changed**'' to trigger an action whenever an Indigo variable value changes. Variable values can change as a result of a Modify Variable action or from the user directly modifying the value. See the [[#Variables]] section for more information about using variables. |
| |
| ==== Email Event ==== | ==== Email Event ==== |
| {{:indigo_2024.1_documentation:email_event_2023_1.png|}} | {{:indigo_2024.1_documentation:email_event_2023_1.png?nolink|Email Event Image}} |
| |
| Use the Type ''**Email Event**'' to trigger an action based on emails sent to Indigo. There are three email event types to choose from. | Use the Type ''**Email Event**'' to trigger an action based on emails sent to Indigo. There are three email event types to choose from. |
| ==== Z-Wave Command Received ==== | ==== Z-Wave Command Received ==== |
| |
| {{zwave_command_received_trigger.png?nolink}} | {{zwave_command_received_trigger.png?nolink|Z-Wave Command Received Trigger Image}} |
| |
| Use the Type ''**Z-Wave Command Received**'' to trigger an action when Z-Wave messages are sent from a device, like a scene controller or motion sensor, and then received by the Z-Wave interface. Each device type will have different options based on it's capability | Use the Type ''**Z-Wave Command Received**'' to trigger an action when Z-Wave messages are sent from a device, like a scene controller or motion sensor, and then received by the Z-Wave interface. Each device type will have different options based on it's capability |
| === Match Raw Packet === | === Match Raw Packet === |
| |
| One option that is available for all Z-Wave devices is the ''**Match Raw Packet**'' option. This allows you to specify a pattern to watch for in all incoming Z-Wave messages. This is a pretty technical option, but allows for a lot of flexibility if you can decipher the incoming messsages. In the ''**Match bytes**'' field you can specify specific hexidecimal bytes in an incoming message, and you can include ***** (asterisk) to match 0 or more bytes and **?** (question mark) to match exactly one byte. For example: | One option that is available for all Z-Wave devices is the ''**Match Raw Packet**'' option. This allows you to specify a pattern to watch for in all incoming Z-Wave messages. This is a pretty technical option, but allows for a lot of flexibility if you can decipher the incoming messsages. In the ''**Match bytes**'' field you can specify specific hexadecimal bytes in an incoming message, and you can include ***** (asterisk) to match 0 or more bytes and **?** (question mark) to match exactly one byte. For example: |
| |
| ''* 0x7D 0x84 0x07 *'' | ''* 0x7D 0x84 0x07 *'' |
| ==== INSTEON Command Received ==== | ==== INSTEON Command Received ==== |
| |
| {{insteon_command_received_trigger.png?nolink}} | {{insteon_command_received_trigger.png?nolink|Insteon Command Received Trigger Image}} |
| |
| Use the Type ''**INSTEON Command Received**'' to trigger an action when INSTEON commands are sent from a device, like a KeypadLinc, and then received by the PowerLinc interface. Select the INSTEON command from the ''**Received**'' popup that you want to cause the trigger, along with the **''Device''** from which the command was sent. For devices with multiple buttons, like the KeypadLinc and ControLinc, you can also choose which button press causes the trigger via the ''**Using button**'' popup. | Use the Type ''**INSTEON Command Received**'' to trigger an action when INSTEON commands are sent from a device, like a KeypadLinc, and then received by the PowerLinc interface. Select the INSTEON command from the ''**Received**'' popup that you want to cause the trigger, along with the **''Device''** from which the command was sent. For devices with multiple buttons, like the KeypadLinc and ControLinc, you can also choose which button press causes the trigger via the ''**Using button**'' popup. |
| ==== X10/RF Command Received ==== | ==== X10/RF Command Received ==== |
| |
| {{x10_command_received_trigger.png?nolink}} | {{x10_command_received_trigger.png?nolink|X10 Command Received Trigger Image}} |
| |
| Use the Type ''**X10/RF Command Received**'' to trigger an action when X10 commands are sent from a device, like a PalmPad, SwitchLinc 2-Way Dimmer, etc, and then received by the X10 or RF interface. Select the X10 command from the Received popup that you want to cause the trigger, along with the **''Device''** or X10 ''**Address**'' for that command. | Use the Type ''**X10/RF Command Received**'' to trigger an action when X10 commands are sent from a device, like a PalmPad, SwitchLinc 2-Way Dimmer, etc, and then received by the X10 or RF interface. Select the X10 command from the Received popup that you want to cause the trigger, along with the **''Device''** or X10 ''**Address**'' for that command. |
| Schedules are collections of actions that are executed based on a time/date (temporal) specification - they are "scheduled" to execute. Here is the Schedule dialog: | Schedules are collections of actions that are executed based on a time/date (temporal) specification - they are "scheduled" to execute. Here is the Schedule dialog: |
| |
| {{schedule_dialog.png?nolink}} | {{schedule_dialog.png?nolink|Schedule Dialog Image}} |
| |
| As with [[#triggers|trigger dialog]], the schedule dialog has 3 tabs: ''**Schedule**'' is for specifying the temporal settings; ''**Condition**'' is for specifying further conditions that can determine if the actions are executed, and finally the ''**Actions**'' that will execute. [[#Conditions]] and [[#actions_and_action_groups|Actions]] are discussed in a later section. The two main sections of the ''**Schedule**'' tab separate the temporal settings into two parts - the time of day and the date. | As with [[#triggers|trigger dialog]], the schedule dialog has 3 tabs: ''**Schedule**'' is for specifying the temporal settings; ''**Condition**'' is for specifying further conditions that can determine if the actions are executed, and finally the ''**Actions**'' that will execute. [[#Conditions]] and [[#actions_and_action_groups|Actions]] are discussed in a later section. The two main sections of the ''**Schedule**'' tab separate the temporal settings into two parts - the time of day and the date. |
| * ''**Force trigger time to Y at the latest**'' will cause the trigger to execute at the specified time if the minutes after sunrise specification is later than Y | * ''**Force trigger time to Y at the latest**'' will cause the trigger to execute at the specified time if the minutes after sunrise specification is later than Y |
| |
| {{schedule_time_customize_sheet.png?nolink}} | {{schedule_time_customize_sheet.png?nolink|Schedule Time Customize Sheet Image}} |
| |
| * Time relative to Sunset - works the same as the above option but with respect to Sunset rather than Sunrise | * Time relative to Sunset - works the same as the above option but with respect to Sunset rather than Sunrise |
| On any dialog that has an area where you select actions (Triggers, Schedules, Action Groups, and Control Pages), The first thing you'll see is the ''**Type**'' popup: | On any dialog that has an area where you select actions (Triggers, Schedules, Action Groups, and Control Pages), The first thing you'll see is the ''**Type**'' popup: |
| |
| {{action_type_menu.png?nolink}} | {{action_type_menu.png?nolink|Action Type Menu Image}} |
| |
| Actions are grouped into 6 main categories (some of those categories have subcategories) and then below those there is a category for each plugin that provides actions that aren't integrated into other menus. | Actions are grouped into 6 main categories (some of those categories have subcategories) and then below those there is a category for each plugin that provides actions that aren't integrated into other menus. |
| ==== Device Actions ==== | ==== Device Actions ==== |
| |
| {{device_actions_type_menu.png?nolink}} | {{device_actions_type_menu.png?nolink|Device Actions Type Menu Image}} |
| |
| The ''**Device Actions**'' category has 7 subcategories. Plugins can also add a submenu to this category for the actions they define that work directly on devices. By default, Indigo ships with the [[indigo_2024.1_documentation:plugins:airfoilpro|Airfoil Pro]], [[indigo_2024.1_documentation:plugins:itunes|iTunes]] and [[indigo_2024.1_documentation:plugins:timersandpesters|Timers and Pesters]] plugins, which add subcategories to this menu. You may have other menus as well if you've installed 3rd party plugins. | The ''**Device Actions**'' category has 7 subcategories. Plugins can also add a submenu to this category for the actions they define that work directly on devices. By default, Indigo ships with the [[indigo_2024.1_documentation:plugins:airfoilpro|Airfoil Pro]], [[indigo_2024.1_documentation:plugins:itunes|iTunes]] and [[indigo_2024.1_documentation:plugins:timersandpesters|Timers and Pesters]] plugins, which add subcategories to this menu. You may have other menus as well if you've installed 3rd party plugins. |
| === Universal Controls === | === Universal Controls === |
| |
| {{universal_controls_menu.png?nolink|}} | {{universal_controls_menu.png?nolink|Universal Controls Menu Image}} |
| |
| These controls are either universal across most devices or are available on some specific types of devices (KeypadLincs for instance). | These controls are either universal across most devices or are available on some specific types of devices (KeypadLincs for instance). |
| === Light/Appliance Controls === | === Light/Appliance Controls === |
| |
| {{light_controls_menu.png?nolink|}} | {{light_controls_menu.png?nolink|Light Controls Menu Image}} |
| |
| These controls are for lights and on/off (sometimes called relay) devices. | These controls are for lights and on/off (sometimes called relay) devices. |
| * ''**Set RGBW Levels**'' - set the RGBW levels for lights that support setting their color. | * ''**Set RGBW Levels**'' - set the RGBW levels for lights that support setting their color. |
| === Sprinkler Controls === | === Sprinkler Controls === |
| {{sprinkler_action.png?nolink}} | {{sprinkler_action.png?nolink|Sprinkler Action Image}} |
| |
| These are the options for controlling your sprinkler: | These are the options for controlling your sprinkler: |
| |
| {{sprinkler_schedule_action.png?nolink}} | {{sprinkler_schedule_action.png?nolink|Sprinkler Schedule Action Image}} |
| * ''**Run Schedule**'' - selecting this action will show you the zone list (shown above - note the list will scroll to show all available zones for the sprinkler) that will allow you to set the duration for each zone and optionally multiply those durations by the selected variable. This last option is useful if you change durations based on time of year - you can change the variable value but keep the existing schedule and it'll adjust the duration as appropriate. | * ''**Run Schedule**'' - selecting this action will show you the zone list (shown above - note the list will scroll to show all available zones for the sprinkler) that will allow you to set the duration for each zone and optionally multiply those durations by the selected variable. This last option is useful if you change durations based on time of year - you can change the variable value but keep the existing schedule and it'll adjust the duration as appropriate. |
| * ''**Pause Schedule**'' - this action will pause the current schedule (if for instance you're walking to your car and don't want to get wet) | * ''**Pause Schedule**'' - this action will pause the current schedule (if for instance you're walking to your car and don't want to get wet) |
| === Thermostat Controls === | === Thermostat Controls === |
| |
| {{thermostat_actions_type_menu.png?nolink}} | {{thermostat_actions_type_menu.png?nolink|Thermostat Actions Type Menu Image}} |
| |
| There are 13 basic actions available: | There are 13 basic actions available: |
| === Fan Speed Controls === | === Fan Speed Controls === |
| |
| {{fan_speed_control_actions.png?nolink|}} | {{fan_speed_control_actions.png?nolink|Fan Speed Control Actions Image}} |
| |
| Here are the 7 actions for fan speed control: | Here are the 7 actions for fan speed control: |
| |
| === Input / Output Device Controls === | === Input / Output Device Controls === |
| {{io_action.png?nolink}} | {{io_action.png?nolink|I/O Action Image}} |
| |
| There are eight actions available: | There are eight actions available: |
| === Virtual Device Controls === | === Virtual Device Controls === |
| |
| {{virtual_devices_controls.png?nolink|}} | {{virtual_devices_controls.png?nolink|Virtual Devices Controls Image}} |
| |
| There are a few controls specific to Virtual Devices: | There are a few controls specific to Virtual Devices: |
| === Brand Specific Controls === | === Brand Specific Controls === |
| |
| {{brand_specific_controls.png?nolink|}} | {{brand_specific_controls.png?nolink|Brand Specific Controls Image}} |
| |
| The Brand Specific Controls submenu contains submenus that hold device specific commands that are unique to a particular brand of device (manufacturer). There are two described below: | The Brand Specific Controls submenu contains submenus that hold device specific commands that are unique to a particular brand of device (manufacturer). There are two described below: |
| == Insteon == | == Insteon == |
| |
| {{insteon_specific_actions.png?nolink|}} | {{insteon_specific_actions.png?nolink|Insteon Specific Actions Image}} |
| |
| * ''**Beep Device**'' - ask the device to beep. This function is dependent on the capabilities of the device. | * ''**Beep Device**'' - ask the device to beep. This function is dependent on the capabilities of the device. |
| The HomeSeer 200+ series of devices (WD200+, WS200+, FC200+, and HSM200 as of this release) allow the various LEDs on those devices to be controlled in a variety of ways. These actions enable controlling those features. | The HomeSeer 200+ series of devices (WD200+, WS200+, FC200+, and HSM200 as of this release) allow the various LEDs on those devices to be controlled in a variety of ways. These actions enable controlling those features. |
| |
| {{homeseer_specific_actions.png?nolink|}} | {{homeseer_specific_actions.png?nolink|Homeseer Specific Actions Image}} |
| |
| * ''**Set LED Mode**'' - set the mode of the LEDs on the switch. The default ''Normal (load status)'' behavior is for them to represent the brightness to which the switch is set. You can set the switch to ''Status (custom status)'' which will allow you to individually turn on and off each LED and set it's color. You can also set the bottom LED's behavior. | * ''**Set LED Mode**'' - set the mode of the LEDs on the switch. The default ''Normal (load status)'' behavior is for them to represent the brightness to which the switch is set. You can set the switch to ''Status (custom status)'' which will allow you to individually turn on and off each LED and set it's color. You can also set the bottom LED's behavior. |
| Several recent Inovelli devices (LZW30, LZW30-SN, LZW31, LZW31-SN and LZW36 as of this release) allow the various LEDs on those devices to be controlled in a variety of ways. These actions enable controlling those features. | Several recent Inovelli devices (LZW30, LZW30-SN, LZW31, LZW31-SN and LZW36 as of this release) allow the various LEDs on those devices to be controlled in a variety of ways. These actions enable controlling those features. |
| |
| {{inovelli_specific_actions.png?nolink|}} | {{inovelli_specific_actions.png?nolink|Inovelli Specific Actions Image}} |
| |
| * ''**Set LED Brightness when Off**'' - this will set how bright the LED is when the device is off (nice for night time to easily locate switch in the dark). | * ''**Set LED Brightness when Off**'' - this will set how bright the LED is when the device is off (nice for night time to easily locate switch in the dark). |
| The Zooz ZEN30 allows the various LEDs on it to be controlled in a variety of ways. These actions enable controlling those features. | The Zooz ZEN30 allows the various LEDs on it to be controlled in a variety of ways. These actions enable controlling those features. |
| |
| {{zooz_specific_actions.png?nolink|}} | {{zooz_specific_actions.png?nolink|Zooz Specific Actions Image}} |
| |
| * ''**Set Default Brightness**'' - set the brightness that the dimmer device will come on to. Note this only applies to manual operation - Z-Wave ON commands will always result in the switch returning to it's previous brightness. | * ''**Set Default Brightness**'' - set the brightness that the dimmer device will come on to. Note this only applies to manual operation - Z-Wave ON commands will always result in the switch returning to it's previous brightness. |
| ==== Server Actions ==== | ==== Server Actions ==== |
| |
| {{server_actions_type_menu_2023_1.png?nolink}} | {{server_actions_type_menu_2023_1.png?nolink|Server Actions Type Menu Image}} |
| |
| The Server Actions category has three actions and three subcategories, described below: | The Server Actions category has three actions and three subcategories, described below: |
| === Script and File Actions === | === Script and File Actions === |
| |
| {{script_actions_type_menu_2023_1.png?nolink}} | {{script_actions_type_menu_2023_1.png?nolink|Script Actions Type Menu Image}} |
| |
| == Execute Script == | == Execute Script == |
| {{execute_script_action.png?nolink}} | {{execute_script_action.png?nolink|Execute Script Action Image}} |
| |
| The ''**Execute Script**'' action allows you to execute a Python script as an embedded script or stored in a script file. In general, you should use embedded scripts for scripts that are short and very quick to execute. | The ''**Execute Script**'' action allows you to execute a Python script as an embedded script or stored in a script file. In general, you should use embedded scripts for scripts that are short and very quick to execute. |
| |
| == Open File == | == Open File == |
| {{open_file_action.png?nolink|}} | {{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 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/. |
| == Run Shell Script == | == Run Shell Script == |
| {{run_shell_script_action.png?nolink|}} | {{run_shell_script_action.png?nolink|Run Shell Script Action Image}} |
| |
| This will run the specified script file optionally with the output being inserted into the specified variable. The script must be marked executable and **a valid** shebang (#!/path/to/shell) must be specified at the top of the script. 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 run the specified script file optionally with the output being inserted into the specified variable. The script must be marked executable and **a valid** shebang (#!/path/to/shell) must be specified at the top of the script. 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/. |
| |
| === Log Actions === | === Log Actions === |
| {{log_actions_type_menu_2023_1.png?nolink}} | {{log_actions_type_menu_2023_1.png?nolink|Log Actions Type Menu Image}} |
| |
| == Write to Log == | == Write to Log == |
| {{write_to_log_action_2023_1.png?nolink|}} | {{write_to_log_action_2023_1.png?nolink|Write to Log Action Image}} |
| |
| 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. 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.png?nolink|Email Log Action Image}} |
| |
| This action will send an email to the specified email addresses that contains the specified number of lines from the log file. This is useful for debugging problems (among other things). <color blue>Tip</color>: this action is also available interactively by selecting the ''**Help->Email Log...**'' menu item. | This action will send an email to the specified email addresses that contains the specified number of lines from the log file. This is useful for debugging problems (among other things). <color blue>Tip</color>: this action is also available interactively by selecting the ''**Help->Email Log...**'' menu item. |
| === Enable/Disable/Reload Actions == | === Enable/Disable/Reload Actions == |
| |
| {{enable_type_menu_2023_1.png?nolink|}} | {{enable_type_menu_2023_1.png?nolink|Enable Type Menu Image}} |
| |
| ''**Enable Device**'' - This action will enable Indigo communication with the selected device. You can specify an optional complementary ''**Auto-disable after X minutes**'' action. | ''**Enable Device**'' - This action will enable Indigo communication with the selected device. You can specify an optional complementary ''**Auto-disable after X minutes**'' action. |
| ''**Reload Plugin**'' - This action will restart the specified plugin. You must know the ID of the plugin: you can copy the ID in a [[https://wiki.indigodomo.com/doku.php?id=indigo_2024.1_documentation:getting_started&#individual_plugin_submenu|plug's submenu on the Plugins menu]] or from the plugin's detail page in the [[https://www.indigodomo.com/pluginstore/|Plugin Store]]. | ''**Reload Plugin**'' - This action will restart the specified plugin. You must know the ID of the plugin: you can copy the ID in a [[https://wiki.indigodomo.com/doku.php?id=indigo_2024.1_documentation:getting_started&#individual_plugin_submenu|plug's submenu on the Plugins menu]] or from the plugin's detail page in the [[https://www.indigodomo.com/pluginstore/|Plugin Store]]. |
| |
| {{reload_plugin_dialog.png?nolink|}} | {{reload_plugin_dialog.png?nolink|Reload Plugin Dialog Image}} |
| |
| === Get Contents of URL === | === Get Contents of URL === |
| |
| === Run Apple Shortcut === | === Run Apple Shortcut === |
| 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_2024.1_documentation:run_shortcut_action_2023_1.png|}} | {{:indigo_2024.1_documentation:run_shortcut_action_2023_1.png?nolink|Run Shortcut Action Image}} |
| ==== Variable Actions ==== | ==== Variable Actions ==== |
| {{variable_actions_type_menu.png?nolink|}} | {{variable_actions_type_menu.png?nolink|Variable Actions Type Menu Image}} |
| |
| There are five actions that are specific to variables: | There are five actions that are specific to variables: |
| |
| === Modify Variable === | === Modify Variable === |
| {{modify_variable_action.png?nolink|}} | {{modify_variable_action.png?nolink|Modify Variable Action Image}} |
| |
| Select a variable to modify, then select the options. | Select a variable to modify, then select the options. |
| |
| === Insert Device State into Variable === | === Insert Device State into Variable === |
| {{insert_device_state_into_variable_action.png?nolink|}} | {{insert_device_state_into_variable_action.png?nolink|Insert Device State Into Variable Action Image}} |
| |
| This will insert the selected state of the selected device into the specified variable. After you specify the device, click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above) with a list of all possible states for the device you selected and a popup of all variables. You can create a trigger that executes when a device's state changes and have it insert the new state into the variable. | This will insert the selected state of the selected device into the specified variable. After you specify the device, click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above) with a list of all possible states for the device you selected and a popup of all variables. You can create a trigger that executes when a device's state changes and have it insert the new state into the variable. |
| |
| === Insert Timestamp into Variable === | === Insert Timestamp into Variable === |
| {{insert_timestamp_into_variable_action.png?nolink|}} | {{insert_timestamp_into_variable_action.png?nolink|Insert Timestamp Into Variable Action Image}} |
| |
| Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the variable and, optionally, the format string as defined in the [[http://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior|Python datetime string formatting]] documentation (see the chart at the bottom for format specifiers). The format in the **''Format string''** field is the default format. | Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the variable and, optionally, the format string as defined in the [[http://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior|Python datetime string formatting]] documentation (see the chart at the bottom for format specifiers). The format in the **''Format string''** field is the default format. |
| |
| === Toggle Variable === | === Toggle Variable === |
| {{toggle_variable_action.png?nolink|}} | {{toggle_variable_action.png?nolink|Toggle Variable Action Image}} |
| |
| Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the variable and the values that will be toggled. The first 4 options (''**true/false**'', ''**on/off**'', ''**yes/no**'', ''**enabled/disabled**'') on the ''**Toggle values**'' menu are self explanatory (although note that values will be converted to lower-case for comparisons). The last option, ''**Custom Values**'', will allow you to specify the values. We will first try to match the custom variables without converting to lower case (some unicode characters behave oddly when lowercased) and if we don't find a match then we'll convert. Finally, if nothing matches, we'll just set the value to the first value. | Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the variable and the values that will be toggled. The first 4 options (''**true/false**'', ''**on/off**'', ''**yes/no**'', ''**enabled/disabled**'') on the ''**Toggle values**'' menu are self explanatory (although note that values will be converted to lower-case for comparisons). The last option, ''**Custom Values**'', will allow you to specify the values. We will first try to match the custom variables without converting to lowercase (some unicode characters behave oddly when lowercased) and if we don't find a match then we'll convert. Finally, if nothing matches, we'll just set the value to the first value. |
| |
| === Set Variable to Variable === | === Set Variable to Variable === |
| {{set_variable_to_variable_action.png?nolink|}} | {{set_variable_to_variable_action.png?nolink|Set Variable to Variable Action Image}} |
| |
| Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the destination and source variables. | Click the ''**Edit Action Settings...**'' button and it will open a dialog (shown above). Here you will select the destination and source variables. |
| ==== Notification Actions ==== | ==== Notification Actions ==== |
| {{notification_actions_type_menu.png?nolink}} | {{notification_actions_type_menu.png?nolink|Notification Actions Type Menu Image}} |
| |
| In the standard install of Indigo, there is one action: Send Email. Plugins are allowed to add menu items to this category so there may be more options if you've installed some 3rd party plugins. | In the standard install of Indigo, there is one action: Send Email. Plugins are allowed to add menu items to this category so there may be more options if you've installed some 3rd party plugins. |
| |
| ==== Z-Wave Actions ==== | ==== Z-Wave Actions ==== |
| {{zwave_actions_type_menu.png?nolink}} | {{zwave_actions_type_menu.png?nolink|Z-Wave Actions Type Menu Image}} |
| |
| === Modify Configuration Parameter === | === Modify Configuration Parameter === |
| |
| {{zwave_modify_config_param_action.png?nolink|}} | {{zwave_modify_config_param_action.png?nolink|Z-Wave Modify Configuration Parameter Action Image}} |
| |
| Some Z-Wave devices provide configuration options through the use of configuration parameters. These are generally outlined in the documentation that comes with a device. Indigo often times support setting these parameters directly in the device config dialog, but because of the sheer number of Z-Wave devices we can't add every one. This menu item will allow you to set any config parameter that a device accepts. | Some Z-Wave devices provide configuration options through the use of configuration parameters. These are generally outlined in the documentation that comes with a device. Indigo often times support setting these parameters directly in the device config dialog, but because of the sheer number of Z-Wave devices we can't add every one. This menu item will allow you to set any config parameter that a device accepts. |
| === Send Raw Z-Wave Command === | === Send Raw Z-Wave Command === |
| |
| {{zwave_send_raw_command_action.png?nolink|}} | {{zwave_send_raw_command_action.png?nolink|Z-Wave Send Raw Command Action Image}} |
| |
| This menu selection can be used to send arbitrary Z-Wave protocol-level commands to any Z-Wave device. This is generally only useful when Support instructs you to do so. Note battery operated devices allow for the option to queue the command to be sent the next time the device wakes. | This menu selection can be used to send arbitrary Z-Wave protocol-level commands to any Z-Wave device. This is generally only useful when Support instructs you to do so. Note battery operated devices allow for the option to queue the command to be sent the next time the device wakes. |
| === Start Z-Wave Network Optimize === | === Start Z-Wave Network Optimize === |
| |
| {{zwave_network_optimize_action.png?nolink|}} | {{zwave_network_optimize_action.png?nolink|Z-Wave Network Optimize Action Image}} |
| |
| Indigo can optimize your Z-Wave network by having devices rediscover which devices they are close enough to communicate with. This information is then reported back to the Z-Wave Controller so network routing tables can be updated. You can specify ''**All Devices**'' (which will go through all of your devices - this can be quite time consuming so use during low-traffic times) or you can specify a single device. | Indigo can optimize your Z-Wave network by having devices rediscover which devices they are close enough to communicate with. This information is then reported back to the Z-Wave Controller so network routing tables can be updated. You can specify ''**All Devices**'' (which will go through all of your devices - this can be quite time consuming so use during low-traffic times) or you can specify a single device. |
| There is a corresponding ''**Stop Z-Wave Network Optimize**'' action that will stop the optimization process. | There is a corresponding ''**Stop Z-Wave Network Optimize**'' action that will stop the optimization process. |
| ==== INSTEON Actions ==== | ==== INSTEON Actions ==== |
| {{insteon_actions_type_menu.png?nolink}} | {{insteon_actions_type_menu.png?nolink|Insteon Actions Type Menu Image}} |
| === Execute INSTEON Scene === | === Execute INSTEON Scene === |
| {{:indigo_2024.1_documentation:insteon_scene_action.png?nolink}} | {{:indigo_2024.1_documentation:insteon_scene_action.png?nolink|Insteon Scene Action Image}} |
| |
| There are nine commands that you can send to an INSTEON scene: | There are nine commands that you can send to an INSTEON scene: |
| === Send Raw INSTEON Command === | === Send Raw INSTEON Command === |
| |
| {{insteon_raw_action.png?nolink|}} | {{insteon_raw_action.png?nolink|Insteon Raw Action Image}} |
| |
| This action will allow you to send a raw INSTEON command to any INSTEON device. You can send standard messages (2 bytes) or extended messages (16 bytes). You can also have the results of the command inserted into a variable for later processing. | This action will allow you to send a raw INSTEON command to any INSTEON device. You can send standard messages (2 bytes) or extended messages (16 bytes). You can also have the results of the command inserted into a variable for later processing. |
| ==== Action Options ==== | ==== Action Options ==== |
| {{lower_action_dialog.png?nolink}} | {{lower_action_dialog.png?nolink|Lower Action Dialog Image}} |
| |
| There are three options to each action (and in fact are the only configurable options if you select ''**None**'' as the action ''**Type:**''): | There are three options to each action (and in fact are the only configurable options if you select ''**None**'' as the action ''**Type:**''): |
| |
| ===== Managing Multiple Actions ===== | ===== Managing Multiple Actions ===== |
| {{lower_action_dialog.png?nolink}} | {{lower_action_dialog.png?nolink|Lower Action Dialog Image}} |
| |
| Use the ''**Add New**'' button below the ''**Speak:**'' text area and the separator if you would like to add an additional action. You can then use the ''**Prev**'' and ''**Next**'' buttons to select which action's settings are being displayed. Press the ''**Show All**'' button to see a list of all the actions: | Use the ''**Add New**'' button below the ''**Speak:**'' text area and the separator if you would like to add an additional action. You can then use the ''**Prev**'' and ''**Next**'' buttons to select which action's settings are being displayed. Press the ''**Show All**'' button to see a list of all the actions: |
| |
| {{multiple_actions_list.png?nolink}} | {{multiple_actions_list.png?nolink|Multiple Actions List Image}} |
| |
| You can then Duplicate or Delete the selected action, or use the ''**Up**'' / ''**Down**'' buttons to reorder the list of actions. To edit a specific action's settings, double-click on the action or press the ''**Edit...**'' button. | You can then Duplicate or Delete the selected action, or use the ''**Up**'' / ''**Down**'' buttons to reorder the list of actions. To edit a specific action's settings, double-click on the action or press the ''**Edit...**'' button. |
| - Select the action ''**Type:**'' and select the various options. (See the [[#actions]] section above for details on all of the action's settings, and information on [[#managing multiple actions]] to the Action Group) | - Select the action ''**Type:**'' and select the various options. (See the [[#actions]] section above for details on all of the action's settings, and information on [[#managing multiple actions]] to the Action Group) |
| |
| {{action_group_dialog.png?nolink}} | {{action_group_dialog.png?nolink|Action Group Dialog Image}} |
| |
| Indigo includes a built-in Web server that allows remote execution of your Action Groups from [[http://www.indigodomo.com/touch|Indigo Touch]] or any modern Web browser (Safari, Firefox, Opera). Follow the instructions in the [[getting_started#starting_indigo_server|Starting Indigo Server]] section of the Getting Started guide to make sure that the following options are enabled: ''**Start and connect to Indigo Server on this computer**'', ''**Allow remote access**'', and ''**Enable iPhone, iPod touch, and remote Web browser access**''. | Indigo includes a built-in Web server that allows remote execution of your Action Groups from [[http://www.indigodomo.com/touch|Indigo Touch]] or any modern Web browser (Safari, Firefox, Opera). Follow the instructions in the [[getting_started#starting_indigo_server|Starting Indigo Server]] section of the Getting Started guide to make sure that the following options are enabled: ''**Start and connect to Indigo Server on this computer**'', ''**Allow remote access**'', and ''**Enable iPhone, iPod touch, and remote Web browser access**''. |
| To create a new Control Page, select ''**View->Control Pages**'', then click the ''**New...**'' button above the control page list. You will be shown the control page editor window: | To create a new Control Page, select ''**View->Control Pages**'', then click the ''**New...**'' button above the control page list. You will be shown the control page editor window: |
| |
| {{control_page_editor.png?nolink}} | {{control_page_editor.png?nolink|Control Page Editor Image}} |
| |
| The editor window has 4 areas - the first is the the global control area. In this area you'll find buttons to create new page elements (labels, controls, etc), duplicate existing elements, delete elements, and turn on/off some features of the editor. Select ''**Snap to grid**'' to have page elements snap to a grid that overlays the design area (see the next item). Select ''**Show grid**'' to show the aforementioned grid. Select Edit z-order to show you the order of the page elements and allow you to change them. Higher numbered elements are drawn last, so if you have overlapping controls the one with the highest order will be drawn last. | The editor window has 4 areas - the first is the the global control area. In this area you'll find buttons to create new page elements (labels, controls, etc), duplicate existing elements, delete elements, and turn on/off some features of the editor. Select ''**Snap to grid**'' to have page elements snap to a grid that overlays the design area (see the next item). Select ''**Show grid**'' to show the aforementioned grid. Select Edit z-order to show you the order of the page elements and allow you to change them. Higher numbered elements are drawn last, so if you have overlapping controls the one with the highest order will be drawn last. |
| The white area is the visible area that you'll see on the web page or in Indigo Touch. The gray area is just the image border area - items in the gray area will not show on the control page. If you have the ''**Edit z-order**'' checkbox described above checked, you'll see controls like this for each page element: | The white area is the visible area that you'll see on the web page or in Indigo Touch. The gray area is just the image border area - items in the gray area will not show on the control page. If you have the ''**Edit z-order**'' checkbox described above checked, you'll see controls like this for each page element: |
| |
| {{page_element_examples.png?nolink}} | {{page_element_examples.png?nolink|Page Element Examples Image}} |
| |
| In the example above, you see 4 page elements: the graphical server status element, the server status text area, a device state element using a ceiling fan image, and another device state element using a lightbulb image. The ceiling fan element is selected, as you can tell by the blue brackets at each corner of the image. Because I also have the z-order checkbox selected, you see the ''**z: #**'' next to each element, and above and below that for the selected element you see up/down arrows, one with a line above/below and one without. The arrows that aren't pointing to lines will move the element up/down one step at a time. The arrows that point to lines will move the element to the top/bottom of the element hierarchy. | In the example above, you see 4 page elements: the graphical server status element, the server status text area, a device state element using a ceiling fan image, and another device state element using a lightbulb image. The ceiling fan element is selected, as you can tell by the blue brackets at each corner of the image. Because I also have the z-order checkbox selected, you see the ''**z: #**'' next to each element, and above and below that for the selected element you see up/down arrows, one with a line above/below and one without. The arrows that aren't pointing to lines will move the element up/down one step at a time. The arrows that point to lines will move the element to the top/bottom of the element hierarchy. |
| The third area is the page element detail area. This area changes based on what's selected in the design area and what options are selected for the page element. If no page element is selected in the design area, then you'll see the information about the page itself: | The third area is the page element detail area. This area changes based on what's selected in the design area and what options are selected for the page element. If no page element is selected in the design area, then you'll see the information about the page itself: |
| |
| {{control_page_information.png?nolink}} | {{control_page_information.png?nolink|Control Page Information Image}} |
| |
| This is where you set global information about the page itself. The ''**Page Name:**'' and ''**Description:**'' fields are pretty self-explanatory. Check the ''**Hide Tab Bar at bottom of Indigo Touch when shown**'' to have the bottom navigation bar hidden when this page is viewed in Indigo Touch. You can use a ''**Background image:**'' by selecting it from the popup, such as a floorplan or other image. You can add your own image by creating a PNG file and adding it to the backgrounds folder (to open that folder in the Finder just click the ''**Show Folder**'' button - and if you add an image while Indigo is running, click the ''**Refresh**'' button to have it added to the popup). **Note**: some versions of Indigo don't like spaces in the background image name so just replace spaces with another character such as an underscore. | This is where you set global information about the page itself. The ''**Page Name:**'' and ''**Description:**'' fields are pretty self-explanatory. Check the ''**Hide Tab Bar at bottom of Indigo Touch when shown**'' to have the bottom navigation bar hidden when this page is viewed in Indigo Touch. You can use a ''**Background image:**'' by selecting it from the popup, such as a floorplan or other image. You can add your own image by creating a PNG file and adding it to the backgrounds folder (to open that folder in the Finder just click the ''**Show Folder**'' button - and if you add an image while Indigo is running, click the ''**Refresh**'' button to have it added to the popup). **Note**: some versions of Indigo don't like spaces in the background image name so just replace spaces with another character such as an underscore. |
| == Device State == | == Device State == |
| |
| {{device_state_page_element.png?nolink}} | {{device_state_page_element.png?nolink|Device State Page Element Image}} |
| |
| When you select ''**Device State**'' from the ''**Display:**'' popup, you're shown a list of devices in the ''**For:**'' popup. Once you've selected a device, the next popup will show the list of states for that device. | When you select ''**Device State**'' from the ''**Display:**'' popup, you're shown a list of devices in the ''**For:**'' popup. Once you've selected a device, the next popup will show the list of states for that device. |
| == Variable Value == | == Variable Value == |
| |
| {{variable_value_page_element.png?nolink}} | {{variable_value_page_element.png?nolink|Variable Value Page Element Image}} |
| |
| Variable Value controls have the exact same options as [[#device state]] controls, but rather than use the device state it uses the value of the variable you selected in the ''**For:**'' popup to select the correct image or as the text to display. | Variable Value controls have the exact same options as [[#device state]] controls, but rather than use the device state it uses the value of the variable you selected in the ''**For:**'' popup to select the correct image or as the text to display. |
| == Static Image/Caption == | == Static Image/Caption == |
| |
| {{static_image_page_element.png?nolink}} | {{static_image_page_element.png?nolink|Static Image Page Element Image}} |
| |
| Static Image/Caption controls are simpler than the other controls: they can have an image and/or static text caption. | Static Image/Caption controls are simpler than the other controls: they can have an image and/or static text caption. |
| == Refreshing Image URL == | == Refreshing Image URL == |
| |
| {{refreshing_image_url_page_element.png?nolink}} | {{refreshing_image_url_page_element.png?nolink|Refreshing Image URL Page Element Image}} |
| |
| Refreshing Image URL controls allow you to specify a URL to an image that is refreshed periodically (specified in the ''**Refresh rate:**'' popup). Just specify the image size, URL, and refresh rate. | Refreshing Image URL controls allow you to specify a URL to an image that is refreshed periodically (specified in the ''**Refresh rate:**'' popup). Just specify the image size, URL, and refresh rate. |
| == Server Status Text == | == Server Status Text == |
| |
| {{server_status_text_page_element.png?nolink}} | {{server_status_text_page_element.png?nolink|Server Status Text Page Element Image}} |
| |
| This control will show the latest status update message from the server as text. You can have only one of these controls on your control page. | This control will show the latest status update message from the server as text. You can have only one of these controls on your control page. |
| == Server Status Icon == | == Server Status Icon == |
| |
| {{server_status_icon_page_element.png?nolink}} | {{server_status_icon_page_element.png?nolink|Server Status Icon Page Element Image}} |
| |
| This control will show a spinning icon when the server is performing some request for the control page. You can have only one of these controls on your control page. | This control will show a spinning icon when the server is performing some request for the control page. You can have only one of these controls on your control page. |
| == Client Actions == | == Client Actions == |
| |
| {{client_actions_cp_popup.png?nolink|}} | {{client_actions_cp_popup.png?nolink|Client Actions Control Page Popup Image}} |
| |
| For every page element, you can have one of three client actions performed whenever the page element is clicked/touched: | For every page element, you can have one of three client actions performed whenever the page element is clicked/touched: |
| To manage your variables, select ''**Window->Variable List**'' and you'll see the Variable List window: | To manage your variables, select ''**Window->Variable List**'' and you'll see the Variable List window: |
| |
| {{variable_window.png?nolink}} | {{variable_window.png?nolink|Variable Window Image}} |
| |
| This window is broken up into 3 sections. The top section lets you create new variables, duplicate existing variables, and delete variables. It also lets you search your variable list (either name or value) by typing some text into the search box. | This window is broken up into 3 sections. The top section lets you create new variables, duplicate existing variables, and delete variables. It also lets you search your variable list (either name or value) by typing some text into the search box. |
| On the Trigger and Schedule dialog, there's a tab named ''**Condition**''. If you select this tab, you'll see something like this: | On the Trigger and Schedule dialog, there's a tab named ''**Condition**''. If you select this tab, you'll see something like this: |
| |
| {{conditions_tab.png?nolink}} | {{conditions_tab.png?nolink|Conditions Tab Image}} |
| |
| Conditions allow you to specify extra logic that's evaluated at execution time to determine if the actions associated with the trigger or schedule should be executed. Most conditions will be set to ''**Always**'' - in other words, there are no additional conditions associated with the trigger or schedule. However, there are many situations where you need to factor in other information at execution time that can help determine if the actions should be performed. | Conditions allow you to specify extra logic that's evaluated at execution time to determine if the actions associated with the trigger or schedule should be executed. Most conditions will be set to ''**Always**'' - in other words, there are no additional conditions associated with the trigger or schedule. However, there are many situations where you need to factor in other information at execution time that can help determine if the actions should be performed. |
| A simple example might be a motion sensor triggering a light - you might want motion detected by the motion sensor to turn on a light, but only between the hours of 6pm and 11pm. You can currently do that by creating a schedule that enables a trigger at 6pm and another one that disables the trigger at 11pm. But that's 3 moving parts (two schedules and the trigger). Using a condition, you can reduce that to just a single trigger and the following condition: | A simple example might be a motion sensor triggering a light - you might want motion detected by the motion sensor to turn on a light, but only between the hours of 6pm and 11pm. You can currently do that by creating a schedule that enables a trigger at 6pm and another one that disables the trigger at 11pm. But that's 3 moving parts (two schedules and the trigger). Using a condition, you can reduce that to just a single trigger and the following condition: |
| |
| {{motion_sensor_condition_example.png?nolink}} | {{motion_sensor_condition_example.png?nolink|Motion Sensor Condition Example Image}} |
| |
| This condition says that if the current time is greater than 6pm and less than 11:00pm then the actions will be executed. | This condition says that if the current time is greater than 6pm and less than 11:00pm then the actions will be executed. |
| Given all of these conditions, here's how the condition editor would look: | Given all of these conditions, here's how the condition editor would look: |
| |
| {{sprinkler_condition.png?nolink}} | {{sprinkler_condition.png?nolink|Sprinkler Condition Image}} |
| |
| This is a negative condition - if ''**None**'' of the rules are true then the actions will execute. It could also be written as an ''**All**'' rule if you switched the tests around: | This is a negative condition - if ''**None**'' of the rules are true then the actions will execute. It could also be written as an ''**All**'' rule if you switched the tests around: |
| |
| {{sprinkler_condition_using_all.png?nolink}} | {{sprinkler_condition_using_all.png?nolink|Sprinkler Condition Using All Image}} |
| |
| This version says that if ''**All**'' the conditions are true (windows aren't open, temperature is greater than 40, and rain total is less than 3/4 of an inch) the actions will execute. | This version says that if ''**All**'' the conditions are true (windows aren't open, temperature is greater than 40, and rain total is less than 3/4 of an inch) the actions will execute. |
| To add a rule, click the plus (+) button next to a rule to add a rule directly below it. Click the minus (-) button to remove a rule. To create a sub-rule group, hold down the option key on your keyboard and the plus button becomes an ellipsis (…) button. Clicking on this will create a sub-rule group (Any, All, None). For instance, here's an arbitrarily complex (but nonsensical) rule with several sub-groups: | To add a rule, click the plus (+) button next to a rule to add a rule directly below it. Click the minus (-) button to remove a rule. To create a sub-rule group, hold down the option key on your keyboard and the plus button becomes an ellipsis (…) button. Clicking on this will create a sub-rule group (Any, All, None). For instance, here's an arbitrarily complex (but nonsensical) rule with several sub-groups: |
| |
| {{complex_condition_rule.png?nolink}} | {{complex_condition_rule.png?nolink|Complex Condition Rule Image}} |
| |
| To reorder rules, simply drag them around. As you can see, the condition rule editor is extremely powerful - you can create complex multiple conditional logic without resorting to a script. And it's available to Lite users as well (whereas script conditions aren't). The Insert into Event Log Window button will put a textual representation of your rule into the event log for handy copy/paste into a forum post - this will help others see what your logic is to assist in debugging: | To reorder rules, simply drag them around. As you can see, the condition rule editor is extremely powerful - you can create complex multiple conditional logic without resorting to a script. And it's available to Lite users as well (whereas script conditions aren't). The Insert into Event Log Window button will put a textual representation of your rule into the event log for handy copy/paste into a forum post - this will help others see what your logic is to assist in debugging: |
| </code> | </code> |
| |
| 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**. |
| |
| For example, | For example, |