Go to documentation repository
WebSocket을 사용하여 카메라 이벤트를 가져오려면 다음과 같이 진행하십시오.
To get the camera events using WebSocket, do the following:
Send a JSON command to subscribe on events generated by the specified cameras (see 지정된 카메라에서 생성된 이벤트를 구독하는 JSON 명령을 전송합니다 (비디오 카메라 목록 및 정보 가져오기). 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:
이벤트 수신 비활성화
응답은 다음과 같은 JSON을 포함합니다.
Code Block |
---|
{ objecs: [ {type: "devicestatechanged", name: "hosts/Server1/DeviceIpint.1", state: "signal restored"} ] } |
List of event types and camera states:
이벤트 유형 및 카메라 상태 목록:
이벤트 유형 | 설명 | 상태 | |
---|---|---|---|
devicestatechanged | 카메라 상태 | ||
Event type | Description | States | |
devicestatechanged | Camera state | signal restored – connected연결됨, signal restored신호 복원됨 signal lost – signal lost신호 손실 | |
alert | Alarm알람 | No states없음 | |
alert_stateAlarm 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카메라가 아카이브에 연결되지 않음 gray – 카메라는 아카이브에 연결되어 있지만 기록 중이 아님 |
Info | ||
---|---|---|
| ||
If the camera is disabled in Axxon One, no events are received from it using WebSocket, including the signal lost event. | ||
Axxon One에서 카메라가 비활성화된 경우, 신호 손실 이벤트를 포함한 모든 이벤트가 WebSocket을 통해 수신되지 않습니다. |
메시지 예시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" |
...