Default Events

Events are entities that appear when something happens in the surveillance system - namely, when the system or system component state changes. These changes can be set up to trigger certain actions so that system administrators and/or users can react to them in a timely fashion.

For each Macula server, there are a set of default events, which behave in an identical way on all servers and cannot be altered or deleted. These are:

  • Central Server Connected: the connection with central server has been restored; event is available for non-central servers

  • Central Server Disconnected: the connection with central server marked as unavailable because the timeout defined in the server settings has been reached; event is available for non-central servers

  • Disk Excluding: one of the storage locations has been marked as unusable and has been excluded from the recording configuration; event is available for every server

  • Failover Activating: a recording server has failed and has been automatically replaced by a failover node

  • Fallback Activating: main storage has failed, server has automatically switched to fallback storage; event is available for each server

  • Global Event: global (system-wide) event from one of the servers has been fired; event is available for all defined global events and on all servers with Macula Enterprise

  • Motion: motion has been detected; event is available for each channel

  • Motion Started: some motion has been detected (single motion event has occurred); event is available for each channel

  • Motion Stopped: no more motion is being detected; event is available for each channel

  • Recording Error: problem encountered while recording video data to the storage; event is available for each server and for each channel

  • Recording Recovered: server has recovered from the recording error; available for each channel

  • User Button Clicked: user button was pressed; event is available for all created user buttons

  • Video Lost: no video stream available for this specific channel for the defined amount of time, which is set in the channel settings; event is available for each channel

  • Video Restored: video stream connection re-established; event is available for each channel\

  • External Event: for each channel, three custom events are available (see details below)

Default events are available in the Event & Action Configurator and can be used in the same way as user-defined events, except for they cannot be edited. Events are arranged by sources. Typical event sources are: channels, channel groups, servers, user buttons, video walls, external services.

External Channel Events

External (custom) channel events are reserved for cases when you need Macula to react to an event originating in a third-party system not directly integrated with Macula. These events are triggered via HTTP API by sending a request to the system.

Event Sources

External events can originate from the following sources:

  • Channel

  • Channel group

  • Service

  • Service group

Regardless of which of these is selected as the source when configuring the rule, the actual event execution will always resolve to a specific channel defined by the external service. Macros and notifications will reflect the channel that triggered the event, not the group or service used in the rule configuration.

This expanded flexibility allows better organization of rules, especially in environments with multiple channels or services that should share the same external trigger behavior.

URL Syntax

Each of the three available events is predefined and triggered via the following endpoint structure:

/event/<resource_id>/external1/activate /event/<resource_id>/external2/activate /event/<resource_id>/external3/activate

where <resource_id> is the channel ID. You can look up the channel ID in Macula Console, in the resource table of the Channels tab, provided that your Macula Console settings have object IDs enabled. If they are not, enable Object IDs via main menu > Settings > General tab.

Example

For a channel with ID 742, assuming the server IP is 10.10.10.1 and the default HTTP port is 8080, the URLs will be:

http://10.10.10.1:8080/event/742/external1/activate http://10.10.10.1:8080/event/742/external2/activate http://10.10.10.1:8080/event/742/external3/activate

The authentication type should be digest, and the method must be GET, for example:

curl -v --digest -u admin:password http://10.10.10.1:8080/event/1257/external1/activate

In Macula Enterprise systems:

  • use the IP and port of the server, where the target channel is configured

  • if the main recording server has switched to failover, use the IP and port of the failover node (channel ID remains the same)

When triggering the event over the Internet, make sure that the HTTP port of the target Macula server is reachable (open on the firewall(s) and forwarded, if required).

Last updated