Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To increase the information content of notifications, users can use macros. At the time of sending the notifications, macros will be replaced with the corresponding information: Time, sensor name, its value, and so on.

http://www.connexit.biz

The macros are indicated by the percent sign and the number corresponding to the contained information.
the

The following macros are available:

Macros

Specification

Illustration sample

%1

A verbal description of the triggered logic.

if

    'Onboard Temperature' (id=201001) in state 'high alarm';

and    'Onboard Voltage DC' (id=203001) in state 'high alarm';

then

    'Power-1' (id=304001) changes to state 'on' immediately, once;

    'Simple_Mail' (id=601001) changes to state 'on' immediately, once;

%2

The state of the logic scheme elements included in the IF conditions, at the time when the logic is triggered.

'Onboard Temperature' (id=201001) in state 'high alarm';

'Onboard Voltage DC' (id=203001) in state 'high alarm';

%3

Trigger time of the logic scheme.

11:32:28 2017/06/13

%4

Name of the logic scheme.

'Logic_Temp_01'

%5

The name of the sensor, the change in the state of which led to the activation of the logic. Here is displayed the name of the sensor, from which the logic is triggered.

'Onboard Temperature'

%6

The state of the sensor that triggered the logic scheme.

'high alarm'

%7

The sensor value or its logic level at the time of the triggering of the logic scheme.

'27.60'

%8

The ID of the sensor that triggered the logic scheme.

'201001'

%9

Units of measurement, if the sensor has such a parameter.

°C

%A

The sensor value or its logic level at the time of the triggering of the logic scheme. No quotation marks.

27.60

Macros parameterization

Macros % 5,% 6,% 7 %5, %6, %7, %A have the option of parameterization by ID of the element {id}. Those. For these macros, it is possible to specify an element for which the macro will be calculated.

...

Example of computing macros:

Macro

Description

Example

%5{id}

The name of the sensor with the given id.

%5{

201001

201999} will give the sensor name: 'Onboard Temperature'

%6{id}

Status of the sensor with the given id.

%6{

201001

201999} will issue a sensor state: 'normal'

%7{id}

The measured value of the sensor with the given id

%7{

201001

201999} will give the sensor value: '26.50'

%A{id}

The measured value of the sensor with the given id without quotation marks

%A{201999} will give the sensor value: 26.50

If an element with the specified id is not found, a string is inserted into the message text — 'id=xxxx not found'.

...

Detail macro of the module, group, and system

The macro% 8 macro %8 can be used to determine the ID of the sensor when the logic scheme is triggered by a change in the state of the group, module, or system. This macro can be used as an identifier parameter in macros % 5%5, % 6%6, %7 and % 7%A.

An example of using a macro for processing a module.

...

Consider what information you can get with the help of macros.

Macro

Result of the macro

Explanation

%1

if

    module 'Autodetect' (id=2021) in state 'alarm';

then

    'Power-1' (id=304001) changes to state 'on' immediately, once;

    'Power-2' (id=304002) changes to state 'off' immediately, once;

    'Simple_Mail' (id=601001) changes to state 'on' immediately, once;

Verbal description of the triggered logic. When the 'Autodetect' module is switched to the 'alarm' state, the 'Power-1' relay is turned on immediately (and once, without repeats), the 'Power-2' relay is turned off and the 'Simple_Mail' notification is sent. The module goes into the 'alarm' state if at least one of its elements is in the 'alarm' state.

%2

module 'Autodetect' (id=2021) in state 'alarm';

The state of the elements of the logic scheme included in the IF conditions at the time when the is triggered. The module that triggered the logic and its state are described.

%3

16:14:41 2017/06/13

The response time of the logic scheme.

%4

'Logic_Analog_Sensors'

The name of the logical scheme.

%5

'Autodetect'

The name of the sensor (module), the change in the state of which led to the activation of the logic scheme.

%6

'alarm'

The state of the sensor (module) that initiated the triggering of the logic scheme.

%7

%A

'not supported'

Measured sensor value or its logic level at the time when the logic is triggered. The module does not have this field, so 'not supported' is displayed here.

%8

'107002'

The id of the sensor that triggered the logic scheme. Here is the sensor ID, which is contained in the module and which caused the module to operate, is indicated. In this case, it is a water leakage sensor. Using this macro as a parameter allows you to determine the sensor that has worked inside the module.

%5{%8}

'Analog-2-WATER'

The name of the sensor by ID. We request it by the id of the sensor from which the module is triggered.

%6{%8}

'alarm'

Sensor status by id. We request it by the id of the sensor from which the module is triggered.

%7{%8}

%A{%8}

'1'

1

The sensor value by id. We request it by the id of the sensor from which the module triggered.

%5{201002}

'Analog-1-TEMPERATURE'

The name of the sensor by ID. We request one of the arbitrary sensors, in this case, it is a temperature sensor.

%6{201002}

'high warning'

Sensor status by id. We request one of the arbitrary sensors, in this case, it is a temperature sensor.

%7{201002}

%A{201002}

'28.50'

28.50

The

name

value of the sensor by ID. We request one of the arbitrary sensors, in this case, it is a temperature sensor.


From this information, it is seen that the water leakage sensor 'Analog-2-WATER' has acted in the 'alarm' state, it has transferred the 'Autodetect' module to the 'alarm' state, which triggered the logic scheme and sent the notification.

...

Such information can be obtained using macros in the text of the notification.

Macro

Macro result example

Comment

%1

do not use this macro for group notifications

Because the logic is not used here, then this macro does not make sense.

%2

do not use this macro for group notifications

Because the logic is not used here, then this macro does not make sense.

%3

16:14:41 2017/06/13

The response time corresponds to the moment of transition of the group to the observed state.

%4

'Group_Temperature_Only'

Group name.

%5

'vt470-0192-temperature'

The name of the sensor (or module) that initiated the state change. Changing the state of this sensor has led to a change in the state of the group and sending a notification.

%6

'high alarm'

The state of the sensor (or module) that initiated the state change.

%7

%A

'27.30'

27.30

The value is measured by the sensor or its logical level at the time of operation.

%8

'201003'

The identifier of the sensor that initiated the state change. Here, it is the sensor identifier that is indicated, a change in the state of which led to a change in the group state and sending a notification.

%5{%8}

'vt470-0192-temperature'

Sensor name by ID. We are requesting the sensor ID from which the group notification worked. In this case, the macro is similar to %5.

%6{%8}

'high alarm'

Sensor state by ID. We are requesting the sensor ID from which the group notification worked. In this case, the macro is similar to %6.

%7{%8}

%A{%8}

'27.30'

27.30

Sensor value by ID. We are requesting the sensor ID from which the group notification worked. In this case, the macro is similar to %7.

%5{201002}

'Analog-1-TEMPERATURE'

Sensor name by ID. We request one of any sensors, in this case, it is a temperature sensor. The macro allows for example to display the data of any sensors of the group.

%6{201002}

'high warning'

Sensor state by ID. We request one of any sensors, in this case, it is a temperature sensor. The macro allows for example to display the data of any sensors of the group.

%7{201002}

%A{201002}

'28.50'

28.50

Sensor value by ID. We request one of any sensors, in this case, it is a temperature sensor. The macro allows for example to display the data of any sensors of the group.