Fortinet white logo
Fortinet white logo

User Guide

7.2.0

Script actions

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:

  • Columns: Placement is across the columns.
  • Rows: Placement is across the rows.

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

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:

  • True: In the remaining view panes (if any), put cameras (if any) that are near the specified camera.
  • False: Don't include nearby cameras.

Ordering

Select the order when placing the alarm and then nearby cameras into view panes, either:

  • Top Left — Bottom Right
  • Bottom Right — Top Left (reverse order)

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:

  • Open (not locked)
  • Controlled (locked, except when temporarily unlocked by another ACS device such as a keypad or card swipe)
  • Locked
  • Buzz (temporarily unlocked)

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.

Note

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:

  • Information: Text of the message is black.
  • Alert: Text of the message is red.
  • Error: Text of the message is red and bold font.

For more information on log severity levels, see the FortiRecorder Administration Guide.

Confirmation

Select either:

  • None : Users cannot confirm the message.
  • Checkbox: Include a checkbox next to the message 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, [EXPIRED] is added to the end of the message and a clock timed-out icon appears.

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:

  • True: Wait for the sound to finish before performing the next action in the script (if any).
  • False: Don't wait.

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

If multiple actions of this type use the exact same view pane, then they try to share them.

Include Nearby Cameras

Select either:

  • True: In the remaining view panes (if any), put cameras (if any) that are near the specified camera.
  • False: Don't include nearby cameras.

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

If multiple actions of this type use the exact same view pane, then they try to share them.

Fill All Panes

Select either:

  • True: In the remaining view panes (if any), fill in all panes instead of just one view pane.
  • False: Don't use all view panes.

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.

Note

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: Unable to start script <script-name> it is currently running.

Parameter

Description

Sleep time

Enter the number of seconds to wait.

Script actions

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:

  • Columns: Placement is across the columns.
  • Rows: Placement is across the rows.

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

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:

  • True: In the remaining view panes (if any), put cameras (if any) that are near the specified camera.
  • False: Don't include nearby cameras.

Ordering

Select the order when placing the alarm and then nearby cameras into view panes, either:

  • Top Left — Bottom Right
  • Bottom Right — Top Left (reverse order)

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:

  • Open (not locked)
  • Controlled (locked, except when temporarily unlocked by another ACS device such as a keypad or card swipe)
  • Locked
  • Buzz (temporarily unlocked)

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.

Note

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:

  • Information: Text of the message is black.
  • Alert: Text of the message is red.
  • Error: Text of the message is red and bold font.

For more information on log severity levels, see the FortiRecorder Administration Guide.

Confirmation

Select either:

  • None : Users cannot confirm the message.
  • Checkbox: Include a checkbox next to the message 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, [EXPIRED] is added to the end of the message and a clock timed-out icon appears.

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:

  • True: Wait for the sound to finish before performing the next action in the script (if any).
  • False: Don't wait.

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

If multiple actions of this type use the exact same view pane, then they try to share them.

Include Nearby Cameras

Select either:

  • True: In the remaining view panes (if any), put cameras (if any) that are near the specified camera.
  • False: Don't include nearby cameras.

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

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 W1 in the text field) is selected. This is indicated by all view panes in the window selection area being colored red. To deselect the window and select only specific panes, click the Clear button and then either click each pane (w1p1 for example). Alternatively, drag your mouse over an area of the view panes (w1p1:p4 for example) or click the icon for a type of view pane (Hotspot for example).

Multiple windows can be selected (w1p1,W2 for example). This can be useful if your computer is connected to both a desktop monitor (where the primary window is) and a monitor wall (where the secondary window is).

If multiple actions of this type use the exact same view pane, then they try to share them.

Fill All Panes

Select either:

  • True: In the remaining view panes (if any), fill in all panes instead of just one view pane.
  • False: Don't use all view panes.

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.

Note

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: Unable to start script <script-name> it is currently running.

Parameter

Description

Sleep time

Enter the number of seconds to wait.