How do I manage events generated by plugins?

Event management

A.I Tech plugins can notify each event to multiple listening recipients by enabling and configuring each receiver in the devoted tab in the event section.

NOTE: The device time must be configured correctly, otherwise the time associated with the notifications will be wrong.

Listening recipients can be divided as follows:

A.I. Tech products
Third party products
Standard protocols

A.I. Tech products


AI-DASH-Embedded

By sending the events to AI-Dash Embedded it is possible to store data generated from applications on the very same device where they are being run. In the edge version they can only be installed on Wisenet X cameras updated to the latest version of the firmware, available on Hanwha official website.

The notification of events to AI- Dash Embedded is enabled by ticking the checkbox “Enable AI-Dash Embedded” and by configuring the following parameters:

  1. AI-Dash embedded folder: select the folder where AI-Dash database is created.
  2. Maximum size: maximum size (in MB) that AI-Dash Embedded can occupy on the device.

/Embedded.png

Moreover, it is possible to send images to the server by ticking the checkbox “Send Images” and then configuring the following parameters: 1. #sec pre-event: number of seconds of images before the event 2. #sec post-event: number of seconds of images after the event

AI-DASH-PRO

To notify events to AI-Dash the following parameters have to be set:

/DashPro.png

  1. IP: type the IP address of the server where AI-Dash is installed (according to the owned version)
  2. Port: port on which AI-Dash listens
  3. AI-Dash ID: the code that identifies the server

Moreover it is possible to send images to the server by ticking the checkbox “Send Images” and then configuring the following parameters: 1. #sec pre-event: timespan in seconds of images before the event that have to be saved 2. #sec post-event: timespan in seconds of images before the event that have to be saved

Finally, it is possible to select “Backward compatibility with AI-Dash”; this option does not have enabled with AI-Dash PRO (this being the case, ask for specific documantation for protocol and event format).

WARNING!!! To receive event notification, you might have to disable the firewall.


Third party products


Digital Output

In the section Digital Output, by ticking the checkbox “Enable sending events” it is possible to enable event notification through Wisenet camera output port and AI-APPLIANCE by configuring the following parameters:

/Digitali.png

  1. Lenght of single impulse(ms): lenght in milliseconds of a single impulse
  2. Impulse interval(ms): the timespan in milliseconds between one impulse and the following one, when the number of impulses is higher than 1.
  3. Number of impulses: the number of impulses sent through the port alarm out
  4. Device: the device where the application runs
  5. Pin: type the desired pin code to use on the device
  6. Events Enabled: the type of sensor that can notify the event properly.

Arteco EVERYWHERE

In the section Sending event to Arteco EVERYWHERE, by ticking the checkbox “Enable sending events” it is possible to enable event notification to Arteco Everywhere by configuring the following parameters:

/Arteco.png

IP server: IP address of the server where Arteco Everywhere is installed, both in the server version and in the cloud version

  1. Port: port number where Arteco Everywhere is listening
  2. Username: username to connect to Arteco Everywhere
  3. Password: password to connect to Arteco Everywhere
  4. Output number: output number associated to the event
  5. Events Enabled: the type of sensor that can notify the event properly.

Arteco NEXT

In the section Sending event to Arteco NEXT, by ticking the checkbox “Enable sending events” it is possible to enable event notification to Arteco Next by configuring the following parameters:

/Next.png

  1. IP server: IP address of the server where Arteco Next is installed
  2. Port: port number where Arteco Next is listening
  3. Path: path to server Arteco Next to send events to
  4. Username: username to connect to Arteco Next
  5. Password: password to connect to Arteco Next
  6. Connector ID: identification of the connector defined in Arteco Next for sending event notifications
  7. Camera ID: Camera identifier defined in Arteco Next on which video analysis is enabled
  8. Description:information that will be displayed in Arteco Next related to the video analysis application.
  9. Events Enabled: the type of sensor that can notify the event properly.

Avigilon POS

In the section Avigilon, by ticking the checkbox “Enable sending events” it is possible to enable event notification to Avigilon POS by configuring the following parameters:

/Avigilon.png

  1. Port: port number where Arteco Next is listening
  2. Beginning event string: characters at the beginning of the event, to specify on Avigilon as well
  3. Ending event string : characters at the end of the event, to specify on Avigilon as well
  4. Events Enabled: the type of sensor that can notify the event properly.

