Frequently Asked Question

DeskCamera API for triggering ONVIF Motion event manually
Last Updated 28 days ago

DeskCamera enables the triggering of ONVIF motion events based on keyboard or mouse activity. If this functionality does not meet your needs, you have the option to manually trigger a motion event using the DeskCamera API.

To manually trigger a motion event, you must first enable the API call feature in your DeskCamera video source settings:

image


Once the API call is enabled, you can trigger the motion event programmatically via the API call detailed below:

HTTP POST Request:

http://192.168.241.1:8090/onvif/event_service/api/TriggerEvent

Headers:

Content-Type: application/json

Body:

{
"token": "DISPLAY1_Token",
"type": "0",
"state": "true"
}

Parameters Explained:

  • 192.168.241.1:8090 is the IP address and port of the application. Alternatively, you can use the PC hostname instead of the IP address.
  • "token": "DISPLAY1_Token" refers to the token of the video source for which the event is to be triggered. The token is displayed in the Configure Motion dialog.
  • "type": "0" denotes the event type. For motion events, use "0". Currently, only motion events are supported.
  • "state": "true" indicates the state of the ONVIF event. A value of true means motion is detected, while false means the motion has ended. It's recommended to alternate between true and false since ONVIF consumer applications may ignore consecutive events with the same state.

This API call can be embedded into a user's own software application, or an HTTP client like Postman can be used for testing purposes.

For usage in an application like Postman, the setup should appear as shown in the picture below:

image

Please Wait!

Please wait... it will take a second!