You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close

How to get a snapshot from a camera via email when an event is detected elsewhere?

-------------------------
Affected Roles: System Owner • System Administrator 
Related DW Spectrum VMS Apps: DW Spectrum Server  • DW Spectrum Desktop
Difficulty: Medium
-------------------------

What is the concept?

Within the DW Spectrum VMS, we provide the option to receive HTTP generic events, which is a standard HTTP request to the DW Spectrum media server from any 3rd party software solution and/or DW Spectrum itself.

This means you can enable integration with any application that is able to send the HTTP event to trigger any action in DW Spectrum. Using this method, it also possible to create snapshots of any specified event.

In this article, we will describe how you can add a snapshot of an event to an email as an action.  

What is a Generic Event?

The DW Spectrum™ Server API provides a standard set of API calls for 3rd party systems and/or DW Spectrum itself.

With the DW Spectrum Server API  it is possible to send DW Spectrum events using a standard API call in the form of an HTTP string - also known as the CreateEvent API call.

Which function do I need?

You will only need the DW Spectrum Event Rules engine, which is already built-in to DW Spectrum with an intuitive user interface.

How do I do it?

  1. Confirm you have ‘Administrator’ user rights to log into DW Spectrum via the DW Spectrum Desktop client.
  2. Navigate to Main menu, select System Administration (Ctrl+Alt+A), then click the icon Event Rules
    (Or right-click on a camera in the resource panel or on a camera on the grid and select Camera Rules.)
  3. Click the Add button, and you will see the Event and Action dialog at the bottom half of the menu.
  4. Select the Event you want to use on the left, and select the action Do HTTP Request.
  5. Fill in the fields for your action details, then click Apply
    1. HTTP URL: add the DW Spectrum Generic Event API call with the specific parameters: source (and/orcaption and/or description) and metadata to add the relevant camera ID to the API call. This can contain multiple camera IDs. You can find the Camera ID via Camera Settings in the Advanced tab, and at the top of the menu you can copy the Camera ID.
    2. HTTP content: leave blank
    3. Content type: Auto
    4. Authentication type: Auto
    5. Request type: GET
    6. Login: Your DW Spectrum account (Administrator role)
    7. Password: Your DW Spectrum password
  6. Click the Add button again, and then you will see the Event and Action dialog on the bottom half of the menu.
  7. Select Generic Event for the event type on the left, and select the action - Send email on the right
  8. Choose the proper interval of action and enter (or pick) the recipients.
  9. Click Apply to save the changes, then click OK.

Do you have an example?

Let us design an example for this use case: when a person walks into a confidential bank vault, a sensor is triggered and a signal input will send to an I/O device.  We want to receive an email with a snapshot of the camera(s) instant capturing that that person’s arrival at the vault.

Configuration

  1. Confirm you have ‘Administrator’ user rights to log into DW Spectrum via the DW Spectrum Desktop client.
  2. Navigate to Main menu, select System Administration (Ctrl+Alt+A), then click the icon Event Rules
    (Or right-click on a camera in the resource panel or on a camera on the grid and select Camera Rules.)
  3. Now we are going to create the first rule by clicking on the Add button to open the Event and Action dialog on the bottom half of the menu.
  4. Select the Event you want to use on the left, and select the action Do HTTP Request.
  5. Fill in the fields for your action detail, then click Apply.
    1. HTTP URL example: 
      http://<the-server-IP-address>:<port-number>/api/createEvent?source=<something>&metadata={“cameraRefs”: [“CameraID1”,”CameraID2”]}  

http://192.168.1.25:7001/api/createEvent?source=<something>&metadata={“cameraRefs":["3A4AD4EA-9269-4B1F-A7AA-2CEC537D0248","3A4AD4EA-9269-4B1F-A7AA-2CEC537D0240"]}

    1. HTTP content: leave blank
    2. Content type: Auto
    3. Authentication type: Auto
    4. Request type: GET
    5. Login: Your DW Spectrum account (Administrator role)
    6. Password: Your DW Spectrum password
  1. Now we are going to add the second rule by clicking the Add button again to open the Event and Action dialog on the bottom half of the menu.
  2. Select Generic Event for the event type on the left and add the word you assigned to the source (and/or caption and/or description), and select the action Send email on the right.
  3. Choose the proper interval of action and enter (or pick) the recipients.
  4. Click Apply to save the changes, then click OK.
  • 31
  • 19-Mar-2019
  • 1815 Views