Purpose #
Surveillance Station can integrate with third-party systems, such as alarm and access control systems, through webhooks to obtain event data. Event information from external sources can be sent into Surveillance Station and used in the following actions1:
- Display event information in real-time on the Monitor Center
- Save event information and play back the corresponding recordings
- Send alerts to the Monitor Center
This article is a guide on configuring action rules with webhooks to receive data from third-party systems.
Environment #
- Surveillance Station 9.1.4 or above
Contents #
Resolution #
A webhook URL must be properly configured to add a bookmark or display an alert in Monitor Center when a webhook event is triggered.
A. Configure a webhook URL #
- Go to Action Rule and click Add.
- In the Information page, select Triggered as the Rule type.
- In the Event page, select Webhook as the Event source to create a webhook URL.2
- Specify a unique token for this webhook event. You can use the auto-generated token or customize your own. To establish a proper connection between third-party systems and Surveillance Station, the tokens must match.
- Choose a trigger type between One time and Interval. Click Advanced Webhook Ingredients button to add optional ingredients such as the
text1
,text2
,text3
andtime
.- One time:
Send the webhook URL when the event occurs.
For example:https://{NAS_IP:PORT}/webapi/entry.cgi?api=SYNO.SurveillanceStation.Webhook&method="Incoming"&version=1&token="UserDefinedToken"&text1="Access control event"&text2="Device 01"&text3="John Doe unlocked the door"&time=1970-01-01T00:00:00
- Interval:
Send the webhook URL with the ingredient status (status=”active” when the event starts and status=”inactive” when the event ends).3,4
For example:- When the status is active:
https://{NAS_IP:PORT}/webapi/entry.cgi?api=SYNO.SurveillanceStation.Webhook&method="Incoming"&version=1&token="UserDefinedToken"&status="active"&text1="Access control event"&text2="Device 01"&text3="John Doe unlocked the door"&time=1970-01-01T00:00:00
- When the status is inactive:
https://{NAS_IP:PORT}/webapi/entry.cgi?api=SYNO.SurveillanceStation.Webhook&method="Incoming"&version=1&token="UserDefinedToken"&status="inactive"
- When the status is active:
- One time:
- Click Next and quickly pair the Add a bookmark or Trigger an alert actions with the webhook event.
- Customize the Add bookmark or Trigger webhook alert in Monitor Center actions in the Action page if they were added in the last step.
- Click on the Add button to add more actions if desired.
- In the Schedule page, you can customize when the action rule should be active.
B. Configure action to add a bookmark and display the event information on Monitor Center #
After creating a webhook URL, you have the option of pairing an add bookmark action with the webhook event. This action can be customized in the following ways:
-
- Device: Select a camera to pair with the event.
- Duration: Specify bookmark duration in seconds. If the webhook trigger type is set as “interval”, the bookmark duration will be determined by the event time.
- Name: The action rule name is used by default. You can customize the name by clicking on the Add Ingredient button to add specific information sent via webhook ingredients, such as the webhook
text1
,text2
, andtext3
. - Description: Customize a text description for the bookmark. You can click the Add Ingredient button to add specific information sent via webhook ingredients such as the action rule name, webhook
text1
,text2
, andtext3
. - Additional options:
- Enable Display bookmark information on Monitor Center channels to show the information in real time in Monitor Center.
- Auto-lock the bookmark.
C. Configure action to send alerts to Monitor Center #
After creating a webhook URL, you have the option of pairing an action with the webhook event to send alerts to Monitor Center.5 This action can be customized in the following ways:
- Device: Select a camera to pair with the event.
- Duration: Specify how long the alert will display in Monitor Center in seconds.
- Additional options:
- Enable Only trigger when the specified value exists in data of webhook to add an alert trigger condition when the
text1
,text2
, ortext3
contains specified values.
- Enable Only trigger when the specified value exists in data of webhook to add an alert trigger condition when the
Notes:
- Refer to this article for a full list of applicable actions.
- The webhook URL generated by the system uses the current login URL. If you want to integrate with external services, ensure that the webhook URL you are using is accessible by those external services.
- An error may occur if an inactive status is never received.
- If “Add bookmark” is selected as an action, the bookmark duration will lengthen until the event ends.
- After setup, this alert can also be managed in the alert settings in Monitor Center.