Wiki source code of 7. Events Setup

Version 63.1 by Lana on 2025/12/11 01:21

Show last authors
1 = CONTENT =
2
3 {{toc /}}
4
5 = 1. INTRODUCTION =
6
7 CENTO is a multifunctional software platform for data collection, processing and display. This Manual describes the user tool in CENTO "Events".
8
9 It is assumed that the user is already familiar with the basic elements of the CENTO interface after reading the "User Manual" instructions.
10
11 "Events" in CENTO are designed to increase the observability of system operation by tracking changes in the system status and process equipment, logging events, and notifying users. Events help the personnel to timely react to changes in the technological process and system operation. To achieve these goals, CENTO offers user notification and acknowledgement features alongside event logging.
12
13 = 2. CENTO EVENTS =
14
15 == 2.1. Event editor ==
16
17 To go to the **Event editor**, select the item in the main menu:
18
19 Settings > Events > Event editor.
20
21 [[image:Screenshot 2025-12-10 at 21.28.44.png]]
22
23 Fig. 2.1 - Event editor in the CENTO menu
24
25 Figure 2.2. shows the interface of the **Event editor.**
26
27 [[image:Screenshot 2025-12-10 at 21.29.15.png]]
28
29 Fig. 2.2 - Event editor
30
31 The **Event editor** page provides the option to:
32
33 1. Add a new event to the system [[image:Screenshot 2025-12-10 at 21.29.51.png||height="21" width="74"]]
34 1. Activate [[image:Screenshot 2025-12-10 at 21.30.26.png||height="20" width="108"]] or disable [[image:Screenshot 2025-12-10 at 21.30.54.png||height="20" width="103"]] selected events
35 1. (((
36 Edit [[image:Screenshot 2025-12-10 at 21.32.53.png||height="25" width="24"]], copy [[image:Screenshot 2025-12-10 at 21.33.40.png||height="26" width="26"]], and delete [[image:Screenshot 2025-12-10 at 21.34.05.png||height="27" width="27"]]in the "Actions" column
37 )))
38 1. (((
39 Delete any number of events [[image:Screenshot 2025-12-10 at 21.35.15.png||height="22" width="125"]]
40 )))
41 1. (((
42 Edit the number of records to be displayed
43 )))
44 1. (((
45 Search for events of interest by filtering [[image:Screenshot 2025-12-10 at 21.36.03.png||height="32" width="33"]] (the filter is located to the right of the table headings)
46 )))
47 1. (((
48 Edit event configuration [[image:Screenshot 2025-12-10 at 21.36.56.png||height="22" width="86"]]
49 )))
50 1. (((
51 Adjust the setpoint text [[image:Screenshot 2025-12-10 at 21.37.32.png||height="23" width="122"]]
52 )))
53
54 == 2.2. Creating and editing an event in web-interface ==
55
56
57 An event can be created manually and automatically. Events are automatically created when the setpoint parameter is enabled. For a detailed description, refer to the "Setup Manual".
58
59 The text of setpoints can be edited in the **Event editor** interface.
60
61 To do this, click on the button [[image:Screenshot 2025-12-10 at 21.38.47.png||height="22" width="119"]]. After that, the **Setpoint editing** window opens (see Fig. 2.3), where the wording of the setpoints for Triggering and/or Return can be modified, such as Upper/Lower warning limit, Upper/Lower alarm limit, and Upper/Lower physical limit.
62
63 One or more variables can be specified in the setpoint triggering message:
64
65 * ~{~{.tag_name}} - tag name;
66 * ~{~{.tag_code}} - tag code;
67 * ~{~{.tag_id}} - tag ID;
68 * ~{~{.tag_code_or_id}} - tag code, if the code is empty, then its ID;
69 * ~{~{.tag_limit}} - setpoint value;
70 * ~{~{.tag_unit}} - tag units;
71 * ~{~{.device_name}} - name of the device to which the tag is linked.
72
73 IMPORTANT: if {figure brackets} or dots are missing when writing these parameters, a validation error will occur.
74
75 If a parameter with an error (non-existent parameter) is entered, for example: ~{~{.tag_name_2}}, the Operating journal will receive an event of the following type: [[image:Screenshot 2025-12-10 at 21.39.52.png||height="18" width="18"]] **< no value> > 10**.
76
77 [[image:Screenshot 2025-12-10 at 21.40.35.png]]
78
79 Fig. 2.3 - Setpoint editing page
80
81 To create a new event, click on the button [[image:Screenshot 2025-12-10 at 21.41.09.png||height="24" width="96"]].
82
83 Only an authorized user with appropriate rights can create and edit events.
84
85 Fig. 2.4. shows the page for creating a new event.
86
87 [[image:Screenshot 2025-12-10 at 21.41.54.png]]
88
89 Fig. Event editor: creation page
90
91 The** Event editor** window contains the following fields:
92
93 **Identifier **contains the sequence number of the event (filled in automatically), can be changed if necessary.
94
95 **Name **is a field for entering the name of the event.
96
97 **Object **field is used to add an object from the CENTO Information Model (IM), to which the event refers (see "Information Model Setup Manual"). The IM object is selected from the IM drop-down tree.
98
99 **Device **is** **the device to which the event refers is added in this field. The device is selected from the drop-down device tree.
100
101 **Event type **switches the event type between "Single" and "With return" [[image:Screenshot 2025-12-10 at 21.42.53.png||height="27" width="135"]].
102
103 There are two types of events in CENTO – single and with return events. For system objects, there may be important state that the user should see in the active status (e.g., "Ground in a network with isolated neutral", "Switching on a sectionalizer", "Opening the emergency exit door"). Events reporting this important state are opening events. Events reporting the end of an important object state are closing events. These two types of events are events with return. **Events with return should ALWAYS be paired: the second event ALWAYS closes the first one. **Events in the active state are displayed in a separate tab of the operational log and disappear from there after triggering the closing event. Other events (regardless of their importance) are single events.
104
105 **Tags **field requires to specify the ID of the telemetering tag to which the event belongs;
106
107 **Message **is the message text that should be output when the event is triggered;
108
109 **Formula **field is used to enter a formula that describes the condition for the event to be triggered. Clicking on [[image:Screenshot 2025-12-10 at 21.43.51.png||height="28" width="163"]] will open the list of formulas for forming the event. Description of formulas is given in the Appendix.
110
111 **Dead time, (ms)** field specifies the delay time for the event to be generated in milliseconds. It helps prevent false events, such as those caused by frequent device polling failures due to poor communication.
112
113 **Type** is** **a drop-down list used to specify the importance or category of the event.
114
115 **Acknowledgement **is a switch to activate the function of user acknowledgement of event notification;
116
117 **Sound **field is used to select a sound for notification. The drop-down list contains those sounds that are loaded through the Sound Editor (see item 3). The selected sound can be listened to using the button [[image:Screenshot 2025-12-10 at 21.44.31.png||height="24" width="27"]] to the right of the "Sound" field.
118
119 **Before acknowledgement** is a switch to play the selected sound before the event is acknowledged;
120
121 **Sound repeats **field is used to set the number of repetitions of sound playback when the event occurs.
122
123 **Warning! **Modern browsers block playback of sounds in a browser by default, so sound alerts may not be played. To allow CENTO to play sounds in the browser, follow the steps below (an example is given for Chrome):
124
125 ~1. Left click to the left of the address bar (see Fig. 2.5).
126
127 2. Select "Site settings".
128
129 [[image:Screenshot 2025-12-10 at 21.45.18.png]]
130
131 Fig. 2.5 - Site settings
132
133 3. In the opened window, go to Privacy and security → Site settings → Additional permissions → Content → Additional content settings → Sound, and select Allow (see Fig. 2.6).
134
135 [[image:Screenshot 2025-12-10 at 21.48.19.png]]
136
137 Fig. 2.6 - Allow sound
138
139 4. Refresh the CENTO page.
140
141 After filling in all the required fields, click [[image:Screenshot 2025-12-10 at 21.48.55.png||height="25" width="70"]] and update the configuration (see Fig. 2.7).
142
143 [[image:Screenshot 2025-12-10 at 21.49.27.png]]
144
145 Fig. 2.7 - Update  configuration
146
147 If selecting **With return** in the Event type, the **Event editor** window displays additional fields with the general heading **With return** (see Fig. 2.8). These fields are the same as those used for the **Single** event type.
148
149 [[image:Screenshot 2025-12-10 at 21.49.59.png]]
150
151 Fig. 2.8 - With return event editor window
152
153 == 2.3. Creating and editing events using Excel ==
154
155 Events can be configured using Excel files. This function is available on the page /CENTO/web/ui/configuration_loader/index (Settings > Configuration Files) (see Fig. 2.9).
156
157 [[image:Screenshot 2025-12-10 at 21.51.04.png]]
158
159 Fig. 2.9 - Import/Export configuration file page
160
161 To configure events, download the events.xlsx file by clicking the button [[image:Screenshot 2025-12-10 at 21.51.37.png||height="28" width="97"]], then fill in the appropriate cells in the new line of the table in the **Events** tab (see Fig. 2.10).
162
163 [[image:Screenshot 2025-12-10 at 21.52.08.png]]
164
165 Fig. 2.10 - Events tab in the events.xslx file
166
167 To create an event, fill in the following columns:
168
169 **Event ID **is an event unique number.
170
171 **Name **is the name of the event.
172
173 **Event type **is one_position or two_position event.
174
175 **Event status **is responsible for the event status: 1 - event is enabled, 0 - event is disabled.
176
177 **Device ID **is a device identifier to which the event refers.
178
179 **The device** is not required to be filled in, it is generated when downloading an Excel file to help with debugging (displays the path of the linked device).
180
181 **Object ID **is an IM object identifier to which the event refers.
182
183 **Object** does not need to be filled in, it is generated when downloading an Excel file to help in debugging (displays the path of the linked object).
184
185 **Tags **is a tag (parameter) Identifier to which the event refers.
186
187 **Formula** defines the condition under which the event is to be triggered. Description of formulas is given in the Appendix.
188
189 **Dead time, ms **is a field to enter the delay time, in milliseconds, for the event to be triggered.
190
191 **Event type code **is a code, which is entered according to the **Event type** directory using a separate tab in this file.
192
193 **Event type name **is a name of the event type, the field is filled in automatically when uploading-downloading the configuration file.
194
195 **Message **is a message text that should be displayed in the logs when the event is triggered.
196
197 **Acknowledgement **is responsible for the event acknowledgement. True - acknowledgement is enabled, False - acknowledgement is disabled.
198
199 **Sound ID **specifies an ID of a sound file loaded through the sound editor.
200
201 **Sound name **is a name of the sound file, the field is filled in automatically when loading-unloading the configuration file.
202
203 **Repeat count **is used to set the number of repetitions of sound playback when the event is triggered.
204
205 **Infinity repeat **is responsible for repeating the sound until the user acknowledges the event. True - infinite repetition is enabled, False - infinite repetition is disabled.
206
207 After all required fields are filled in, the file should be uploaded using the button [[image:Screenshot 2025-12-10 at 21.53.38.png||height="22" width="77"]] on the **Import/Export configuration file** page (see Fig. 2.9). In the window that appears (see Fig. 2.11), select the filled in events.xlsx file. The system will automatically validate the file to ensure it is correctly filled in and formatted (see Fig. 2.12).
208
209 [[image:Screenshot 2025-12-10 at 21.54.07.png||height="234" width="379"]]
210
211 Fig. 2.11 - Upload configuration file window
212
213 [[image:Screenshot 2025-12-10 at 21.54.41.png||height="413" width="477"]]
214
215 Fig. 2.12 - Validating the configuration file
216
217 If errors are detected, they will be displayed in the file upload window. After all errors are eliminated, the **Write configuration** button will become available.
218
219 After uploading the file, the configuration should be refreshed to apply the changes (see Fig. 2.7).
220
221 To make working with events more convenient, CENTO provides the option to edit the event configuration partially using Excel.
222
223 To do this, on the page /CENTO/web/ui/event_editor/index (menu item Settings > Events > Event editor (see Fig. 2.1 - Fig. 2.2), search for an events using the filtering [[image:Screenshot 2025-12-10 at 21.55.29.png||height="24" width="25"]], then click on the button [[image:Screenshot 2025-12-10 at 21.55.55.png||height="25" width="95"]]and select **Download** in the drop-down list. After that, the file events.xlsx will be downloaded to the PC, containing only the filtered events from the **Events editor**.
224
225 Actions when filling/editing the columns of the Excel table are similar to the actions during uploading from the** Import/Export configuration file** menu (see Fig. 2.9 - Fig. 2.10).
226
227 NOTE: when adding a new event, crossing **Event ID** is unacceptable as an incomplete event configuration is unloaded. The new **ID** should not match the existing one in the system (configuration).
228
229 To upload the changes made to the file, click on the button [[image:Screenshot 2025-12-10 at 21.55.55.png||height="25" width="95"]] select **Upload** from the drop-down list. Events that were not taken into account when downloading the Excel file will remain unchanged
230
231 IMPORTANT: partial upload/download is not compatible with previously downloaded Excel files. If an Excel file was downloaded using an earlier version of the service (prior to the introduction of the partial upload/download feature), it cannot be uploaded back - an error message saying "Version incompatibility" appears.
232
233 == 2.4. Flashing on the diagram ==
234
235 The flashing of an object on the diagram can be configured in the following ways:
236
237 **~1. Flashing by tag**
238
239 This method is relevant if the system does not have and does not plan to customize the information model.
240
241 To customize the flashing of a diagram object by tag:
242
243 A) Set up an event that will contain the formula, for example, connection loss (ti40027171 != 1) or restoration of connection (ti40027171 == 1) with the device (see Fig. 2.13). The formula can refer not only to the device status, any tags registered in the system can be applied here, in this example, the device status is used as a special case. For more details on the available formulas and expressions, please refer to the** Setup Manual. **
244
245 [[image:Screenshot 2025-12-10 at 21.58.43.png]]
246
247 Fig. 2.13 - Event for tag flashing
248
249 B) Create a calculated tag with the formula [devstatusNN], where NN is the device id (see Figure 2.14). The binding to devstatus is used for example. The tag to be used for the designated purpose may get the value from the real device or may be based on other tags.
250
251 [[image:Screenshot 2025-12-10 at 21.59.17.png]]
252
253 Fig. 2.14 - Calculated tag to create tag flashing on the diagram
254
255 C) Set up an object on the diagram, in the rules of which the calculated tag from point b will be applied (see Fig. 2.15).
256
257 [[image:Screenshot 2025-12-10 at 21.59.53.png]]
258
259 Figure 2.15 - Example rules with the tag created in step b.
260
261 D) After saving the diagram and updating the configuration, if the status of the NN device changes, the system will start it flashing on the diagram until acknowledged.
262
263 **2. Flashing by the information model object**
264
265 For this method to work, the information model should be configured, and the required information model object should be selected in the event setting (**Object** field). In this case, the diagram object should be active (see more details in the "Diagrams Development Manual") and bound to the information model object selected in the event.
266
267 Let us consider an example of this solution.
268
269 A) Create an event with the selected object of the information model in the **Object** field (see Fig. 2.15).[[image:Screenshot 2025-12-10 at 22.01.01.png]]
270
271 Fig. 2.15 - Creating an event with the information model object.
272
273 B) Create an active object on the diagram bound to the object of the information model, which was selected in the event settings (see Fig. 2.16).
274
275 [[image:Screenshot 2025-12-10 at 22.02.05.png]]
276
277 Fig. 2.16 - Creating a diagram object bound to the information model.
278
279 = 3. NOTIFICATIONS SETTINGS =
280
281 == 3.1. Creating and editing notifications ==
282
283 CENTO has the function to notify users about an event triggered via e-mail.
284
285 To configure notifications, go to the /CENTO/web/ui/notifications_configuration/index page (menu item Settings > Events > Notifications (see Fig. 2.1). The configuration of the mail server is described in the "Setup Manual, Mail servers".
286
287
288 [[image:Screenshot 2025-12-10 at 22.03.45.png]]
289
290 Fig. 3.1 - Notifications interface
291
292 In the interface presented, the user has the ability to:
293
294 ~1. Create notifications;
295
296 2. Edit notifications.
297
298 The notification table has the following columns.
299
300 1. **Name **is the name of the notification.
301 1. **Emails **are the e-mail addresses that have been configured to receive notifications.
302 1. **Dispatch period **is the time of the day allowed for sending notifications.
303 1. **Iteration period** is the minimum time interval between notifications, meaning notifications cannot be sent to the recipient more frequently than this set period.
304 1. **Operation threshold **is the number of event triggers required before a notification is sent.
305 1. **State **is on/off.
306 1. **Actions** are operations available to the user that can be performed in response to an event (edit [[image:Screenshot 2025-12-10 at 22.05.05.png||height="25" width="27"]], copy [[image:Screenshot 2025-12-10 at 22.05.32.png||height="26" width="26"]], delete [[image:Screenshot 2025-12-10 at 22.05.55.png||height="26" width="23"]]).
307
308 To create a new notification, click the button [[image:Screenshot 2025-12-10 at 22.06.27.png||height="33" width="151"]].
309
310 Only an authorized user with appropriate permissions can create and edit notifications.
311
312 The notifications creation is shown in Fig. 3.2.
313
314 [[image:Screenshot 2025-12-10 at 22.07.01.png]]
315
316 Fig. 3.2 - Notifications: creation page
317
318 To create a notification, fill in the following fields in the **Notification settings** tab:
319
320 **Name** is used to specify the name of the notification.
321
322 **State **is a switch that enables or disables the notification.
323
324 **Operation threshold **is the number of event triggers required before a notification is sent.
325
326 **Dispatch period** is the time of the day allowed for sending notifications.
327
328 **Iteration period** is the minimum time interval between notifications, meaning notifications cannot be sent to the recipient more frequently than this set period.
329
330 **Delay (s) **is** **set to accumulate events during the delay from the first event.
331
332 **Notification method:**
333
334 **E-mail server **is a mail server used for sending messages. Mail servers are configured in the Settings > Email servers menu (for details on configuring mail servers, refer to the "Setup Manual").
335
336 Recipients is a field for entering e-mail addresses of notification recipients.
337
338 [[image:Screenshot 2025-12-10 at 22.07.55.png]]
339
340 Fig. 3.3 - Event selection tab
341
342 In the "Event selection" tab (Fig. 3.3), tick the events required for notification in the left column and use the "Right" button [[image:Screenshot 2025-12-10 at 22.08.29.png||height="27" width="24"]]to move them to the right column. Unnecessary events can be moved from the right column using the "Left" button [[image:Screenshot 2025-12-10 at 22.08.55.png||height="28" width="25"]], having previously marked them with checkmarks.
343
344 After filling in all the fields, click the button [[image:Screenshot 2025-12-10 at 22.09.48.png||height="24" width="60"]] and update the configuration.
345
346 == 3.2. Notification operation ==
347
348 There are three types of filters in the notifications:
349
350 1. Operation threshold;
351 1. Iteration period;
352 1. Dispatch period.
353
354 When configured without restrictions, the notification comes whenever any of the configured events added to the notification are triggered.
355
356 **Operation threshold**
357
358 The notification is triggered when the total number of triggered events in the notification reaches the number the user set.
359
360 If the operation threshold is 0, the notification is generated immediately after any of the events in the notification are triggered, unless the Iteration period is set and the Dispatch period is allowed.
361
362 **Iteration period**
363
364 The iteration period report starts from the time when the last notification was triggered. The iteration period is set in days and hours.
365
366 If the iteration period is set to 0 days 0 hours, notifications will be generated and sent immediately if the conditions of other filters are met.
367
368 **Dispatch period**
369
370 If the dispatch period is set to 0:00 - 24:00, notifications can be sent at any time of the day.
371
372 If the dispatch period is set to a specific time, such as 8:00, notifications will be sent once a day at that time.
373
374 Currently, the dispatch period can only be set within a single day. For example, it is not possible to set a period from 20:00 to 6:00 of the next day.
375
376 [[image:Screenshot 2025-12-10 at 22.11.07.png]]
377
378 Fig.3.4 - Logic of settings operation when generating notifications
379
380 **Changing notification settings**
381
382 If you change the alert settings (name, addresses, mail servers, triggering limits, message set, etc.) at any time, the following will happen:
383
384 If the notification settings (name, recipients, email servers, operation limits, message set, etc.) are changed at any time, the following will occur:
385
386 The operation threshold is saved, but the notification will not be triggered until the next event in the notification if the operation threshold is reached.
387
388 The iteration period is reset.
389
390 **Examples of changing notification settings:**
391
392 1. The operation threshold limit was set to 5, and 3 events were triggered. After the user increases the threshold to 10, the notification will be triggered after 7 more events.
393 1. The operation threshold was set to 10, and 7 events were triggered. After the user reduces the operation threshold to 5, a notification will be sent after the next event, for a total of 8 triggered events.
394 1. The iteration period was set to 10 hours, and the first notification was sent 2 hours ago. Events are triggered periodically. If the notification settings are changed, the iteration period will be reset, and a notification will be sent the next time an event is triggered. The iteration period counter will start again.
395 1. The operation threshold was set to 10. There are 3 events in the notification. The 1st event triggered 2 times. Then the User deleted the first event from the notification. The triggering counter is not reset. When the triggering counter reaches the value of 10, the notification with 8 triggering messages will be sent. The first event (which was deleted) will not be included in the notification text.
396
397 **Examples of alert notification logic**
398
399 [[image:Screenshot 2025-12-10 at 22.12.07.png]]
400
401 Fig.3.5 - Notification with operation threshold
402
403 [[image:Screenshot 2025-12-10 at 22.12.39.png]]
404
405 Fig. 3.6 - Notification with dispatch period
406
407 [[image:Screenshot 2025-12-10 at 22.13.08.png]]
408
409 Fig. 3.7 - Notification with all restrictions
410
411 The types of sound notifications are configured on the /CENTO/web/ui/sound_editor/index page (Settings > Events > Sound editor (see Fig. 2.1)) (see Fig. 4.1).
412
413 [[image:Screenshot 2025-12-10 at 22.13.46.png]]
414
415 Fig. 4.1 - "Sound Editor" page
416
417 The **Sound editor** page shows a table with available sounds. The table contains the following columns:
418
419 **ID **is a unique digital identifier of the sound.
420
421 **Name** is the name of the sound.
422
423 **File name **is the name of the uploaded sound file.
424
425 **Uploaded **is the date when the sound was uploaded to the system.
426
427 **Actions **is used to manage sounds: edit sound, play sound file, and delete.
428
429 **Note: t**he sound editor allows only ".mp3" to be uploaded.
430
431 To create a new sound, click the button [[image:Screenshot 2025-12-10 at 22.14.32.png||height="25" width="110"]]. After that a pop-up window appears (see Fig. 4.2).
432
433 [[image:Screenshot 2025-12-10 at 22.15.12.png||height="242" width="376"]]
434
435 Fig. 4.2 - New sound upload window
436
437 In the window that appears, specify the name of the new sound, select a file from your computer or drag and drop the sound file into the special field. After clicking the button [[image:Screenshot 2025-12-10 at 22.15.48.png||height="22" width="43"]], the created sound will appear in the Sound Editor.
438
439 **Attention! **If CENTO is opened in multiple browser tabs, for example, with the sound editor in the first tab and the diagram in the second tab, the old sound will continue to play on the diagram tab after changing the sound in the sound editor. The new sound will only play on the diagram tab once the user interacts with the diagram page (e.g., by clicking a mouse button on the diagram tab).
440
441 = 5. EXAMPLES OF EVENT SETTING =
442
443 Let’s look at some examples of event settings using the web interface. All actions are performed on the event creation page, as described in section 2.1 of this manual.
444
445 Example No.1: Setting up an event on tag value change.
446
447 [[image:Screenshot 2025-12-10 at 22.17.31.png]]
448
449 Fig. 5.1 - Event setting on tag value change
450
451 Fig.5.1 shows that the event //Switch position f.1.1 (1QF1)// is configured with a one-position event type bound to the IM object and the device, from which the tag value changes come with the ID number 11013008. The text in the **Message** field will be written in the CENTO **Event logs,** which gets there when the tag value 11013008 is equal to 2, the formula //__ti11013008==__// 2 tells about it (formula operators are given in the Annex). This event will be configured with dead time 0 (there will be no delay in event generation), with acknowledgment and with playing the default sound, which will sound 5 times and then turn off.
452
453 Example No. 2: Setting up the event on device status change.
454
455 Let’s consider an example of configuring an event for changing the device status (see Fig. 5.2). The event is configured with a return. Fill all the necessary fields with information similar to the previous example. This event is divided into two notifications:
456
457 1. The event //Lost connection with the device Mikrotik SW1.2 switch //enters the event log under the condition described in the formula //(devstatus100== 3) AND (devprevstatus100 !=3)//, which indicates that the status of the device with ID100 came equal to 3 and the previous status does not equal 3. This event will be configured with dead time 3000 (delay on event generation will be equal to 3000 ms) as an alarm event with acknowledgment and with sound playing until the user acknowledges this notification.
458 1. The event //Restored connection with device Mikrotik SW1.2 switch //is logged in the event log under the condition described in the formula //(devstatus100== 1) AND (devprevstatus100 !=1)//, which indicates that the status of the device with ID100 came equal to 1 and the previous status is not equal to 1. This event will be configured as informative without acknowledgment and with a sound that will be played 3 times and then turned off.
459
460 [[image:Screenshot 2025-12-10 at 22.19.25.png]]
461
462 Fig. 5.2 - Setting up the event on device status change
463
464 ----
465
466 Annex: description of formula
467
468 Arithmetic operations, conditions, mathematical and special functions, etc., are allowed. Up to three levels of nested pre-calculated measurements are permitted.
469
470 Table A.1 - Variables in formulas
471
472 |(% style="width:404px" %)Variable|(% style="width:472px" %)Description
473 |(% style="width:404px" %)(((
474 [tiN],
475
476 where N is the sequence number of TI
477 )))|(% style="width:472px" %)Current value of tag with id N
478 |(% style="width:404px" %)(((
479 [prevN],
480
481 where N is the sequence number of TI
482 )))|(% style="width:472px" %)Previous value of the tag with id N
483 |(% style="width:404px" %)(((
484 [statusN],
485
486 where N is the sequence number of TI
487 )))|(% style="width:472px" %)Current status of tag with id N
488 |(% style="width:404px" %)(((
489 [prevstatusN],
490
491 where N is the sequence number of TI
492 )))|(% style="width:472px" %)Previous status of tag with id N
493 |(% style="width:404px" %)(((
494 [lasttimeN],
495
496 where N is the sequence number of TI
497 )))|(% style="width:472px" %)Current timestamp of the tag with id N
498 |(% style="width:404px" %)(((
499 [beforetimeN],
500
501 where N is the sequence number of TI
502 )))|(% style="width:472px" %)Previous timestamp of the tag with id N
503 |(% style="width:404px" %)(((
504 [devstatusN],
505
506 where N is the device number (ID)
507 )))|(% style="width:472px" %)Current status of the device (0 - disabled in configuration; 1 - normal; 2 - at least one TI has abnormal quality (out of limits or error in formula); 3 - device polling error (device unavailable); 4 - manual input in tags or channels of the device, 7 - waiting for data)
508 |(% style="width:404px" %)(((
509 [devprevstatusN] or
510
511 [prevdevstatusN]
512
513 where N is the device number (ID)
514 )))|(% style="width:472px" %)Previous device status (0-disabled in configuration; 1 - normal; 2 - at least one TI has abnormal quality (out of limits or formula error); 3 - device polling error (device unavailable); 4 - manual input in device tags or channels, 7 - waiting for data)
515 |(% style="width:404px" %)(((
516 [devlastdtN],
517
518 where N is the device number (ID)
519 )))|(% style="width:472px" %)The time when the latest device data was received
520 |(% style="width:404px" %)(((
521 [devpingtimeN],
522
523 where N is the device number (ID)
524 )))|(% style="width:472px" %)Response time (in ms) to the ping command of the device polled by ICMP
525 |(% style="width:404px" %)(((
526 [connectedN],
527
528 where N is the sequence number of TI
529 )))|(% style="width:472px" %)Connection with the device with id N restored
530 |(% style="width:404px" %)(((
531 [!connectedN],
532
533 where N is the sequence number of TI
534 )))|(% style="width:472px" %)Connection with the device with id N is lost
535
536 Table A.2 - Operators in formulas
537
538 |Operator|Description|Utilization|Result
539 |+|Adds up numbers or tag values|5 + 5|10
540 |-|Subtracts the first number or tag value from the second number or tag value|5 - 3|2
541 |*|Multiplies numbers or tag values|0.01 * [val]|0.01 * [val]
542 |/|Divides the first number or tag value by the second number or tag value|[val] / 1000|[val] / 1000
543 |%|Returns the remainder of the division|10 / 3|1
544 |=|Assigns a specific value to a tag|[ti123] = 5|5
545 |==|Returns true if the compared values are equal, and false if they are not equal|2 == 2|true
546 |<, >, <=, >=|Returns true if the arithmetic condition is met and false if it is not met|2 >= 3|false
547 |&&, &, &, &|Logical operator "and"| |
548 |~|~|, OR, or|Logical operator "or"| |
549
550
551
552