Applies to: WAVE
Summary
The latest Hanwha cameras offer the Handover feature that can send HTTP/HTTPS requests. This article describes how to utilize Handover to create events in WAVE that are not natively supported yet.
To send a generic event, the camera must have the Handover feature, and support the custom Action to modify query string.
Preparing a WAVE Server
Create a new user to allow digest authentication and creating events. To prepare a WAVE server:
- Log into the WAVE server, with Administrator permissions (commonly either admin or any users from Power Users role in 6.0.x or from Administrators role from 5.1.x or below).
- Select User Management from System Administration menu.
- Select Add user > Local user.
-
Assign the user a name. In this example, events is the username.
IMPORTANT: Allow insecure (digest) authentication must be selected.
NOTE: For 6.0.x or higher, select the Global Permissions tab,
and allow permission for Generate Events. - Click Add User.
Preparing the Event String
To prepare the event string:
- Determine what event must be fed to the WAVE server.
Slip and Fall, Early Fire Detection are two good examples that are not yet supported in WAVE 6.0.x, natively.
- Follow the WAVE API for generic event.
WAVE API for creating a generic event uses following syntax, in general.
https://serverIP:serverPort/api/createEvent
With above, we can add multiple parameters to specify more details.
Example parameters supported
-
- caption
- source
- description
- metadata
Build the String
In this example, add caption and cameraRefs metadata so the server will know which camera to bind the event.
caption=Fire
"caption" can be any single word to help identify the event type. This article will use Early Fire Detection so we'll use Fire as the caption.
metadata={"cameraRefs":["cameraID"]}
"cameraID" can be found under camera settings page, and metadata can include more than just one reference. In this example, we will use Hanwha's early fire detection bi-spectrum camera, TNM-C2712TDR, and show you how it can bind two source cameras into a single event.
camera ID: 1416e423-9a4d-a949-6f3c-2b4041b7e6f9
camera ID: 9ea15456-64e8-7b02-66b3-f734d03aa84d
As a result, with the information above, the event string is:
api/createEvent?caption=Fire&metadata={"cameraRefs":["1416e423-9a4d-a949-6f3c-2b4041b7e6f9","9ea15456-64e8-7b02-66b3-f734d03aa84d"]}
Validating the Event String on the Server Using the Browser
- Open a browser, and paste the line from Build the String into the address bar.
The example in this article is:
http://192.168.0.50:7001/api/createEvent?caption=Fire&metadata={"cameraRefs":["1416e423-9a4d-a949-6f3c-2b4041b7e6f9","9ea15456-64e8-7b02-66b3-f734d03aa84d"]}
- Use the username and password previously created.
- Confirm it on both browser and WAVE client. It would return "errorId":"ok" in the response string.
Preparing the Camera
NOTE: This step assumes the user already created a functional analytic
from the camera settings.
This example uses early fire detection.
To prepare the camera:
- Access the camera's web UI.
- Select Settings > Event > Handover.
- Click Add to create a new entry.
- Modify the following fields to the respective data.
- Type: HTTPS
- IP Address: WAVE server's IP address
- Port: 7001
- User: user created during server preparation (event in this article)
- Password: password for the user above
- Action: Custom
- Query string: the string created above.
api/createEvent?caption=Fire&metadata={"cameraRefs":["1416e423-9a4d-a949-6f3c-2b4041b7e6f9","9ea15456-64e8-7b02-66b3-f734d03aa84d"]}
- Select OK > Apply.
- Confirm the Handover rule is created.
- Now to create Event Rule to use Handover. Select Event Rule > Add.
- Select the appropriate Event trigger and set Event action settings as Handover 1 as created above. This example will monitor my Masterbuilt grill for Early Fire Detection trigger, to take Handover 1 action.
- Click OK to exit.
Using the Generic Event in WAVE
To use the generic event in WAVE:
- Open WAVE client.
- Select System Administration > Event Rules.
NOTE: Alternatively, the user can right-click on the camera and click on Camera Rules.
- Modify entries as needed.
In this example, bookmarking on two cameras with two different tags for quick search afterwards is being used. Using the same trigger, one can create another event rule, but different Actions, as many as they need.