SEETEC/QOGNIFY VMS CAYUGA

In the section Cayuga VMS, by checking the checkbox "Enable sending events" it is possible to activate the notification of events to the VMS by configuring the following parameters:

/Cayuga.png

  1. IP Server address: enter the IP address of the server on which Cayuga is installed
  2. TCP Port: destination TCP port
  3. Check Text: a text that Cayuga will use to filter the events to accept. On Cayuga you can configure the admission of an event only if it has been sent with a specific text. The check text also allows you to insert placeholders that will be dynamically replaced depending on the event that occurred:

    • %d: name of the device that generated the event
    • %e: name of the event
    • %s: name of the sensor that generated the event
    • %t: date of the event
    • %h: time of the event

Genetec Security Center

In the section Genetec, by ticking the checkbox “Genetec” it is possible to enable event notification to Genetec by configuring the following parameters:

/Genetec.png

  1. IP: IP address of the server where Genetec Security Center is installed
  2. Server Port: port number where Genetec Security Center is listening
  3. Username: username to authenticate on Genetec Security Center
  4. Password: password to authenticate on Genetec Security Center
  5. Camera ID: camera identifier defined in Genetec Security Center on which video analysis is enabled
  6. Event ID: unique ID identifying the event on Genetec
  7. Events Enabled: the type of sensor that can notify the event properly.

N.B.: The event enabled on Genetec and the sensor generating the event on the plugin must have the same ID.

Milestone

In the section Sending event to Milestone, by ticking the checkbox “Enable sending events” it is possible to enable event notification to Milestone by configuring the following parameters:

/Milestone.png

  1. IP server: IP address of the server where Milestone XProtect is installed, both in the server version and in the cloud version
  2. Server port: port number where Milestone XProtect® is listening
  3. Device IP: IP address of the device
  4. Timezone: timezone of Milestone XProtect® servers
  5. Events Enabled: the type of sensor that can notify the event properly.

Wavestore VMS

To send events to Wavestore, you need to select "Enable sending events" and configure the following parameters:

/Wavestore.png

  1. IP Server address: the IP address of the Wavestore server;
  2. TCP Port: the port on which the server is listening (default is 8601);
  3. User: username on Wavestore server;
  4. Password: Wavestore password;
  5. Camera ID: source ID of the camera registered on Wavestore;
  6. Message: the message you want to send and display on Wavestore. There are two ways to send this message:

    1. Simple text: send a simple text message with the ability to insert placeholders that will be dynamically replaced depending on the event that occurred:

      • %d: name of the device that generated the event
      • %e: name of the event
      • %s: name of the sensor that generated the event
      • %t: date of the event
      • %h: time of the event
    2. XML format: sending the message text in XML format is useful for saving the Metadata relating to the events that are sent to Wavestore. To do this you must first configure some parameters on Wavestore.

Wisenet WAVE VMS

To notify events to Wisenet WAVE select “Enable sending events” and configure the following parameters:

/Wave.png

  1. IP: IP address of the Wisenet WAVE VMS;
  2. Port: port number of the Wisenet WAVE VMS;
  3. Username: username to authenticate the Wisenet WAVE VMS;
  4. Password: password to authenticate to the Wisenet WAVE VMS;
  5. Utilizza HTTPS: : if checked, sends through HTTPS;
  6. Events enabled: the type of sensor that can properly notify the event to Wisenet WAVE VMS;

Hanwha SSM

Events sent to Wisenet SSM will be received as external events.

In Wisenet SSM it is necessary to make the following configurations:

  1. In “Device” -> “External device”, create a new device and add a camera to it

    /ssm_1

  2. In “Design” -> “Site”, add the newly created external device to a site

    /ssm_2

  3. In “Event” -> “Management”, add the external events you want to receive to the Alarm Inputs. The SSM external event key must match the event type name of A.I. Tech. The list of events generated by our applications is available at this link

    /ssm_3

In the application configurator it is necessary to check the checkbox “Enable sending events” and configure the following parameters:

Hanwha SSM
Events enabled
  • IP: IP address of the server on which Wisenet SSM is installed
  • Port: port of the server on which Wisenet SSM is listening
  • Device GUID: device identification, must match the External GUID of the external camera created on Wisenet SSM
  • Server Timezone: time zone of the Wisenet SSM server
  • Events enabled: types of events to be sent to Wisenet SSM

