Text macros

The message text template (the message field) can contain the following macros:

  • %1 - a description of the logic scheme;
  • %2 - state of elements of the logic scheme included in the IF conditions;
  • %3 - date and time of operation of the logic scheme;
  • %4 - name of the logic scheme;
  • %5{id} - the name of the sensor (parameterizable);
  • %6{id} - the status of the sensor (parameterizable);
  • %7{id} - the value of the sensor (parameterizable);
  • %8 - output of the index of the element leading to the last change in the status of the group / module / system.


Macros are calculated at the time of notification. The sent message text is formed from the message template, while the message template macros are replaced with the result of computing these macros in single quotes.

Macros %5, %6, %7 have the option of parameterization by the identifier of the element {id}. Thus. for these macros it is possible to specify a specific element for which the macro will be calculated. The element ID is passed as the parameter that defines the element. The identifier of the element is placed in curly braces {id} immediately after the name of the macro.

Example of computing macros:

%5{201001} — the output will be id=201001 - 'sc470-0192-internal T°C';

%6{201001} — the output will be id=201001 - 'normal';

%7{201001} — the output will be id=201001 - '27.4'.

If the element with the specified identifier is not found, the string

'id=xxxx not found'

is inserted into the message text.

If the {id} parameter is not specified, a value calculated for the element triggering of the logic scheme is inserted into the message text.


Macro %8 displays the value of the identifier of the sensor (not a group and not a module), the change in state of which led to the activation of the logic scheme. The identifier of the sensor that was triggered independently, as part of a group or as part of a module included in the logic scheme, is displayed, and not the last element, which can be both a group and a module.

If the sensor is included in the logic scheme directly (not through the group and not through the module), then it will be the same sensor, whose name, state and value are output by macros %5, %6 and %7 (without parameterization via parentheses {}). If the group / module is included in the logic scheme, then by these (%5, %6, %7) macros the values ​​of the group / module are displayed, and the macro %8 allows to determine the sensor inside the group / module.

The macro can be nested as a parameter in macros %5{}, %6{}, and %7{} (for example, %6{%8} displays the current state of this sensor).

Only the last sensor that led to the change in the status of the group / module is determined, but there may be several sensors in the position determining the status of the group / module.

Example:

Logic1 is triggered by Group1 in the Warning state.

Group 1 is in the Alarm state, and consists of:

Sensor1 in the Alarm state,

Sensor2 is in the Warning state,

Sensor3 is in the Warning state.

The Sensor1 changes to the Normal state.

Group1 goes into the Warning state and triggers Logic1.

The %8 macro will return the Sensor1 ID.