Go to documentation repository
To get the camera events using WebSocket, do the following:
Send a JSON command to subscribe on events generated by the specified cameras (see 비디오 카메라 목록 및 정보 가져오기). This subscription allows you to receive all the events shown in the table below.
Code Block |
---|
{ "include": ["hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0", "hosts/Server1/DeviceIpint.6/SourceEndpoint.video:0:0"], "exclude":[] } |
include – subscribe to the events receiving;
exclude – disable the events receiving.
The response will contain the following JSON:
Code Block |
---|
{ objecs: [ {type: "devicestatechanged", name: "hosts/Server1/DeviceIpint.1", state: "signal restored"} ] } |
List of event types and camera states:
Event type | Description | States |
---|---|---|
devicestatechanged | Camera state | signal restored – connected, signal restored signal lost – signal lost |
alert | Alarm | No states |
alert_state | Alarm state | processing – the alarm is being processed closed – alarm processed reaction – alarm initiated |
detector_event | Detection tool triggering | No states |
camera_record_state | Archive record state | on – the camera is recording to the archive off – the camera is not linked to the archive gray – the camera is linked to the archive, but is not recording |
Info | ||
---|---|---|
| ||
If the camera is disabled in Axxon One, no events are received from it using WebSocket, including the signal lost event. |
Example of message:
Code Block |
---|
objects: [{name: "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0", state: "signal restored",…},…] 0: {name: "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0", state: "signal restored",…} name: "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0" state: "signal restored" type: "devicestatechanged" |