Macros in the notification text:
The SMS message text can optionally contain macros.
Macros have the following structure: %{number of macro}.
When sending an SMS notification, the Didactum monitoring system fills the macro variables with the current measurement and status values.
The following macros are available in Didactum monitoring systems (as of 01/2014):
| Macro | Description | |
| 1% | Description of the logic scheme / event. | |
| 2% | Value of the sensor. | |
| 3% | Date and time. | |
| 4% | Name of the logic scheme. | |
| 5% | Name of the sensor. | |
| 6% | Status of the triggered sensor. | |
| 7% | Value of the sensor or the status. |
Examples of macros:
%4
--
%1
--
%2
--
%3
When the logic is triggered and the notification is sent, the recipient receives a message in the following form:
Logic scheme name
--
if 'S/N iButton'(id=13) in state 'alarm',
then
'Email'(id=302) changes to state 'on' immediately
'Relay‑0'(id=31) changes to state 'pulse' immediately
--
'S/N iButton'(id=13) in state ‘alarm’
--
12:40:36 2014/01/18
We recommend using a more informative message format. By default it is written in the following form:
Logic %4:
--
Definition:
%1
Current sensor state:
%2
--
System time: %3
Message templates with macros %5, %6, %7 and %8
The macros %5, %6 and %7 can be individually adapted and evaluated using the element ID (id). Examples of macros with an element ID (id):
- %5{201001} — prints the name of the element with id=201001 – 'internal T°C';
- %6{201001} — prints the state of the element with id=201001 – 'normal';
- %7{201001} — prints the value of the element with id=201001 – '21.4';
If an element with the specified ID cannot be found in the message text, the notification will include the message 'id = xxxx not found'.
If the parameter {id} is not specified, the message text will insert the computed value of the element that triggered the logic scheme.
New message template %8
The new IT monitoring systems of the 50 / 100 / 500 model series support the new macro function %8. Macro %8 is used to determine the ID of the sensor that triggered the underlying logic scheme. In the message text, the ID is displayed in single quotation marks (e.g. '203001'). Assume there is a logic scheme linked to a group status change notification.
At the beginning, all elements in the group are in a normal state, so the entire group is in the normal state. The logic stored in the logical scheme of the IT monitoring system is therefore inactive. Next, one of the sensors in the group is triggered, causing the entire group to change into the alarm state. The logic circuit is activated according to the new operating state of the group. In accordance with the template, the text is formed and the notification is sent.
In such a case, when creating the notification text macros %5 and %6, they are replaced by the name and state of the group. Macro %8 is replaced by the value of the ID of the triggered sensor within the group. This means that the group, which contains the sensor, module or system, also changes state. The status change of the group triggers macro %8, and the message template is replaced by the element ID.
Note from the technical editorial team:
The value of macro %8 is calculated at the time the underlying logic circuit is triggered. Activating other elements with the activated logic scheme does not change the ID value in macro %8.
Example:
Sensor No.1 in group No.1 enters the state “Warning level (high)”. The entire group now switches to the state “Warning level (high)” and the rule stored under “Logic scheme” of the IT monitoring system is triggered. In addition, sensor No.2 also changes to the state “Warning level (high)”.
Sensor No.1 returns to the “Normal” status. Macro %8 indicates the ID of sensor No.1. Macro %8 can optionally contain the parameters of macros %5, %6 and %7. A combination of the two macros in the format %6{%8} gives, for example, the current sensor status.