Counters, Indicators and Variables

Apart from actions, events and rules, the Event & Action section of Macula Console contains additional resources, which can be used for building even more versatile automated scenarios.

Software Counters

Software counters are entities that can contain a certain integer value, which can be altered based on some occurred event. These can be used in Macula, for example, to count events that do not originate from VCA and therefore cannot be accounted for using VCA counters.

Counters can be created in the Events & Actions section of Macula Console, under the Counters subsection. Each one has a title and a server where it resides (as the Event & Action scenarios are defined per server; use global events to transfer events from one server to another - for Macula Enterprise installations).

Reports can be then built based on the software counter values, along with VCA counters: automatic reports are available for configuration in Macula Console, and manual reports can be created in the Macula Monitor application. Both modes also permit report export in PDF format.

Add and Remove Counters

To add, remove and manage the software counters in the Macula Console, go to the Events & Actions section of Macula Console and choose Conditions from the menu on the left. Click the + New counter button on the upper panel to bring up the counter configuration dialog box. Here you have to:

  • The Title field: Provide a meaningful name to your counter

  • The Server field: counters are non-global entities, so select the server you wish the counter being attached

  • The Reset Value field: You can input here the initial value for the counter after reset

  • The Value Limit field: You can limit counter value with this field

  • The Enable Auto Reset checkbox: By marking this checkbox, you enable automatic counter reset when it reaches the value from the Value Limit field

In the Permissions tab, you can grant access to this counter's data to individual users and user groups. Anyone with the rights to access archived VCA metadata for the target counter will have it in the Macula Monitor application in the Reports section. If the Access archived VCA metadata permission has been granted for the whole server, the target user or user group will have access to all counters on that server, regardless of the individual counter permissions.

When you have finished, click OK to save and close the dialog box; the newly created counter will appear in the item list and will become available in the Event & Action Configurator. You can create any number of software counters.

Use the buttons on the upper panel to edit and remove the counters; the filters on the bottom panel will help you load recently added or recently edited items.

How to Change Counter Values

Counter values can be changed based on any event in the Event & Action scenarios, when building rules. Counter value changes can be a separate action or an additional one to serve for counting the number of times when the rule was triggered.

There are three built-in actions that are available by default for any created counter:

  • Increment: increase counter value by one

  • Decrement: decrease counter value by one

  • Reset: set the counter state back to zero

The initial value of any counter is zero.

Manage Counter Data

Internal Macula counters can be removed at will at any point: select all redundant counters and click the Recycle bin button on the upper panel.

However, only software (user-created) counters can be deleted in this way. Counters originating from VCA cannot be deleted in this way, as they exist in the VCA configuration (either camera-side or server-side video analytics). Those entities do not even appear in the list in the Counters section. To view them, press the Manage data button on the upper panel: an additional dialog box will pop up, displaying all counters, both user-defined and VCA imported.

Here, you will see all counters with some value, including those, which have been removed from VCA configuration and are therefore out-of-date. Select the unnecessary items and press Delete data above: all information about the target counter will be then removed from the database:

  • for software counters, this means that only the past counter values are wiped out; the counter itself stays in the list (you can remove it from the list as described above)

  • for VCA counters, the counter itself is deleted from the database, too (but not from the VCA configuration)

Removing the software counter's data reset it to zero.

Removing VCA counter's data will reset only counter state on the server. Camera counter's value will not be reset!

If there are no new incoming data for the removed counter, it will disappear from Reports shortly - both in Macula Console and Macula Monitor. If it still exists and Macula continues receiving data from the target counter, it will re-appear in this list automatically. So, in other words, the Manage data dialog box reflects the current state of the counter's database.

Usage Example

Consider a use case where it is required to count how many times during the day the office door was unlocked; the door is opened by an access control module, which is also wired to the digital input of a camera so that the system is notified when the door is unlocked.

Required E&A items in this case are:

  • Event 1: Digital Input, source: corridor camera

  • Event 2: Scheduled event, type: scheduled, every day 12:00AM

  • Counters: HowManyTimesDoorWasOpened

  • Action 1: Increment, target: counter HowManyTimesDoorWasOpened

  • Action 2: Reset, target: counter HowManyTimesDoorWasOpened

Events 1&2 are not default and should be made, and the counter has to be created as well. Actions associated with the counter will be added automatically so there is no need to create these.

