Follow

Wisenet WAVE - How to start/stop recording using a Generic Event with Soft Triggers

What are the benefits of creating a Generic Event?

The WAVE software doesn't have a direct API method to start or stop recording on certain cameras, but there is an option in the Rules Engine called a Generic Event that can trigger the pre-configured action Recording on camera. You can expand the functionality by pairing it with a Soft Trigger event and Do HTTP Request action.

Recording for a fixed duration

I. Create Generic Event and Camera recording action

  1. Open WAVE and connect to your system as an Administrator.
  2. Right-click on one or more cameras in the Resource Tree and select Camera Settings.
  3. Switch to the Recording tab and click the switch to enable recording. The schedule can be left blank.
  4. Open the Main Menu and select System Administration (Ctrl+Alt+A) then click the icon Event Rules.
  5. Click on Event Rules and click on the Add button. The Event and Action sections will show up at the bottom half of the dialog.
  6. In the Event section, click the drop-down list next to When and select Generic Event.
  7. Fill in the following fields for Generic Event:
    1. Source 
    2. Caption 
    3. Description 
  8. In the Action section, click the drop-down list next to Do and select Camera Recording.
  9. Next to at, click the drop-down list and select the camera to record (the camera(s) from step 2) and click Apply.
  10. Change the following fields for Camera recording:
    1. Uncheck the interval of action (the interval will be instant).
    2. Select desired Quality and FPS.
    3. Uncheck Fixed Duration
  11. Click Apply to save the changes, then click OK.

II. Create Soft Trigger event and Do HTTP Request action

  1. Open WAVE and connect to your system as an Administrator.
  2. Open the Main Menu and select System Administration (Ctrl+Alt+A). then click the icon Event Rules.
  3. Click on Event Rules and click on the Add button. The Event and Action sections will show up at the bottom half of the dialog.
  4. In the Event section, click the drop-down list next to When and select Soft Trigger.
  5. Fill in the following fields for Soft Trigger: 
    1. At: Pick the camera(s) that you want to have the recording button.
    2. Available to: Pick the user(s) who can have this button on the screen.
    3. Name: You can give an identifier. (Ex: Start Record)
    4. Icon: Choose an icon 
  6. In the Action section, click the drop-down list next to Do and select Do HTTP Request.
  7. Fill in the following fields for Do HTTP Request:
    1. HTTP URL: add the WAVE Generic Event API call with the same parameter values identical to those used in Section I, Step 7 (source, caption, and description). The format should be 
      http://<server_ip>:<server_port>/api/createEvents?source=Interrogation&caption=record
      Example: http://127.0.0.1:7001/api/createEvents?source=Interrogation&caption=record
    2. HTTP content: leave blank
    3. Content-type: Auto
    4. Authentication type: Auto
    5. Request type: GET
    6. Login: Your WAVE username
    7. Password: Your WAVE password
  8. Click Apply to save the changes, then click OK.

Recording for an undefined amount of time

If you want to record continuously until a second soft trigger to stop the recording is clicked, you will need to use the pre/post-recording option for the Camera Recording action and create two Soft Trigger events.

  1. Create the Generic Event/Camera Recording action. Follow Section I. Create Generic Event and Camera recording action, but at Step 10 you will also need to
    a. Uncheck the Fix Duration.
    b. Keep the post-recording time as 0 seconds.
    c. Change pre-recording time as desired.
  2. Create the Soft Trigger that will start the recording. Follow Section II. Create Soft Trigger event and Do HTTP Request action, but at Step 7 add ?state=Active to your URL. The format is 
    http://<server_ip>:<server_port>/api/createEvents?state=Active&source=Interrogation&caption=record
    Example: http://127.0.0.1:7001/api/createEvents?state=Active&source=Interrogation&caption=record
  3. Create the Soft Trigger that will stop the recording. Follow Section II. Create Soft Trigger event and Do HTTP Request action, but at Step 7 add ?state=Inactive to your URL. The format should be:
    http://<server_ip>:<server_port>/api/createEvents?state=Inactive&source=Interrogation&caption=record
    Example: http://127.0.0.1:7001/api/createEvents?state=Inactive&source=Interrogation&caption=record

 

Authentication

Please keep in mind that all these requests will require authentication from the WAVE server. The WAVE server supports basic and digest authentication. Digest is more secure and the workflow is described in the API documentation.

If authentication from the WAVE server is successful and there is no misprint in the API method, the WAVE server will reply with 200 HTTP status code and JSON with a certain info message. It will tell you either some parameter is missing or be like below if the server accepted the generic event:

{
"error": "0",
"errorString": "",
"reply": null
}
Copyright © 2021 Hanwha Techwin America.
All rights reserved