Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


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:

  1. Połącz się z Connect to ws://[user_name]:[password]@[IP-address]:[port]/[prefix]/events.
  2. 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 zdarzeniaOpisStatusy
devicestatechangedStan kamery
Event typeDescriptionStates
devicestatechangedCamera state

signal restored -  connectedpołączona, signal restoredsygnał przywrócony

signal lost -  signal lostsygnał utracony

alertAlarmNo states-
alert_stateAlarm stateStan alarmuprocessing -  the alarm is being processedjest obsługiwany
closed - alarm processedobsłużony
reaction - alarm initiatedzainicjalizowany
detector_eventDetection tool triggeringWyzwolenie 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
titleNote

If the camera is disabled in Jeśli kamera jest wyłączona w Axxon Next, no events are received from it using WebSocket, including the signal lost event.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"

...