Standard protocols


Digital Input

The platform AI-Appliance is enabled to read digital inputs (as such, all of the applications installed on this platform can read digital inputs as well). In the section Digital Input by ticking the related checkbox it is possible to use digital inputs to enable or disable event notification (e.g.:setting an anti-theft alarm) To manage properly digital inputs reading, tick the checkbox "Enable digital input reading" and configure the following parameters:

/InDigitale.png

  1. Events initially enabled: if enabled, the processing is initially enabled and with digital inputs is inhibited. Otherwise, the processing is initially inhibited and will be enabled with digital inputs.
  2. Update period (ms): timespan in milliseconds when the input is being read
  3. Type of input: suggests possible values that are:

    • Levels : an input by levels enables/disables the notification of events until the input signal is high
    • Impulsive: an impulsive input enables/disables the sending of events on the rising edge. In both cases the timespan when the signal is high has to be at least twice the update period.
  4. Device: the device where the application runs
  5. Pin: the chosen input port to use on the device

Input by web request

Every application can enable event notification via web on every platform. By ticking the corresponding checkbox it is possible to enable or disable event notification through asynchronous HTTP requests (CGI). For instance, an event occurring on any given plugin that is being processed on a camera can activate or deactivate a plugin installed on the current camera. To manage properly the input through web it is required to tick the checkbox “Use event activation/deactivation via web request” and configure the following parameters:

/Web.png

  1. Password: it has to be provided to external agents to allow event management, it is required to avoid deceitful enabling/disabling
  2. Events initially enabled: if this checkbox is ticked, events are initially enabled and in presence of web inputs are inhibited. Otherwise, the processing is initially inhibited and will be enabled in presence of web inputs
  3. Behaviour:

    • Timed: the input enables or disables the sending of events for a certain time frame set by the user
    • On/Off: the input enables and disables the sending of events on the rising edge
  4. Switch duration (ms): if timed behaviour is chosen, it specifies the duration of the switch

For more informations refer to this LINK.

Sending event to E-mail

In the section Sending event to E-mail, by ticking the checkbox “Enable sending events” it is possible to enable event notification by Email by configuring the following parameters:

/Email.png

  1. Sender: e-mail address of the sender
  2. Username: username of the sender
  3. Password: password of the sender
  4. SMTP Server: address of the SMTP mail server (aitech.vision, gmail, ecc.)
  5. SMTP Port: number of the SMTP email server port
  6. Recipients : enter the email address of the recipient; multiple email addresses should be separated by a semicolon
  7. #sec pre-event: timespan in seconds of images before the event that have to be saved
  8. #sec post-event: timespan in seconds of images after the event that have to be saved
  9. Events Enabled: the type of sensor that can notify the event properly.

N.B. The notification of events through email is not supported for periodic events.

Text Sender

In the section Text Sender Configuration, tick the checkbox “Enable sending events” and configure the following parameters:

/Text.png

  1. IP: IP address of the server
  2. Port: port number on which the server is listening
  3. Path: path for the POST to the receiving server
  4. MIME Type: MIME Type with which the message will be transmitted
  5. HTTP Method: method used for the request
  6. Type of expected answer: “Accept” header to sent in order to receive a specific answer to show in the log
  7. Charset: with whom you will be marked in the message
  8. Message Format: format of the message sent to the server To dynamically add informations related to the event, add the following tags in the message:

    • %e for event name
    • %d for device name
    • %s for sensor name
    • %t for GG/MM/AAAA date.

N.B. The notification of events through Text Sender is not supported for periodic events.

HTTP request sequence

A.I. Tech plugins also allow to send sequences of HTTP requests, interspersed with a configurable time interval. For instance, you may think to move a PTZ camera on different presets and than bring it back to home position after a certain amount of time. It is possible to configure an unlimited number of requests in the sequence.

To enable this mechanism, select “Enable sending of events” and configure the following parameters:

/Sequenza.png

  1. Suspend elaboration during sequence: if enabled, suspends the elaboration of images during the sequence
  2. HTTP/HTTPS URI: URI of the request
  3. Time before next item (s): time interval in seconds to call the next request in the sequence
  4. Events Enabled: the type of sensor that can notify the event properly.

