How do I receive external event data from third-party systems via webhooks? - CCTV Knowledge Base
View Categories

How do I receive external event data from third-party systems via webhooks?

4 min read

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

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 #

  1. Go to Action Rule and click Add.
  2. In the Information page, select Triggered as the Rule type.
  3. In the Event page, select Webhook as the Event source to create a webhook URL.2
    action rule wizard
  4. 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.
  5. Choose a trigger type between One time and Interval. Click Advanced Webhook Ingredients button to add optional ingredients such as the text1text2text3 and time.
    • 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"
  6. Click Next and quickly pair the Add a bookmark or Trigger an alert actions with the webhook event.
  7. Customize the Add bookmark or Trigger webhook alert in Monitor Center actions in the Action page if they were added in the last step.
  8. Click on the Add button to add more actions if desired.
  9. 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 text1text2, and text3.
    • 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 text1text2, and text3.
    • Additional options:
      • Enable Display bookmark information on Monitor Center channels to show the information in real time in Monitor Center.
      • Auto-lock the bookmark.

action rule wizard

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 text1text2, or text3 contains specified values.

Notes:

  1. Refer to this article for a full list of applicable actions.
  2. 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.
  3. An error may occur if an inactive status is never received.
  4. If “Add bookmark” is selected as an action, the bookmark duration will lengthen until the event ends.
  5. After setup, this alert can also be managed in the alert settings in Monitor Center.

Powered by BetterDocs

Leave a Comment