PDK & DW Spectrum Integration Documentation
Using Event Rules
When the DW event engine is used, many interesting things can be done in response to access control events.
As an example: To trigger a bookmark in the timeline if the value of the source is "Front Door", you can put "Front", "Door", "Front D", etc. in the Source contains filter to match on it (the single word "Door" will get all events with the word "Door" in source). Most of the time the full name of the door is used in this field.
The caption filter is used to choose which access control events trigger the creation of a bookmark. Leave this blank if all events from the pdk io system should execute the rule action.
If you only want to trigger an action on an Allow event, the appropriate caption value is
door.request.allowed
Put that full value in the Caption contains field.
If you want to trigger an action any time an access is attempted, whether that attempt succeeds or fails, you can put a partial value such as
door.access
in the Caption contains a field to capture all events that start with that.
Using the Event Rules List
There are several ways to open the Event Rules dialog.
- Use the Event Rules icon in the Notification Panel (shortcut Ctrl+E).
- Open System Administration (shortcut Ctrl+Alt+A) > General tab and click the Event Rules button.
- Use the device context menu and select Device Rules to list the rules that apply to that specific device.
- Click the Device Rules button in the Device Settings dialog.
Each row in the Event Rules list is a rule.
Invalid Rules
If a rule is not configured correctly, it will have a red background indicating it is invalid.
A small dot in the left-most # column indicates that an event has unsaved changes.
Filtering and Sorting the Event Rule List
You can click each of the column headers to sort rules in ascending or descending order by the values in that column.
The Filter field applies to devices (Source column) only. Filter results refresh as characters are entered and will include rules that apply to multiple devices if any one of the devices matches the criteria.
Rules that apply to <Any Device> will never be filtered out. To disable filtering, clear the field.
Editing Rules from the List
The Event Rules list provides basic editing functions. A click on any parameter in the list opens a pull-down menu where you can edit the parameter value for the selected rule. A right-click on any parameter opens a context menu where you can add a New rule, Delete the selected rule, or set a Schedule for the selected rule.
Editing Rules from the Advanced Settings Form
You can also configure rule parameters using the Advanced Settings form on the lower half of the dialog.
Using the Event Rules Form
The form opens in the lower half of the Event Rules dialog when you select a rule in the list or when you click the Add button. Often it includes parameters that are not available in the Event Rules list.
Adding an Event Rule from the Form
- Click the Add button (or right-click an existing rule in the list and click New in the context menu). The form will open and a new line for the rule is added to the list.
- Select the Event to be monitored and the Action to execute when that event occurs. Each requires one or more of these parameters:
For Events
When – Click on this field in the form (or the Event field in the list) to select from the menu of events.
Starts or Stops – Events that can occur continuously, such as a motion on a camera, require a state definition of either Starts or Stops.
Device(s) – Click on the at field in the form (or double-click the Source field in the list) to select one or more devices.
For Actions
Do – Click on this field in the form (or the Action field in the list) to select from a menu of Actions.
Device(s) – Click on the at field (or the Target field in the list) to select one or more devices that will execute the action. At least one device must be selected for a rule to be valid.
User(s) – Click on the To field in the form (or the Target field in the list) to select one or more user roles as the recipient of the action. At least one user must be selected for a rule to be valid.
Schedule – Click this button to open a calendar for "Setting up Schedule for Tracking Events".
Comments – Enter any desired remarks.
Interval of action and Fixed duration – Check this option to specify how long an action will last, typically in response to a continuous event. Enter the duration, in seconds; zero is not a valid entry, and depending on the action there may be an upper limit to the duration.
- Click Apply to accept changes and keep the dialog open. Click OK.
NOTE: If one or more rules are not correctly defined, you will get the error message: Some rules are not valid. Disable them?
Click Yes to disable the invalid rules. Invalid rules will remain in the list but their On checkbox will not be checked.
Click No to allow invalid rules to be active. The On checkbox will be checked and the rule will be highlighted in red.
- In the Event Rule list, set or clear the On checkbox to enable or disable the rule.
IMPORTANT: Make sure notification for the event type is turned on in Global Notifications.
Selection Lists in Event Rules
Event rules use selection lists to choose devices and users. Selection and filtering behavior, described in the next topic, is consistent in both.
Continuous or Instant Events
Some events may be continuous, some can only be instant, and some may be either (generic or analytics events).
Continuous – Events that can occur continuously, such as motion on a camera, require a State definition of either Starts or Stops.
Instant – These are events that occur instantly, without duration, such as a device being disconnected or a server starting. For Generic and Analytics events, instant events are labeled Occurs.
Instant, Interval, or Fixed Duration Actions
The following parameters are available for most Actions, depending on their intended behavior.
Interval of action – Check this option to limit the frequency with which an Action will occur in response to an Event. Enter an integer value (1 - 999) in the No more than once per field, and select a corresponding time increment (sec, min, hrs, days). This feature is useful, for example, with an action such as show notification where the triggering event may be continuous but it is only necessary to be notified periodically.
Instant – Uncheck this option so the Action will execute every time the Event occurs.
Fixed duration – Check this option to specify how long an Action will last, typically in response to a continuous Event. Enter the duration, in seconds; zero (0) is not a valid entry. Depending on the Action, there may be an upper limit to the duration.