HTTP I/O

In the section HTTP I/O, by ticking the checkbox “Enable sending events” it is possible to enable event notification through generic I/O by configuring the following parameters:

/HTTP.png

  1. IP: IP address of the remote I / O;
  2. Port: port where is listening the remote I / O;
  3. Path: path of the remote I/O
  4. Username: the username to connect to remote I/O;
  5. Password: password to connect to remote I/O;
  6. Parameters: query string with all required parameters. To dynamically add informations related to the event, add the following tags in the message:

    • %e for event name
    • %d for device name
    • %s for sensor name
    • %t for GG/MM/AAAA date.
  7. Use HTTPS: if enabled, sends through HTTPS
  8. Events Enabled: the type of sensor that can notify the event;

Remote Server

In the section Remote Server, by ticking the checkbox “Enable sending events” it is possible to enable event notification to external servers by configuring the following parameters:

/Remoto.png

  1. IP: address of the remote server
  2. Port: port where the server is listening
  3. Path: POST Path to the receiving server
  4. AI-Dash ID: ID identifying AI-DASH
  5. Send Images: sends images to the server; the following parameters have to be configured:

    • sec pre-event: timespan in seconds of images before the event that have to be saved
    • sec post-event: timespan in seconds of images after the event that have to be saved
  6. AI-DASH Support (not with PRO version): enables sending of events compatible with AI-Dash but not with AI-Dash PRO (ask for specific documentation for protocol and event format)
  7. Events Enabled: the type of sensor that can notify the event properly.

Sending to FTP server

In the section Sending to FTP server, by ticking the checkbox “Enable sending events” it is possible to enable event notification to an FTP server by configuring the following parameters:

/Ftp.png

  1. File name prefix: first part of the filename transmitted through FTP
  2. IP: IP address of the FTP server
  3. Port: port number of the FTP server
  4. Username: username to authenticate to the FTP server
  5. Password: password to authenticate to the FTP server
  6. Path of destination: path to transfer files to server FTP (defined from the root folder)
  7. Send Images: sends image associated to the event
  8. Events Enabled: the type of sensor that can notify the event properly

The format of the events is described HERE.

N.B.: Sending events through FTP does not support Heatmap and Background events. Thus, you will not find this section in the AI-Heat application configurator and of every bundle that provides the heatmap.

Modbus/TCP

For sending events to a Modbus/TCP device you must check the checkbox “Enable sending events” and then configure the following parameters:

/Modbus.png

  1. IP address: IP address of the destination
  2. TCP port: TCP port of the destination
  3. Unit Identifier: The unit identifier identifies the server in a Modbus Serial Line subnetwork. It is suggested to use the default value (255), if the server is not located in a Modbus Serial Line subnetwork (for example if it is located is a TCP/IP network, the IP address is sufficient to idenfity the server)
  4. Operating mode: Selecting “Constant”, you specify an activation logic with a constant signal; otherwise, you specify an impulsive activation logic.
  5. Positive Logic: If Positive logic is selected, in case of event the destination port is enabled; otherwise, it is disabled.
  6. Destination port: Destination port where the signal is sent.
  7. Pulse duration: Pulse duration, in milliseconds
  8. Inter pulse time: Time, in milliseconds, between two consecutive pulses
  9. Number of pulses: Number of pulses in the waveform generated by the event

MQTT

For sending events to a MQTT broker you must check the checkbox “Enable sending events” and then configure the following parameters:

/MQTT.png

  1. Broker IP: IP address of the broker
  2. TCP port: TCP port of the broker
  3. Username: Username of the publisher
  4. Password: Password of the publisher
  5. QoS: Quality of Service. 0: At most once; 1: At least once
  6. Topic: Topic where the messages are sent
  7. KeepAlive: KeepAlive time, in seconds. The connection is closed if, from the moment the last message was sent, the keepalive time is elapsed
  8. Client ID: Client Identifier
  9. Will Message: Message published by the Broker after the Connection is closed in cases where the Network Connection is not closed normally
  10. Secure Flag: Enable the secure exchange. Not yet available
  11. Retain Flag: If true, the broker stores the last retained message and the corresponding QoS for that topic
  12. Connection attempts: Number of connection attempts performed by the publisher
  13. Connection attempt waiting time: Time, in seconds, between two consecutive attempts