The final set of rules for this scenario looks as follows:

  • Rule 1: Event 1 triggers Action 1

  • Rule 2: Event 2 triggers Action 2

Thus, every time the door is opened, this event is accounted for by the software counter; the counter is reset based on schedule every midnight. Using the counter data, it is possible to build a report and see, for example, most and least popular times, the average number per week etc.

Indicators

Indicators are objects with several states. These states (conditions) can be changed based on any events in the Event&Action Configurator. Indicators can be placed on maps, thus helping you build an interactive dashboard.

You can create indicators in the Events & Actions section of Macula Console, under Indicators, then place them onto maps - either regular or geo maps. The indicator state and color can be then changed based on E&A events: once you create an indicator, it is automatically added to the Actions section of the E&A Configurator and actions for changing its state are created.

Create and Manage Indicators

To add, remove and manage the indicators in the Macula Console, go to the Events & Actions section of Macula Console and choose Indicators from the menu on the left. Click the + New indicator button on the upper panel to bring up the counter configuration dialog box.

The following settings are available here:

  • Title: user-defined name

  • Server: Macula server, to which the indicator belongs (related actions will be only available in the target server E&A Configurator)

  • Save state: Save indicator states after server restart

  • States: 5 different indicator conditions with custom names and colors

When adjusting the state details, do not forget to hit the Apply button for the changes to take effect.

Change Indicator State

The indicator state can be changed based on any event in the Event & Action scenarios, when creating rules. The indicator state can be changed as a separate action, or it can be combined with any other one, thus helping visualize the state of other items.

There are five built-in actions for every indicator that allow to set the indicator to any of its states. If you only need two or three, simply do not trigger other conditions. The actions will appear automatically after you create the indicator.

Maps

When placed onto maps, indicators change their color and display the comment according to their state. Both regular and geographic maps have an indicator marker available on the panel above the map, alongside with other markers. Thus, you can build interactive panels that will reflect the condition of the system.

Usage examples

Depending on your needs, indicators can help in many different scenarios.

Use case #1: external sensors are sending temperature data. Based on the value, the indicator state is set to very low / low / normal / high / very high.

Use case #2: conditions are used throughout the system for door status (open/locked). The indicator is used to visualize the condition state (in this case, only 2 out of 5 states are involved).

Variables

Variables in Macula are entities having a certain value that changes over time. Create variables if you wish to set up reactions (via E&A) to certain variable values, e.g., certain temperature readings from thermal cameras.

To access the variables management in Macula Console, choose the Events & Actions section and switch to Variables in the menu on the left.

Variables differ by source. Currently, there are two groups of sources: devices (IP cameras or other) and data sources.

Channel Variables

Some device integrations support receiving certain variable values from cameras. For example, some thermal devices send the temperature measurements as floating-point numbers. In order to "catch" the data on the server side, simply create variables for these cases. Afterwards, you will be able to use these variables in events: for example, trigger events if the value is greater or less than certain threshold.

To create a new item, click the + New channel variable button on the upper panel. In the dialog box, choose the source channel and fill in the settings.

  • Title: user-defined variable name

  • Channel: source channel (device integration must be supporting variables, please contact support@gsfcorp.com for details)

  • Variable: choose one from the list of available items (if none are available, the device has none or the integration does not support variables)

  • Variable type: variable data type

For most variables, the data type is fixed, so you only need to choose the variable source and give it a name.

Click OK when done; the newly created variable will be appended to the list.

After you have added the channel variable, use the Variable value event to define the value range you want to trigger the event-action rules.

Data Source Variables

Data source variables are based on the pre-defined data source mappings. First, create some regex mappings for your data sources as described in the corresponding section of this document. Then, create a data source variable in the Variables subsection by clicking the drop-down arrow un the upper panel and selecting the + New data source variable option.

The following settings are to be defined:

  • Title: user-defined variable name

  • Data source: choose one of your existing (pre-configured) data sources

  • Variable: choose one of the pre-configured mappings

  • Variable type: choose the data type of the selected variable (for further comparison in events)

  • Data ID: enter your POS identifier in case the data source delivers data from multiple terminals or other sources

The Data ID field is optional and is only required if your data source has combined streams from multiple sources. If there is only one data stream, leave the Data ID field empty.

Click OK when done; the newly created variable will be appended to the list.

After you have added the data source variable, use the Variable value event to define the value range you want to trigger the event-action rules.

Last updated