Options

Modes

-a, --archive - Opens application in Archive Playback mode. If aplication's state is Observer mode, then state will be changed to playback with connection to same server.

-m, --allow-multiple-instances - Execution another copy of observer.

--safe-mode – starting observer with output of the second stream.Allows to force switch pictures from the common grid cameras to the second stream

Init

-s, --server [localhost]If empty, then will be initiated connect to 127.0.0.1

-p, --port [9780]Connection port. If empty, then connection will be done with standart port, 9780

-l, --login [guard]Default user - guard (usually, most limited user)

--pwd [""]User's password. Default - empty.

-c, --cam-index [0]Available only in --simple mode. While connecting within --simple mode Observer use local "view" (that is only one, selected cam). By default, cam ID equal 0.

--cam-stream [-1]Available only in --simple mode. While connecting within --simple mode Observer use local "view" (that is only one, selected cam). By default, equal -1.

--window-pos <coordinates>
Postion and size of windows at start.
coordinates: X1 Y1 X2 Y2 - absolute window's coordinates.
where (X1, Y1) - coordinates for top-left corner, and (X2, Y2) - coordinates for bottom-right corner.
By default application will be opened at same place, where it was closed last time.

--trayStart program hidden in tray

-t, --time <date> <time>
date format: YYYY-MM-DD ; default - current date
time format: hh:mm:ss ; default - current time
This time using as start point for archive playback.
If you set this option while -p (port) equal observer work port (kernel.exe), but not playback work port (oopnet.exe), it will be ignored.

Data format

Supporting JSON or XML (UNIX format line break only) object representations (MIME-types application/json and application/xml). The representation will be chosen based on the analysis of the client's request Accept header. If it is not possible to determine the desired representation from the Accept header, objects will be sent using the default view (XML).

Authentication

Proceed by HTTP Digest Authentication. Username and password must be in UTF-8 encoding.

RPC (Remote Procedure Call)

The resource provides easy access to the capabilities of full-blown Line server communication protocol. This protocol is used, for example, by "Observer" application. Developers should not implement the network part of the interaction and can use HTTP as transport protocol.

Data formats

Request can be transmitted using JSON (version 7.1.1 or higher) or MessagePack (version 7.0 or higher) formats. Formats of request and reply are always the same. Text encoding is UTF-8. In order to get maximal performance it is recommended to use MessagePack. All examples are presented in JSON format.

Time

Time is represented as an array of integers. Its elements represent year, month, day, hour, minute, seconds, and milliseconds respectively. If some element in the end of the array equals to zero, it can be omitted. For example, “October 30, 2016, 15:00” could not only be presented as [2016, 11, 30, 15, 0, 0, 0] but also as [2016, 11, 30, 15].

Timeline of playback

Timeline is used to determine (and represent) whether a record for a certain time period exists in acrhive or not. The minimal time period used by timeline is called timeline resolution. It is possible to get timelines with any partifular resolution starting from 1 second. Resolution may be arbitrary, for example, 10 seconds, 16 seconds, 2 minutes, 30 minutes, 7 days, etc.

Timeline examples:

[0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0] – This timeline starts on the 1st of January, 2016 and ends on the 1st of January, 2017. Its resolution is 1 month. In this case it is clear that there are records for February and March only;

[1, 0] – This timeline starts on the 1st of January, 2016 and ends on the 1st of January, 2017. Its resolution is 6 months. In this case there are records for the first half of 2016;

[0, 1, 0] – This timeline starts on the 1st of January, 2015 and ends on the 1st of January, 2018. In this case there are records for the year 2016;

[0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 , 0, 0, 0, 0, 0, 0] – This timeline represents February, 2016. There are records for the 5th and the 17th of February. Please remember that timeline for any given month always contains 31 days. So the timeline for May, June and July will contain 93 elements, where the element corresponding to the 31th of June will always be equal to zero, because such day does not exist.

[0, 0, 0, 0, 0, 0, 1, 1, 0, 0] – This timeline starts at 00:30 March 10, 2016 and ends at 00:41 March 10, 2016. There are records for 00:36 and 00:37.

Request structure

In the case of a single request, it is an object with one required field:

Batch requests

Server supports execution of a list of commands transmitted simultaneously. In this case, the commands should be represented as an array of single requests. Response to such request will be represented as an array of single responses, the order of which will correspond to the order of requests:

archive.get_motions_timeline

Gets a timeline by a customised filter: by zone/s of motion detection, object size, object colors(videoanalytics at playback)

Request parameters:

channel - optional channel identifier(if not set, all available channels are used);

start_time - begin of time interval;

end_time - end of time interval (duration of a time interval mustn't be longer than 5 minuties);

unit_len -a scale of a timeline unit(seconds);

filter - an object contains of customized filter parameters.

Filter parameters(all parameters are optional):

min_area - minimal size of detected object( from all size of a frame). Value(float number) from 0.0 to 1.0, for example - 0.1 for detected object not less than 10% from a size of a frame;

max_area - maximum size of detected object;

mask64 - 64-bit matrix 8х8 which contains 64 cells of a frame and represented as a string of 64 symbols each of them could be "0" or "1". For example "0000000000010000000000000000000000000000000000000000000000000000", it is requested of an existing of motion detection at the 4th cell at the 2nd row of a frame;

colors - an array, where each elements consist of an array of 3 numbers, corresponding to RGB-elements of searching color(range [0, 255]).