Versions Compared

Key

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

Script description


SEO Metadata
composedTitleAlarm Monitor — Script DSSL

Alarm Monitor - This script is a universal tool to inform a user about the events detected by Trassir. It can also perform simple actions such as: closing alarm outputs, sending opening signals to the Access Control, saving screenshots of events, sending notifications and screenshots to e-mail, Telegram (on server only), or in the Trassir interface

AlarmMonitor (Warning monitor)

This script is a universal tool to inform a user about the events detected by Trassir. It can also perform simple actions such as: closing alarm outputs, sending opening signals to the Access Control, saving screenshots of events, sending notifications and screenshots to e-mail, Telegram (on server only), SMS (http://smsc.ru/ service)

It should be also mentioned that the logic of the script is built "from the channel". Even such events as alarm input closing/opening are associated with certain channels.


Select the event types to react to and reaction types to these events in the script upper part. Some events and reactions require settings that can be configured in the sections below.

 

Event types to which the script can react:

  • Face recognition
  • Neurodetector events (an object appears in a zone, an object is in a zone for a specified period of time, line crossing)
  • Over temperature alarm (An event on a person's over temperature when using Trassir integrated thermal cameras)
  • Motion occurrence
  • Face recognition on image
  • SMART reaction on Hikvision events: border crossing alarm, zone intrusion alarm
  • Appearance (detection) of sound
  • Fire extinguishing
  • Appearance of an abandoned object
  • Sabotage
  • SIMT detector events
  • Alarm output opening / closing
  • Orion, Sigur security systems events
  • Events from the integration script with the VORON system
  • AutoUniversal script events
  • Gate Access Control events
  • Aruco code recognition events
  • Social distance detector events
  • Face mask detector events
  • PoseDetector events


Types of reactions upon the occurrence of the specified events:

  • Displaying channel on which the alarm event occurred in Trassir interface
  • Saving the event snapshot to the local drive
  • Sending alarm event description and snapshot to e-mail
  • Sending alarm event description and snapshot to Telegram (on server)
  • Sending screenshot to FTP
  • Sending SMS notification
  • Displaying text message with information on event
  • Calling a pop-up window with information about the event
  • Playing sound
  • Generating POS event
  • Generating alarm


Types of detection on TRASSIR cameras:

  • People detector
  • Area control
  • Face detector
  • Line crossing
  • Sabotage detector
  • Item abandoned alarm
  • Item missing alarm
  • Loitering
  • Speed detector
  • Entering the zone
  • Leaving the zone
  • Motorized vehicle detector
  • Non-motorized vehicle detector


Раскрыть
titleInstallation

Installation

Add script in Automation → Create new script... → Load example... → From file...

After the loading, press "Save. Run" and set up the script.


Раскрыть
titleSetting

Setting

Предупреждение

Please note that the object names must be unique.

Select the event types to react to and reaction types to these events in the script upper part. Some events and reactions require settings that can be configured in the sections below.

The “Optional setting” section lets you configure additional parameters.

Working servers.

These are the servers with the objects of which the script should work. These objects mostly include channels, as well as alarm inputs, outputs, zones, borders, etc.


Working channels.

Only those channels from which you need to monitor specified events. Works as filter. If a server is set, but no channels are specified, the script will react to the events from all channels of that server.


Shot time correction.

Sometimes it can be necessary to take a screenshot some time before the event occurs, for example during a "sabotage" event or upon motion detection. It should be understood that such screenshot can be made only from the archive record. Therefore, if the archive was not being recorded at the moment, a screenshot of the closest moment of the record will be obtained. That's why if you need to make a screenshot of the moment before the event this parameter is set with a minus sign.

Buffering time before saving a shot.

The “buffering time” parameter can help when the archive is being recorded in two streams. As a rule, a sub stream is recorded earlier, so that the screenshot is formed from the sub stream. In order to get a screenshot from the main stream, you should wait for the buffering time.

Online shot.

Select this item in order to save event screenshots when the archive is not recorded to the device disks.


Shots with figures.

You can save a shot with figures only if the archive is being recorded to the server disks. This option does not work when using online shot.


Shot storage time.

The script will save sreenshots to local catalog if the “Save screenshot in screenshot folder” parameter is selected in “Reactions for events” setting. If this parameter is greater than zero, the script will delete screenshots with a lifetime greater than the specified parameter.


Schedule for running the script.

An additional parameter. If a schedule is set, the script will work when the specified schedule is in the red zone.


Alarm input for running the script.

An additional parameter. Works as filter: in case an alarm input is selected, the script will perform reactions if the selected alarm input is closed/open.


Working with face recognition events

Script parameters configuration


Configure the following settings if you need the script to react to face recognition events:

Select “Face recognition alarms” in “Alarm types” section.


Specify  servers and channels from these servers in the “Optional settings” section. The script will process events only from these channels. The “Tracker / Face Recognizer” should be turned on on these channels.


Select server with the required persons folders (groups) in the “Face recognizer settings section.”


In case the script is running on a server that uses face synchronization with a central server, this window specifies the name of the central server.

When you enable the script, this server should be available, and the Script account should have rights to read central server setting, in order to get information about the folder names and their ids.


Additional information on face recognition script operation.

When using the synchronization of the face database from the central server it is necessary that the face database has been synchronized with the central server for correct script operation.


You can also set up script to react to several groups:

In case you want the script to work with persons from the root folder, you should specify one of the possible values: root, Root, ROOT.

When launching the script on server and choosing to send screenshot to Telegram or email, a photo from the database of the recognized person and the best track with the recognized face will be attached in addition to the screenshot itself.

Image RemovedImage Added

In order to ignore identical events for a period of time, you need to set a positive value of the ignore period in seconds in the same field. It works the following way: when recognizing a face from the database, the script remembers the time of the event, and if the event is repeated, i.e. the face is recognized repeatedly on the same channel within the specified time period, the event will be ignored.


Working with face recognition events

Setting up script for an object entering a zone events

There are three ways of operation.

Variant 1:

Check the "SIMT/Neuro detector alarm" flag and specify the names of the required zones in the "SIMT/Neuro detector settings" section in the "Entrance in zones alarm (\*simt, neuro) field. The advantage of this method is its simplicity, but there is no possibility to select the type of object (car, person, bicycle), or to set the number of objects.

When an object enters the zone, the script instantly causes a reaction.

It is possible to set the "Ignore identical events for a period" time. The events of one channel and one zone are considered identical.

Variant 2 – a, b:

Set the “Reactions on objects presence in neuro zones” flag for both a and b variants and configure required parameters in “Neuro detector settings” section.

 Variant 2-a

The instant response to the appearance of an object or several objects in the zone. The number and type of objects are set in the corresponding fields.

With these settings, the alarm will be triggered instantly as soon as 2 cars or 1 person are detected in the 'parking' area.

Variant 2-b. 

Reaction when the number of objects in the zone is exceeded for a long time.

Select “long-lasting” in the “The type of work for detection in zone” field. Set time of observation before the alarm and the percentage of successful detections. Select the detection zones, the confidence coefficient and the number of objects required to trigger the alarm.

The peculiarity of the script operation when using this method is that the script reacts when a specified number of objects is detected in a specified area within a specified time period. If the settings of the neural detector on the channel are set to counting objects only, then the period of object counting repetition should be half as long as the observation time before the alarm. I.e. there should be at least two detections during the observation period.

The successful detections percentage is the ratio of all detections over a period approximately equal to the observation time to the number of detections in which the number of observed objects is greater than or equal to the specified number.


Setting up the script for neurodetector border crossing events


Set the “Neuro border crossing” flag and configure the required settings in “SIMT/Neuro detector settings” section: select the object type for reaction and set the border names in “Borders for reaction” section.

You should also check the “Trace objects” box in the neurodetector settings on the selected channels and specify the border to monitor within any zone.

Operation with alarm input closing/opening events


The alarm input is an independent object.  The script lets you "manually" bind the alarm input to any available channel, and then upon the alarm input closing, the script interprets the event as if it came from the "bound" channel. Thus, it is possible to display several channels on the alarm screen when an alarm sensor closes/opens.


In case several associated channels are selected, the same amount of notifications will be sent via e-mail or Telegram upon one alarm input closing / opening.


Operation with motion appearance events


Set the “Motion detection alarm” flag and specify the required servers and channels. Make sure that the “Generate events when motion is detected” flag is set and the motion detector is enabled in the required channels settings. Pay attention that the event is generated when motion appears, the event occurs again on the channel when the state changes from "no motion" to "motion


Operation with module / script events


There is a number of scripts that generate events with which the AlarmMonitor can work.


These types of events include:


  • a person without mask (Face Mask Detector)
  • social distance violence (Social Distance Detector)
  • AutoUnversal events (AutoUniversal)
  • suspicious pose (Pose Detector)
  • a person without a harhat is detected (HardHat Detector)
  • a person not wearing a workwear is detected (Wear detector)


The scripts on the events of which the AlarmMonitor triggering is required should be properly configured.


Reactions for events

Раскрыть
titleReactions for events

Show channel with alarm


This reaction type is used to display channels on which the required event has already occurred.

This reaction type is used to display channels on which the required event has already occurred.

Specify the alarm template name in the “Alarm monitor” section. The template should be previously created. You can use any template layout since the script uses standard layouts, depending on the number of displaying channels. If you need the script to switch to a basic template after the alarm channels have been displayed,  specify the name of this template in the "Base template" field.

When you select "Open a moment in archive" action type after the event occurs, the archived video of the event moment opens after \~5 sec. This setting lets you display no more than one channel on the alarm monitor. If the video stream has not been recorded to the hard disk within 5 seconds, the playback does not start.

Alarm reset if no motion – when this parameter is selected, the alarm channel is displayed until the motion on it is stopped.

Alarm reset if another template choosing by user – when this parameter is selected, the alarm channel counter is disabled if the user switched to another template. In case some new alarm events occur, the corresponding alarm channels are added to the alarm template again.


Sending notifications/snapshots to e-mail

If you need to send a simple text notification to e-mail, select "Send a notification by e-mail". If you need such a notification with a screenshot attached, select "Send a screenshot by e-mail".

Specify the predefined sender and recipient accounts, separated by commas without spaces in the “E-mail settings” section.


Sending snapshots to Telegram

Specify Telegram Ids of all users you'd like to grant server access using the bot in the “Telegram” section.

In order to find out your id, send the command /tbot to @trassirbot and you will receive a message, containing your id:

This feature can be used on server only.


Specify the digital user id in the “Telegram” section. The id can be found out with the help of @userinfobot Telegram bot:

-add @userinfobot to your Telegram

-send /start

Sending SMS (work only on Russia)


The SMSC.RU service is used for SMS sending.

Register an account and get your login and password in order to use this feature.

Specify the number in 79991112233  format, login and password or MD5-hash of password in “SMS settings” section.


Operations with alarm outputs


It is possible to perform closing, opening or a sequence of these actions with the alarm outputs. You can specify several alarm outputs. The delay before the subsequent operations is the period of time between two consecutive actions, i.e. if close-open operation type is selected with 5 seconds delay, upon alarm event the alarm output will close and than open in 5 seconds.


Generating an alarm (incidents)


Specify the incident token in the “Send alarm by Token” field. If this field is not empty, an alarm (incident) is generated


Script log

In case the “log” option enabled, the script writes all the debugging information to the log file, which is located in the screenshots folder on the server/client and is duplicated in the Trassir server/client log, as well. If this feature is disabled, only the critical information is stored in Trassir log file. It should also be mentioned that when the log is enabled and the neurodetections are used, the log file can be large.


Download