Event engine
WebSocket interface in Viinex allows an integrating application to subscribe to events (for example, events coming from IP camera detectors, built-in analytics systems or analytics systems integrated via external process; events coming via ModbusTCP etc) and use them in various scenarios to build an internal logic of integrating application for video recording management or to build more complex logic using scripts.
The client application only needs to connect to a server, authorize and subscribe to relevant events – after that it will receive these events in real time via WebSocket, i.e. the server sends events to all clients subscribed to the object as soon as it receives events from the objects in Viinex.
An example of subscription to some events
Receive all events from all objects:
["subscribe", {}]
Receive all events from objects camera 1 and camera 2 (which may be ONVIF cameras or raw video sources):
["subscribe", {"origins": ["cam1","cam2"]}]
Receive events from motion detector and scene change detector at camera 1:
["subscribe", {"origins": ["cam1"], "topics": ["MotionAlarm", "GlobalSceneChange"]}]
Each of these events is transferred in a single WebSocket frame containing a JSON record:
{ "timestamp": TIMESTAMP, "origin": { "name": STRING, "type": STRING, ... }
There can be several additional values depending on origin type (in case of ONVIF events the device may report a certain video detector ID or ID of the rule that caused a warning).