Actions Commands - thica/ORCA-Remote GitHub Wiki

Table of Contents

Action parameter

You can specify several parameter for actions:

Attribute Description
name The name of the action. The name can be empty in elements of multiline line actions. For all others, you have to provide a name for the action
string The action type. Please refer to the list below for valid action types
taptype For button actions. Defines, if the action will be triggered by single taps, double taps or by both. Could be "single", "double" or "both"
interface Sets the interface for this action. You can either use the direct interface name, or, even better, use a variable which points to the interface name. Please refer to section "Variables" to understand, how to use variables. You should just set the interface, if it is different from the page default interface or from the anchor interface.
configname Sets the configuration for this action. You can either use the direct configuraton name, or, even better, use a variable which points to the configuration name. Please refer to section "Variables" to understand, how to use variables. You should just set the configuration name, if it is different from the page default configuration or from the anchor configuration.
conditionchecktype If you want to set a condition for this action, you can specify the type of the condition. Please refer to section Conditions below.
conditionvar For conditions, this is the variable to verify for the condition. Please refer to section Conditions below.
conditionvalue For conditions, this is the value to verify for the condition. Please refer to section Conditions below.
retvar The variable name, where the result of the acxtion should be stored
force The action will not be queued in, instead it will be executed immediatly

Single line actions

A simple action could contain just a single line:

<action name="Send Get Volume Sub" string="sendcommand getvolumesub" retvar="$var(currentvolumesub)"/>

For single line actions, the name parameter is mandantory, otherwise you cannot reference them.

Multi line actions / Macros

Multiline actions are a set of actions. They are similar to macros. An example could look like this.

<action name="FKT SwitchOn $dvar(definition_alias_enigma2)">
<!-- Original wakeup will be valled first by default, so we just add the second stuff-->
<action name="Call Web PowerOn (even if fails)" string="sendcommand power_on"  interface="$var($dvar(definition_alias_enigma2)_INTERFACE_MAIN)" configname="$var($dvar(definition_devicename_enigma2)_CONFIGNAME_MAIN)" condition="$var(POWERSTATUS_$dvar(definition_devicename_enigma2))==OFF"   />
</action>

Actions as functions

You can use every action like a function. Use the call action to call other actions. If you call an action, the calling action continues after the called action is finished. You can nest calling actions, so be aware of endless loops

Conditions

You can add a condition to an action, to prevent / allow execution based on the status of a variable. If the condition evaluates to True, the action will executed, otherwise it will be skipped.

Attribute Description
conditionchecktype Defines how the variables should be compared: Can be one of the following:
  • '==' for equal
  • '!=' for unequal
For variables, which presents a number
  • '>' for greater
  • '>=' for greater or equal
  • '<' for smaleer
  • '<=' for smaller or equal
conditionvar A valid variable to check for
conditionvalue A valid variable or constant to check against
condition This is the combined, better readable version for conditions. As long as your variable names do not include special characters, you can use this syntax

All variables will be compared as strings! An example could look like this:

<action string='sendcommand' par1='power_toggle' conditionchecktype='==' conditionvar='$var(POWERSTATUS_TV)' conditionvalue='ON' />

or

<action string='sendcommand' par1='power_toggle' condition='$var(POWERSTATUS_TV)==ON' />

Action Types

Below you an overview of all valid action types

⚠️ **GitHub.com Fallback** ⚠️