Go to documentation repository
Page History
Warning |
---|
Dla wersji Axxon Next począwszy od 4.3.0.8031 and higher versions. |
To get the camera events using WebSocket, do the following:
Aby pozyskać zdarzenia kamer korzystając z WebSocket, wykonaj następujące czynności:
- Połącz się z Connect to ws://[user_name]:[password]@[IP-address]:[port]/[prefix]/events.
Send a JSON command to subscribe on events generated by the specified cameras (see Wyślij komendę JSON w celu zasubskrybowania dla zdarzeń generowanych przez określone kamery (zobacz: Get list of video sources (cameras)). This subscription allows you to receive all the events shown in the table belowSubskrypcja ta pozwala na otrzymywanie wszystkich zdarzeń spisanych w tabeli poniżej.
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 receivingzasubskrybuj otrzymywanie zdarzeń;
exclude - disable the events receiving.wyłącz otrzymywanie zdarzeń.
Odpowiedź będzie zawierać następujący 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:
Lista typów zdarzeń oraz stanów kamery:
Typ zdarzenia | Opis | Statusy | |
---|---|---|---|
devicestatechanged | Stan kamery | ||
Event type | Description | States | |
devicestatechanged | Camera state | signal restored - connectedpołączona, signal restoredsygnał przywrócony signal lost - signal lostsygnał utracony | |
alert | Alarm | No states- | |
alert_stateAlarm state | Stan alarmu | processing - the alarm is being processedjest obsługiwany closed - alarm processedobsłużony reaction - alarm initiatedzainicjalizowany | |
detector_event | Detection tool triggering | Wyzwolenie narzędzia detekcji | -No states |
camera_record_state | Archive record stateStatus zapisu w Archiwum | on - the camera is recording to the archive kamera zapisuje do archiwum off - the camera is not linked to the archivekamera nie zapisuje do archiwum gray - the camera is linked to the archive, but is not recordingkamera jest połączona z archiwum, lecz obecnie nie nagrywa |
Info | ||
---|---|---|
| ||
If the camera is disabled in Axxon Next, no events are received from it using WebSocket, including the signal lost event. | ||
| ||
Jeśli kamera jest wyłączona w Axxon Next, zdarzenia nie będą otrzymywane za pośrednictwem WebSocket, wliczając w to zdarzenia signal lost. |
Przykłady wiadomościExample 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" |
...