Script actions
The following is a list of scripting actions that FortiCentral supports, in alphabetical order.
AlarmManagement
Displays the camera and optionally nearby cameras in specified view panes when an alarm is triggered.
This is useful to combine with the Event Manager trigger type, and an action that creates a prompt to dismiss the alarms. See DisplayClearAlarmInfoMessage. For a tutorial, see Script examples.
Alternatively, if you want to put a specific camera in a view pane—not only cameras that trigger alarms—then see PlaceCameraInPane.
AlarmManagement tries to place alarms intelligently. In small offices or simple window layouts, the placement is simple:
- Alarm video clips are put into an alarm type of view pane. If Cycling is Shift Alarms, then new alarms push older alarms over to the next alarm view pane.
- Nearby cameras (if any) are put into a scratch pad type of view pane.
However if your view panes occupy more than one space in the layout grid, then placement is more complex. For example, if you have a large view pane on the left side, and six smaller view panes on the right side, and you set:
- Orientation to Rows
- Ordering to Top Left — Bottom Right
then all of the view panes are used to display the alarm (in the large view pane) and five nearby cameras (in the smaller view panes). However if you set Ordering to Bottom Right — Top Left, then AlarmManagement assumes that you want the large pane to be shared with two different alarms.
|
Parameter |
Description |
|---|---|
|
Orientation |
Select the direction when placing the alarm and nearby cameras into view panes, either:
Together, Orientation and Ordering specify how to arrange items in the Target Area view panes. For example, you might have a 4-by-4 layout of view panes— alarms on the top (row 1), and scratch pads on the bottom (row 4). If you set Orientation to Columns and Ordering to Top Left – Bottom Right, then the script puts playback at the top and the live video below it and 2 nearby cameras (if they exist) below them. If you change Ordering to Bottom Right – Top Left, then the script puts the live video feed on top and the playback below it, and the alarms will start displaying from the right side instead of the left. Note: Alarms do not appear in scratch pad view panes (only alarm view panes), and nearby cameras do not appear in alarm view panes (only scratch pads). Therefore if you change the Orientation to Rows, the layout will not work well because row 3 and 4 do not have alarm view panes, and row 1 and 2 don't have scratch pads. |
| Target Area |
Either click the grid icon to select the window and view pane(s) that will display the item, or enter their identifiers in the text field. By default, the whole primary window (identifier Multiple windows can be selected ( If multiple actions of this type use the exact same view pane, then they try to share them. |
| Playback Offset |
Optional. Enter the amount of time in seconds before the alarm event. Video from the camera starts to play at this timestamp, instead of the timestamp when the event was detected. Note: Some camera models cannot display video if Playback Offset is more than 15 seconds previous. However loops still start at that timestamp when it plays, and simply includes the video when it becomes available. |
| Playback Length | Enter the amount of time in seconds. Video from the camera plays for this duration before looping. |
| Include Nearby Cameras |
Select either:
|
|
Ordering |
Select the order when placing the alarm and then nearby cameras into view panes, either:
|
ClearPaneSet
Empties the specified view panes.
|
Parameter |
Description |
|---|---|
|
Panes |
Select which view panes in which window to empty. |
| Types | Select which type(s) of view pane to empty. |
ControlAccess
Controls an ACS element.
This is often useful for doors, with either periodic or manual scripts that lock doors or require a card swipe after business hours.
|
Parameter |
Description |
|---|---|
|
ACS Device |
|
| State |
Select the status to set for the ACS device. Currently, ACS doors are supported, with these options:
|
|
Buzz Open Time |
Enter the amount of time in seconds for the door to be unlocked. If you set State to Buzz, then the door unlocks for a short time and then returns to Controlled. Buzz Open Time determines how long the door remains in the Buzz state. |
DisplayClearAlarmInfoMessage
Clears the alarm view panes that triggered the script. Also displays specified text in the Info Messages panel with a checkbox so that users can mark the message as confirmed. Confirmed messages are highlighted in green, and [CONFIRM] is added to the end of the message. Unconfirmed messages are highlighted in orange, and after 3 minutes, a clock timed-out icon appears next to the message.
This action is often put after an AlarmManagement action.
|
|
A maximum of one AlarmManagement action can be used in the same script with this action, and AlarmManagement must not have the parameter Cycling set to Shift Alarms. |
|
Parameter |
Description |
|---|---|
|
Message |
Enter the text of the message. |
DisplayInfoMessage
Displays specified text in the Info Messages panel.
|
Parameter |
Description |
|---|---|
|
Message |
Enter the text of the message. |
| Level |
Select the severity level of the message. If Confirmation is None, then the severity level determines the color of the text:
For more information on log severity levels, see the FortiRecorder Administration Guide. |
|
Confirmation |
Select either:
|
Goto3dMap
Displays a specified 3D map or a sector of it in the currently selected view pane.
Alternatively, see Place3dMapInPane.
|
Parameter |
Description |
|---|---|
|
Item |
Select the name of a 3D map, or a sector in the map. |
PlayAudio
Plays a sound.
|
Parameter |
Description |
|---|---|
|
Audio Name |
Select the name of a sound to play. |
|
Wait for Audio |
Select either:
|
Place3dMapInPane
Displays a specified 3D map or a sector of it in the specified view pane.
Alternatively, see Goto3dMap.
|
Parameter |
Description |
|---|---|
|
Item |
Select the name of a 3D map, or a sector in the map. |
|
Panes |
Either click the grid icon to select the window and view pane(s) that will display the item, or enter their identifiers in the text field. By default, the whole primary window (identifier Multiple windows can be selected ( If multiple actions of this type use the exact same view pane, then they try to share them. |
PlaceCameraInPane
Displays a specified camera and optionally nearby cameras in the specified view pane(s).
Alternatively, if you want to use the camera that has triggered an alarm, see AlarmManagement.
|
Parameter |
Description |
|---|---|
|
Item |
Select the name of a camera. |
|
Panes |
Either click the grid icon to select the window and view pane(s) that will display the item, or enter their identifiers in the text field. By default, the whole primary window (identifier Multiple windows can be selected ( If multiple actions of this type use the exact same view pane, then they try to share them. |
|
Include Nearby Cameras |
Select either:
|
PlaceMediaInPane
Displays a specified image or movie in a specified view pane.
|
Parameter |
Description |
|---|---|
|
Item |
Select the name of the image or movie. |
|
Panes |
Either click the grid icon to select the window and view pane(s) that will display the item, or enter their identifiers in the text field. By default, the whole primary window (identifier Multiple windows can be selected ( If multiple actions of this type use the exact same view pane, then they try to share them. |
PlaceSequencerInPanes
Puts a specified sequencer in the specified view pane(s).
|
Parameter |
Description |
|---|---|
|
Item |
Select the name of the sequencer. |
|
Panes |
Either click the grid icon to select the window and view pane(s) that will display the item, or enter their identifiers in the text field. By default, the whole primary window (identifier Multiple windows can be selected ( If multiple actions of this type use the exact same view pane, then they try to share them. |
|
Fill All Panes |
Select either:
|
PTZ_To_Preset
Tells a specific camera to go to a predefined PTZ setting.
|
Parameter |
Description |
|---|---|
|
PTZ Camera |
Select the name of the camera. |
|
Preset |
Enter either the name or index number of a PTZ preset. |
Wait
Wait for a specified amount of time before continuing with the next action in the script (if any).
This is often useful in making scripts for a PTZ tour with a Periodic trigger type.
|
|
Don't use a long wait time if the script type is Event Listener or Manual.Alarms can be triggered at short intervals, and users can quickly click the script's button repeatedly, too.Scripts cannot start while waiting, however. This causes error messages to appear in the in the Info Messages panel: |
|
Parameter |
Description |
|---|---|
|
Sleep time |
Enter the number of seconds to wait. |