Divarlt;BRgt;Console Control Languagelt;BRgt;2.32
2007/01/17
© 2007 Bosch Security Systems

1 Introduction

This document describes the Command Line Interface (CLI) commands for the Divar. The Command Line Interface consists of a group of commands that are used to control functions of the Divar through the use of calls via the RS-232 port. A personal computer, dumb terminal or the Hyperterminal program supplied with Microsoft Windows may be used to communicate with the Divar to control various system functions, e.g. switching, receiver/driver actions or alarms.
This capability allows the Divar to be interfaced with external software, which typically is used to sense alarms or handle access control on an existing computer system. It is strongly recommended that only qualified programmers who are already familiar with the Divar operation make use of this interfacing feature.

2 CLI naming conventions

2.1 Token prefix

Message Set commands, prefixed with MS, are used to set (or select) a specific Divar operating function
Message Read commands, prefixed with MR, are used to acquire the current settings of a Divar, which has been set up through its local front panel keypad or by other CLI commands.
General command, with no specific prefix, are used to set or read parameters relating to general system functions.

2.2 Token construction

The words used to construct command tokens are joined by dashes (-) or under-scrores (_) to form a single token. Also tokens are case-insensitive. The following are all accepted as the same command:
MS-MOTION-ALARM
MS_MOTION_ALARM
MS-MOTION_ALARM
MS_MOTION-ALARM
Ms-Motion-AlarM

3 CLI format

3.1 Command structure

Each command consists of a keyword, followed by an '&' character directly followed by zero or more parameters, all separated by the '&' character (no spaces allowed!). Parameters are position-dependent.
Note: Although the commands will also work without the '&', this may not be supported anymore in future releases! Therefore it is strongly advised to use the '&'!
MR_ALARM_STATUS&
MR_REMOTE_STATUS&1
MS_SEQ_ENABLE&3&1
If required by the command, the session (or user) id parameter is a mandatory (first) parameter. An error is returned when a session id does not refer to an open login session.
Each parameter may be a name-value pair '<parameterName>=<value>' or just as a '<value>'. Value-only formatting (as in the following example) is used to support legacy CLI commands, for which parameter names haven't been defined.
MS-CAM-FULL&1&1
For passing hexadecimal values, use a "0x" prefix. Decimal values can be send as is.

3.2 Reply structure

Each return parameter is specified by its name e.g. '<parameterName>=<value>'. The first name/value pair is the return code parameter 'returnCode=<decimal>'. Possible return codes are:
 0 = Failure
 1 = Ok
If 'returnCode=0' then the reply also includes an 'errorText' parameter describing the error in ASCII, English text.
The following are sample replies, with and without an error respectively
returnCode=0&errorText=Unable to perform Motion
returnCode=1&dwellTime=10

3.3 Data types of CLI values

The following basic data types of CLI values can be distinguised:
1. Boolean
 0 = false
 1 = true
2. Integer
Integers prefixed with "0x" will be interpreted as hexadecimal values.
Integers prefixed with "-" are interpreted as negative values.
Integers that are in hex are in big-endian format.
Short integers are 2 bytes in length before conversion to ASCII. This includes the sign bit. Short integers can range between -32768 and +32767 decimal.
Examples:
the string "0x1A34" is 1A34 hex
the string "56" is 56 decimal
the string "-74" is -74 decimal
the string "-0xFFFF" is illegal because -FFFF needs 17 bits.
the string "-0x13" is -13 hex.
Longs integers are 4 bytes in length before conversion to ASCII. This includes the sign bit. Long integers can range between -2147483648 and +2147483647 decimal.
Examples:
the string "0x1A34ABCD" is 1A34ABCD hex.
3. String
String values can contain any ASCII data. Non-printable, '&' and '=' characters which could be mistaken for delimiters are converted to URL format. Individual strings are not null terminated, but are delimited by either '=' or '&' as described above.

3.4 Command format specification

In this document commands are specified by logical grouping. Commands with parameter names may be mixed with commands without parameter names. Commands which do not have parameter names, are specified as follows:
<COMMAND_NAME>&[<parameter>]
RETURNS: <parameter>[&<parameter>]
The RETURNS section returns 'returnCode=1' when the command was successful and does not return any other values. For example:
MS-ALARM-CLEAR&<boolean>
RETURNS: returnCode=1
This command acknowledges the last alarm (parameter=false) or all alarms.
Commands which have parameter names assigned, are specified as follows:
<COMMAND_NAME>&[<name>=<value>>]
RETURNS: returnCode=1&<name>=<value>[&<name>=<parameter>]
For example:
MR-RECORDING&
RETURNS: returnCode=1&startDate=<date>&startTime=<time>&\
endDate=<date>&endTime=<time>
This command returns the earliest and latest recording date and time.

4 Command summary

AUX-OFFAUX-ONAUX-TOGGLE
BEEP-CONSOLECANCEL-AUX-LATCHDATE
LATCH-AUX-OFFLATCH-AUX-ONMR-ACTIVE-CAMEO
MS-ACTIVE-CAMEOMR-ADDRESSMS-ALARM-CLEAR
MR-ALARM-STATUSMR-ATM-POS-DISPLAYMS-ATM-POS-DISPLAY
MR-AUTOCLIP-MODEMS-AUTOCLIP-MODEMR-AUTOCLIP-PERIOD
MS-AUTOCLIP-PERIODMR-AUTOCLIP-USAGEMS-AUTOCLIP-USAGE
MR-AUTOMAP-INPUTMS-AUTOMAP-INPUTMR-CAM
MR-CAM-CONTROLMR-CAM-DISPLAY-LOCKMR-CAM-FULL
MS-CAM-FULLMR-CAM-NUMBERMR-CAM-TITLE
MR-DISK-STATUSMR-DISPLAY-MODEMS-DISPLAY-MODE
MR-DISPLAY-MOTIONMS-DISPLAY-MOTIONMR-FREEZE
MS-FREEZEMR-HISTORY-FILTERMS-HISTORY-FILTER
MR-HISTORY-INFOMR-HISTORY-NEXTMR-HISTORY-SIZE
MS-HISTORY-STARTMS-INPUT-STATEMR-INPUT-STATUS
MS-KEYMR-LED-STATUSMS-LOCARCH-CANCEL
MS-LOCARCH-ERASEMS-LOCARCH-LIST-ADDMS-LOCARCH-LIST-CLEAR
MR-LOCARCH-LIST-ENTRYMR-LOCARCH-LIST-INFOMS-LOCARCH-LIST-REMOVE
MR-LOCARCH-PROGRESSMS-LOCARCH-STARTMR-LOCARCH-STATUS
MR-MODEL-NUMBERMR-MON-DISPLAYMS-MON-DISPLAY
MR-MON-TEXT-ENABLEMS-MON-TEXT-ENABLEMR-MON-TIME-ENABLE
MS-MON-TIME-ENABLEMR-MOTION-STATUSMR-OUTPUT-STATUS
MR-PLAYBACKMS-PLAYBACKMR-RECORDING
MS-REMOTE-ALARM-CLEARMS-REMOTE-DELETE-VIDEOMR-REMOTE-DISK-STATS
MR-REMOTE-DVR-ID-STRINGMS-REMOTE-PROTECTMS-REMOTE-RELAY-STATE
MR-REMOTE-STATUSMR-REMOTE-VIDEO-INTERVALMR-SEQ-DWELL
MS-SEQ-DWELLMR-SEQ-ENABLEMS-SEQ-ENABLE
MR-SEQ-LISTMS-SEQ-LISTMR-USERS-LOGGED-IN
MS-VIDEO-DELETEMR-VIDEOLOSS-STATUSMR-WEBSET-REVISION
MR-ZOOMMS-ZOOMMS-ZOOM-SCROLL
PREPOSPREPOS-SETR-C
REVISIONSET-DATESET-TIME
TIMETIME-SYNCHVARSPEED-PTZ

5 Detailed command descriptions

All commands described in this chapter are for all Divar versions (DVR16E, DVR9E and DVR6E). However, the details shown are for the 16-channel version (DVR16E). Where applicable, this means 9 (DVR9E) or 6 (DVR16E) channel versions will not have the exact same values available. For example, a 6 channel Divar only has 6 camera keys.

5.1 Frontpanel commands

MS-KEY &value=<key>
Sends a key mnemonic handled like the front panel keys. Note that the secondary functions like 'F1', still need to be preceded by an 'alt' key, otherwise the primary function is executed which would be 'live' for 'F1'.
<key>:
Key mnemonic range 1..38
 1 = live         14 = key 5   26 = F1
 2 = search       15 = key 6   27 = F2
 3 = rewind       16 = key 7   28 = left
 4 = freeze       17 = key 8   29 = up
 5 = playback     18 = key 9   30 = down
 6 = forward      19 = key 10  31 = right
 7 = acknowledge  20 = key 11  32 = select
 8 = multi        21 = key 12  33 = escape
 9 = alt          22 = key 13  34 = menu
10 = key 1        23 = key 14  35 = monitor A
11 = key 2        24 = key 15  36 = monitor B
12 = key 3        25 = key 16  37 = sequence
13 = key 4                     38 = zoom
MR-LED-STATUS&
RETURNS: &value=<ledStatus>
Returns the status of all available LEDs on the front panel.
<ledStatus>:
String representation of the status for the 36 front panel LEDs. Each character represents the status of an individual LED according to the following encoding.
0 = Off        4 = unused
1 = On green   5 = Flashing green
2 = On red     6 = Flashing red
3 = On yellow  7 = Flashing yellow
The order of the LEDs follows the layout on the front panel as close as possible and is defined as follows.
1 = Live         10 = Below-Alt   19 = Sequence  28 = 8
2 = Search       11 = Record      20 = Zoom      29 = 9
3 = Rewind       12 = Network     21 = 1         30 = 10
4 = Freeze       13 = Alarm       22 = 2         31 = 11
5 = Play         14 = Motion      23 = 3         32 = 12
6 = Forward      15 = Video loss  24 = 4         33 = 13
7 = Acknowledge  16 = Menu        25 = 5         34 = 14
8 = Multi        17 = Monitor-A   26 = 6         35 = 15
9 = Alt          18 = Monitor-B   27 = 7         36 = 16

5.2 Camera commands

MR-CAM&
RETURNS: &cameraMap=<cameraMap>
Returns if a camera is connected or not.
<cameraMap>:
A bitmap in the range 0..65535/511/63 (0xFFFF/0x01FF/0x003F) depending on the device type (DVR16/9/6), where each bit indicates a true/false (1/0) for the preformed action
CAM  BIT#  DEC  HEX     CAM  BIT#  DEC   HEX
 1    0      1  0001      9   8     256  0100  
 2    1      2  0002     10   9     512  0200
 3    2      4  0004     11   10   1024  0400
 4    3      8  0008     12   11   2048  0800
 5    4     16  0010     13   12   4096  1000
 6    5     32  0020     14   13   8192  2000
 7    6     64  0040     15   14  16384  4000
 8    7    128  0080     16   15  32768  8000
MR-CAM-CONTROL&
RETURNS: &cameraMap=<cameraMap>
Returns if a camera is controllable or not.
<cameraMap>:
A bitmap in the range 0..65535/511/63 (0xFFFF/0x01FF/0x003F) depending on the device type (DVR16/9/6), where each bit indicates a true/false (1/0) for the preformed action
CAM  BIT#  DEC  HEX     CAM  BIT#  DEC   HEX
 1    0      1  0001      9   8     256  0100  
 2    1      2  0002     10   9     512  0200
 3    2      4  0004     11   10   1024  0400
 4    3      8  0008     12   11   2048  0800
 5    4     16  0010     13   12   4096  1000
 6    5     32  0020     14   13   8192  2000
 7    6     64  0040     15   14  16384  4000
 8    7    128  0080     16   15  32768  8000
MR-CAM-DISPLAY-LOCK&
RETURNS: &cameraMap=<cameraMap>
Returns a map of cameras with display lock enabled.
<cameraMap>:
A bitmap in the range 0..65535/511/63 (0xFFFF/0x01FF/0x003F) depending on the device type (DVR16/9/6), where each bit indicates a true/false (1/0) for the preformed action
CAM  BIT#  DEC  HEX     CAM  BIT#  DEC   HEX
 1    0      1  0001      9   8     256  0100  
 2    1      2  0002     10   9     512  0200
 3    2      4  0004     11   10   1024  0400
 4    3      8  0008     12   11   2048  0800
 5    4     16  0010     13   12   4096  1000
 6    5     32  0020     14   13   8192  2000
 7    6     64  0040     15   14  16384  4000
 8    7    128  0080     16   15  32768  8000
MR-CAM-NUMBER&
RETURNS: &value=<camOffset>
Returns the camera number of the first camera connected to the rear panel camera input number 1.
<camOffset>:
Camera number of first camera input. Range 1..984.
MR-CAM-TITLE &cameraNumber=<cameraNumber>
RETURNS: &cameraName=<richString>
Returns the camera title for the specified camera number.
<cameraNumber>:
Camera number, depends on device type. Range 0..(16|9|6). Where zero indicates 'no-camera'. Note that zero might not be applicable for specific commands.
<richString>:
Eight bit character string which allows for normal ASCII 'letters' and 'digits' plus an escape mechanism for the other characters of the form '\HH' where 'H' is a hexadecimal character value.

5.3 Telemetry (PTZ) commands

AUX-OFF &cameraNumber=<biphaseLogicalCam> &auxCommand=<auxilary>
Deactivates the specified receiver/driver from its specified auxiliary function/position.
<auxilary>:
Auxilary value, range 0..1023
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
AUX-ON &cameraNumber=<biphaseLogicalCam> &auxCommand=<auxilary>
Sends the specified receiver/driver to the specified auxiliary function/position.
<auxilary>:
Auxilary value, range 0..1023
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
AUX-TOGGLE &cameraNumber=<biphaseLogicalCam> &auxCommand=<auxilary>
Toggles the specified auxiliary function/position on the specified receiver/driver
<auxilary>:
Auxilary value, range 0..1023
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
CANCEL-AUX-LATCH &cameraNumber=<biphaseLogicalCam>
Stops the operation of a LATCH-AUX-ON or LATCH-AUX-OFF command on the specified receiver/driver
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
LATCH-AUX-OFF &cameraNumber=<biphaseLogicalCam> &auxCommand=<auxilary>
Unlatch the specified auxiliary function/position on the specified receiver/driver.
<auxilary>:
Auxilary value, range 0..1023
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
LATCH-AUX-ON &cameraNumber=<biphaseLogicalCam> &auxCommand=<auxilary>
Latch the specified auxiliary function/position on the specified receiver/driver.
<auxilary>:
Auxilary value, range 0..1023
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
PREPOS &cameraNumber=<biphaseLogicalCam> &presetNumber=<prepos>
Sends the specified camera to the specified pre-position.
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
<prepos>:
Range 0..1023
PREPOS-SET &cameraNumber=<biphaseLogicalCam> &presetNumber=<prepos>
Set the specified camera current position as the specified pre-position number
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
<prepos>:
Range 0..1023
R-C &cameraNumber=<biphaseLogicalCam> &opCode=<biphaseOpcode> &value=<biphaseData>
Sets the receiver/driver function according to the entered parameters. Refer to the following table for a detailed explanation of parameter values and associated functions.
OpCode    Data         Function
HEX  DEC  HEX    DEC
0x1   1   0x1      1   Turn AUX 1 ON
0x1   1   0x2      2   Turn AUX 1 OFF
0x1   1   0x3      3   Toggle AUX 1
0x1   1   0x5      5   Turn AUX 2 ON
0x1   1   0x6      6   Turn AUX 2 OFF
0x1   1   0x7      7   Toggle AUX 2
0x1   1   0x9      9   Turn AUX 3 ON
0x1   1   0xA     10   Turn AUX 3 OFF
0x1   1   0xB     11   Toggle AUX 3
0x1   1   0xD     13   Turn AUX 4 ON 
0x1   1   0xE     14   Turn AUX 4 OFF
0x1   1   0xF     15   Toggle AUX 4
0x2   2   0x0-F  0-15  Go to pre-position Data+1
0x3   3   0x0-7  0-7   Zoom IN for (Data+1)/2 seconds
0x3   3   0x8-F  8-15  Zoom OUT for (Data-7)/2 seconds
0x4   4   0x0-F  0-15  Pan RIGHT for (Data+1)/2 seconds
0x5   5   0x0-F  0-15  Pan LEFT for (Data+1)/2 seconds
0x6   6   0x0-F  0-15  Tilt DOWN for (Data+1)/2 seconds
0x7   7   0x0-F  0-15  Tilt UP for (Data+1)/2 seconds
0xA  10   0x0-7  0-7   Focus FAR for (Data+1)/2 seconds
0xA  10   0x8-F  8-15  Focus NEAR for (Data-7)/2 seconds
0xB  11   0x1      1   Turn AUX 5 ON
0xB  11   0x2      2   Turn AUX 5 OFF
0xB  11   0x3      3   Toggle AUX 5
0xB  11   0x5      5   Turn AUX 6 ON
0xB  11   0x6      6   Turn AUX 6 OFF
0xB  11   0x7      7   Toggle AUX 6
0xB  11   0x9      9   Turn AUX 7 ON
0xB  11   0xA     10   Turn AUX 7 OFF
0xB  11   0xB     11   Toggle AUX 7
0xC  12   0x0-F  0-15  Set pre-position Data+1
<biphaseData>:
Data value. Range 0..0xF
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
<biphaseOpcode>:
Operation code. Range 0..0xF
VARSPEED-PTZ &cameraNumber=<biphaseLogicalCam> &panSpeed=<biphasePanSpeed> &tiltSpeed=<biphaseTiltSpeed> &zoomSpeed=<biphaseZoomSpeed> &functionCode=<ptzFunction>
Activates the AutoDome pan, tilt, zoom, focus and/or iris actions, possibly all at the same time. Once started the AutoDome will continue until the 'All Off' or another control command is received.
<biphaseLogicalCam>:
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
<biphasePanSpeed>:
Left/right pan speed. Ranges from slow to fast, 0..15 (0..0xF)
<biphaseTiltSpeed>:
Up/down tilt speed. Ranges from slow to fast, 0..15 (0..0xF)
<biphaseZoomSpeed>:
Zoom in/out. Ranges from slow to fast, 0..7 (0..0x7)
<ptzFunction>:
Variable speed function code according to following table
Function    HEX    DEC
All off     0x000    0
Pan right   0x001    1
Pan left    0x002    2
Tilt down   0x004    4
Tilt up     0x008    8
Zoom out    0x010   16
Zoom in     0x020   32
Focus near  0x040   64
Focus far   0x080  128
Iris close  0x100  256
Iris open   0x200  512

5.4 Monitor commands

MR-ACTIVE-CAMEO &monitor=<monitorAB>
RETURNS: &cameoNumber=<input>
Returns the active cameo for the specified monitor. In full screen cameo number 1 is returned.
<input>:
Input number, range 0..16 where 0 = 'no input'
<monitorAB>:
Monitor A (1) or B (2)
MS-ACTIVE-CAMEO &monitor=<monitorAB> &cameoNumber=<cameo>
Sets the specified cameo as the active cameo for the specified monitor.
<cameo>:
Cameo number depends on '<displayMode>'. Range 1..maxCameo(displayMode). For example a 'Quad' display mode has 4 cameos, where a '8+2' has 10.
<monitorAB>:
Monitor A (1) or B (2)
MR-ATM-POS-DISPLAY &atmPosViewMode=<atmPosViewMode>
RETURNS: &cameraMap=<cameraMap>
Returns a camera map indicating for which cameras atm/pos text display on Monitor A has been enabled and for which it is disabled.
<atmPosViewMode>:
0 = live, 1 = playback
<cameraMap>:
A bitmap in the range 0..65535/511/63 (0xFFFF/0x01FF/0x003F) depending on the device type (DVR16/9/6), where each bit indicates a true/false (1/0) for the preformed action
CAM  BIT#  DEC  HEX     CAM  BIT#  DEC   HEX
 1    0      1  0001      9   8     256  0100  
 2    1      2  0002     10   9     512  0200
 3    2      4  0004     11   10   1024  0400
 4    3      8  0008     12   11   2048  0800
 5    4     16  0010     13   12   4096  1000
 6    5     32  0020     14   13   8192  2000
 7    6     64  0040     15   14  16384  4000
 8    7    128  0080     16   15  32768  8000
MS-ATM-POS-DISPLAY &atmPosViewMode=<atmPosViewMode> &cameraMap=<cameraMap>
Sets the display on/off for all cameras for both live and playback mode.
<atmPosViewMode>:
0 = live, 1 = playback
<cameraMap>:
A bitmap in the range 0..65535/511/63 (0xFFFF/0x01FF/0x003F) depending on the device type (DVR16/9/6), where each bit indicates a true/false (1/0) for the preformed action
CAM  BIT#  DEC  HEX     CAM  BIT#  DEC   HEX
 1    0      1  0001      9   8     256  0100  
 2    1      2  0002     10   9     512  0200
 3    2      4  0004     11   10   1024  0400
 4    3      8  0008     12   11   2048  0800
 5    4     16  0010     13   12   4096  1000
 6    5     32  0020     14   13   8192  2000
 7    6     64  0040     15   14  16384  4000
 8    7    128  0080     16   15  32768  8000
MR-CAM-FULL &monitor=<monitorAB>
RETURNS: &cameraNumber=<cameraNumber>
Returns the camera number shown in full screen on the specified monitor. If the monitor is not in full screen mode, this command returns 0.
<cameraNumber>:
Camera number, depends on device type. Range 0..(16|9|6). Where zero indicates 'no-camera'. Note that zero might not be applicable for specific commands.
<monitorAB>:
Monitor A (1) or B (2)
MS-CAM-FULL &monitor=<monitorAB> &cameraNumber=<cameraNumber>
Shows the specified camera full screen on the specified monitor.
<cameraNumber>:
Camera number, depends on device type. Range 0..(16|9|6). Where zero indicates 'no-camera'. Note that zero might not be applicable for specific commands.
<monitorAB>:
Monitor A (1) or B (2)
MR-DISPLAY-MODE &monitor=<monitorAB>
RETURNS: &displayMode=<displayMode>[ &cameraNumber=<cameraNumber>][ &cameoNumber=<cameo>]
Returns the display mode and the active cameo number for a multi screen or the active camera number for full screen on the specified monitor.
<cameo>:
Cameo number depends on '<displayMode>'. Range 1..maxCameo(displayMode). For example a 'Quad' display mode has 4 cameos, where a '8+2' has 10.
<cameraNumber>:
Camera number, depends on device type. Range 0..(16|9|6). Where zero indicates 'no-camera'. Note that zero might not be applicable for specific commands.
<displayMode>:
Valid modes depend on the device and settings e.g. is a display mode enabled for selection.
 0 = Disabled     4 = Quad 3      8 = 12 + 1 Multi
 1 = Full screen  5 = Quad 4      9 = 8 + 2 Multi
 2 = Quad 1       6 = 4x4 Multi  10 = 4 + 3 Multi
 3 = Quad 2       7 = 3x3 Multi  11 = 5 + 1 Multi
<monitorAB>:
Monitor A (1) or B (2)
MS-DISPLAY-MODE &monitor=<monitorAB> &displayMode=<displayMode>
This command sets the display mode for the specified monitor.
<displayMode>:
Valid modes depend on the device and settings e.g. is a display mode enabled for selection.
 0 = Disabled     4 = Quad 3      8 = 12 + 1 Multi
 1 = Full screen  5 = Quad 4      9 = 8 + 2 Multi
 2 = Quad 1       6 = 4x4 Multi  10 = 4 + 3 Multi
 3 = Quad 2       7 = 3x3 Multi  11 = 5 + 1 Multi
<monitorAB>:
Monitor A (1) or B (2)
MR-DISPLAY-MOTION&
RETURNS: &bEnable=<enable>
Returns if motion visualisation is enabled
<enable>:
0 = disable, 1 = enable.
MS-DISPLAY-MOTION &bEnable=<enable>
Enable (disable) motion visualisation
<enable>:
0 = disable, 1 = enable.
MR-FREEZE &monitor=<monitorAB> &value=<cameo>
RETURNS: &bActive=<enable>
Returns the freeze function setting for the specified cameo on the specified monitor. Note that although you can query monitor 'B' you cannot freeze a camera there, so it always returns zero.
<cameo>:
Cameo number depends on '<displayMode>'. Range 1..maxCameo(displayMode). For example a 'Quad' display mode has 4 cameos, where a '8+2' has 10.
<enable>:
0 = disable, 1 = enable.
<monitorAB>:
Monitor A (1) or B (2)
MS-FREEZE &monitor=<monitorA> &value=<cameo> &bEnable=<enable>
Enables or disables the freeze function for the specified cameo on the specified monitor.
<cameo>:
Cameo number depends on '<displayMode>'. Range 1..maxCameo(displayMode). For example a 'Quad' display mode has 4 cameos, where a '8+2' has 10.
<enable>:
0 = disable, 1 = enable.
<monitorA>:
Monitor A (1) only
MR-MON-DISPLAY &monitor=<monitorAB> &displayMode=<displayMode>
RETURNS: &cameraList=<cameraList>
Returns the camera list being displayed in the specified mode on the selected monitor.
<cameraList>:
A comma separated list of '<cameraNumber>'s with a maximum length depending on the display mode.
<displayMode>:
Valid modes depend on the device and settings e.g. is a display mode enabled for selection.
 0 = Disabled     4 = Quad 3      8 = 12 + 1 Multi
 1 = Full screen  5 = Quad 4      9 = 8 + 2 Multi
 2 = Quad 1       6 = 4x4 Multi  10 = 4 + 3 Multi
 3 = Quad 2       7 = 3x3 Multi  11 = 5 + 1 Multi
<monitorAB>:
Monitor A (1) or B (2)
MS-MON-DISPLAY &monitor=<monitorA> &displayMode=<displayMode>[ &cameraList=<cameraList>]
Specify the set of cameras to be shown for the specified display mode and monitor.
Note that it does not change the display to the specified display mode but that it will update the camera configuration if the display mode is active.
Note also that an error will be returned if the specified display mode is disabled
Note that the 'Disabled' display mode makes no sense in this context and is silently ignored.
<cameraList>:
A comma separated list of '<cameraNumber>'s with a maximum length depending on the display mode.
<displayMode>:
Valid modes depend on the device and settings e.g. is a display mode enabled for selection.
 0 = Disabled     4 = Quad 3      8 = 12 + 1 Multi
 1 = Full screen  5 = Quad 4      9 = 8 + 2 Multi
 2 = Quad 1       6 = 4x4 Multi  10 = 4 + 3 Multi
 3 = Quad 2       7 = 3x3 Multi  11 = 5 + 1 Multi
<monitorA>:
Monitor A (1) only
MR-MON-TEXT-ENABLE &monitor=<monitorAB>
RETURNS: &bEnable=<enable>
Returns the setting for text (not date/time) display of the specified monitor.
<enable>:
0 = disable, 1 = enable.
<monitorAB>:
Monitor A (1) or B (2)
MS-MON-TEXT-ENABLE &monitor=<monitorAB> &bEnable=<enable>
Enable or disable text (not date/time) display on the specified monitor.
<enable>:
0 = disable, 1 = enable.
<monitorAB>:
Monitor A (1) or B (2)
MR-MON-TIME-ENABLE &monitor=<monitorAB>
RETURNS: &bEnable=<enable>
Returns the setting for the time/date display for the specified monitor.
<enable>:
0 = disable, 1 = enable.
<monitorAB>:
Monitor A (1) or B (2)
MS-MON-TIME-ENABLE &monitor=<monitorAB> &bEnable=<enable>
Enable or disable OSD date/time on the specified monitor.
<enable>:
0 = disable, 1 = enable.
<monitorAB>:
Monitor A (1) or B (2)
MR-ZOOM &monitor=<monitorAB>
RETURNS: &cameraNumber=<cameraNumber> &value=<zoomFactor>
Returns the camera-number being displayed with matching zoom factor for the specified monitor.
<cameraNumber>:
Camera number, depends on device type. Range 0..(16|9|6). Where zero indicates 'no-camera'. Note that zero might not be applicable for specific commands.
<monitorAB>:
Monitor A (1) or B (2)
<zoomFactor>:
Range 0..2
 0 = Off
 1 = 2x zoom
 2 = 4x zoom
MS-ZOOM &monitor=<monitorA> &value=<zoomFactor>
Sets the zoom factor for the active cameo/camera on the specified monitor (monitor A). Note that when you zoom into a multi-screen the active cameo will be shown full screen, no zoom is performed. This is consistent with front panel behaviour.
<monitorA>:
Monitor A (1) only
<zoomFactor>:
Range 0..2
 0 = Off
 1 = 2x zoom
 2 = 4x zoom
MS-ZOOM-SCROLL &monitor=<monitorA> &value=<direction>
Scrolls the video on the specified monitor (monitor A) in the specified direction when in zoom mode.
<direction>:
Direction range 1..4
 
 1 = Up     3 = Down
 2 = Right  4 = Left
<monitorA>:
Monitor A (1) only

5.5 Sequencing commands

MR-SEQ-DWELL &monitor=<monitorAB>
RETURNS: &dwellTime=<seqTime>
Returns the sequence dwell time for the specified monitor.
<monitorAB>:
Monitor A (1) or B (2)
<seqTime>:
Range 1..60 seconds
MS-SEQ-DWELL &monitor=<monitorAB> &dwellTime=<seqTime>
Sets the sequence dwell time for the specified monitor.
<monitorAB>:
Monitor A (1) or B (2)
<seqTime>:
Range 1..60 seconds
MR-SEQ-ENABLE &monitor=<monitorAB>
RETURNS: &bEnable=<enable>
Returns the setting (enabled/disabled sequencing) for the specified monitor.
<enable>:
0 = disable, 1 = enable.
<monitorAB>:
Monitor A (1) or B (2)
MS-SEQ-ENABLE &monitor=<monitorAB> &bEnable=<enable>
Enables or disables sequencing for the specified monitor.
<enable>:
0 = disable, 1 = enable.
<monitorAB>:
Monitor A (1) or B (2)
MR-SEQ-LIST &monitor=<monitorAB>
RETURNS: &cameraList=<cameraList>
Returns the camera list specified for full screen sequencing on the specified monitor.
<cameraList>:
A comma separated list of '<cameraNumber>'s with a maximum length depending on the display mode.
<monitorAB>:
Monitor A (1) or B (2)
MS-SEQ-LIST &monitor=<monitorAB>[ &cameraList=<cameraList>]
Defines the sequence for full screen mode on the specified monitor.
<cameraList>:
A comma separated list of '<cameraNumber>'s with a maximum length depending on the display mode.
<monitorAB>:
Monitor A (1) or B (2)

5.6 Playback commands

MR-PLAYBACK&
RETURNS: &value=<playSpeed>
Returns the playback speed/mode.
<playSpeed>:
Ranges 0..11
 0 = pause                  6 = backward normal speed
 1 = forward normal speed   7 = backward 3x speed
 2 = forward 3x speed       8 = backward 6x speed
 3 = forward 6x speed       9 = backward 16x speed
 4 = forward 16x speed     10 = backward single step
 5 = forward single step   11 = live
MS-PLAYBACK &value=<playSpeed>[ &date=<date>][ &time=<time>]
Start/stop playback at a given speed, date and time. If date and time are omitted, the action starts/continues at the last playback time. If time only is omitted, midnight of the specified day is assumed.
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
<playSpeed>:
Ranges 0..11
 0 = pause                  6 = backward normal speed
 1 = forward normal speed   7 = backward 3x speed
 2 = forward 3x speed       8 = backward 6x speed
 3 = forward 6x speed       9 = backward 16x speed
 4 = forward 16x speed     10 = backward single step
 5 = forward single step   11 = live
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
MR-RECORDING&
RETURNS: &startDate=<date> &startTime=<time> &endDate=<date> &endTime=<time>
Returns the earliest and latest recording date and time.
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59

5.7 Protected recordings commands

MS-REMOTE-PROTECT &sessionID=<clientNumber> &startTime=<dissTime> &endTime=<dissTime> &clipName=<richString>
RETURNS: &clipReference=<clipReference>
Protect the specified range of video and assign it a name. Note that you should take into account that video at the beginning is constantly being deleted (in continuous mode) and could be deleted between your request for the valid video interval and the time the protect is executed. The same holds for the end of the video, in that it might not be on disk yet, when you want to protect it.
IN: sessionID
The user number or session ID
IN: startTime
Begin time of clip
IN: endTime
End time of clip
IN: clipName
Name to be assigned to the clip
OUT: clipReference
The index value of the clip to be used to delete it
<clientNumber>:
Range 1..6
<clipReference>:
Range 1..32767
<dissTime>:
Number of seconds since midnight 1-1-2000
<richString>:
Eight bit character string which allows for normal ASCII 'letters' and 'digits' plus an escape mechanism for the other characters of the form '\HH' where 'H' is a hexadecimal character value.
MS-AUTOCLIP-MODE &value=<autoClipMode>
Specify what happens if the maximum percentage of auto-protected clips is reached
<autoClipMode>:
Autoprotection clip full mode 0..2
 0 = Warning only.  Overwrite oldest auto-protected clips.
 1 = Stop. Warning displayed and no more events will be autoprotected.
 2 = No warning.  Overwrite oldest auto-protected clips.
MR-AUTOCLIP-MODE&
RETURNS: &autoMode=<autoClipMode>
Return what happens if the maximum percentage of auto-protected clips is reached
<autoClipMode>:
Autoprotection clip full mode 0..2
 0 = Warning only.  Overwrite oldest auto-protected clips.
 1 = Stop. Warning displayed and no more events will be autoprotected.
 2 = No warning.  Overwrite oldest auto-protected clips.
MS-AUTOCLIP-PERIOD &<autoProtectEvTime> &<autoProtectEvTime>
Set period to be protected before and after the event respectively
<autoProtectEvTime>:
Auto protect event before or after time 1..60
MR-AUTOCLIP-PERIOD&
RETURNS: &dwellTime=<autoProtectEvTime> &dwellTime=<autoProtectEvTime>
Return period to be protected before and after the event respectively
<autoProtectEvTime>:
Auto protect event before or after time 1..60
MS-AUTOCLIP-USAGE &value=<autoClipPercentage>
Set maximum auto clip percentage usage
<autoClipPercentage>:
Percentage 1..90
MR-AUTOCLIP-USAGE&
RETURNS: &autoUsage=<autoClipPercentage>
Return maximum auto clip percentage usage
<autoClipPercentage>:
Percentage 1..90
MS-AUTOMAP-INPUT &<autoInput> &<autoSystemInput>
Set up an automap input. If an event occurs on any automap input, video is autoprotected
<autoInput>:
Automap setting index 1..4
<autoSystemInput>:
System input, range 0..16, 0=none
MR-AUTOMAP-INPUT &value=<autoInput>
RETURNS: &systemInput=<autoSystemInput>
Return an automap input setting.
<autoInput>:
Automap setting index 1..4
<autoSystemInput>:
System input, range 0..16, 0=none

5.8 Event commands

MR-ALARM-STATUS&
RETURNS: &inputAlarmMap=<inputMap> &inputTriggerMap=<inputMap>
Returns the input maps of the actual alarm status.
OUT: inputAlarmMap
Inputs which caused a alarm.
OUT: inputTriggerMap
Inputs which caused a trigger. Note that triggers and alarms are exclusive e.g. an alarm (input, motion, videoloss, disk full, failure) will reset all trigger bits.
<inputMap>:
Range 0..65535 (0xFFFF)
IN#  BIT#  DEC  HEX    IN#  BIT#  DEC   HEX
 1    0      1  0001    9    8    256   0100  
 2    1      2  0002    10   9    512   0200
 3    2      4  0004    11   10   1024  0400
 4    3      8  0008    12   11   2048  0800
 5    4     16  0010    13   12   4096  1000
 6    5     32  0020    14   13   8192  2000
 7    6     64  0040    15   14  16384  4000
 8    7    128  0080    16   15  32768  8000
MS-INPUT-STATE &inputMap=<inputMap>
Activate one or more virtual inputs. The virtual inputs activated here are or-ed with the physical inputs to form the current input state.
IN: inputMap
Polarity independent (1 = active; 0 = inactive)
<inputMap>:
Range 0..65535 (0xFFFF)
IN#  BIT#  DEC  HEX    IN#  BIT#  DEC   HEX
 1    0      1  0001    9    8    256   0100  
 2    1      2  0002    10   9    512   0200
 3    2      4  0004    11   10   1024  0400
 4    3      8  0008    12   11   2048  0800
 5    4     16  0010    13   12   4096  1000
 6    5     32  0020    14   13   8192  2000
 7    6     64  0040    15   14  16384  4000
 8    7    128  0080    16   15  32768  8000
MR-INPUT-STATUS&
RETURNS: &inputMap=<inputMap>
Returns the status of the physical inputs or'ed with value set by 'MS-INPUT-STATE'
<inputMap>:
Range 0..65535 (0xFFFF)
IN#  BIT#  DEC  HEX    IN#  BIT#  DEC   HEX
 1    0      1  0001    9    8    256   0100  
 2    1      2  0002    10   9    512   0200
 3    2      4  0004    11   10   1024  0400
 4    3      8  0008    12   11   2048  0800
 5    4     16  0010    13   12   4096  1000
 6    5     32  0020    14   13   8192  2000
 7    6     64  0040    15   14  16384  4000
 8    7    128  0080    16   15  32768  8000
MR-MOTION-STATUS&
RETURNS: &value=<cameraMap> &cameraMap=<cameraMap>
Returns the motion status for all cameras in two camera maps. The first map are cameras in motion alarm status. The second map are cameras with detected motion (trigger).
<cameraMap>:
A bitmap in the range 0..65535/511/63 (0xFFFF/0x01FF/0x003F) depending on the device type (DVR16/9/6), where each bit indicates a true/false (1/0) for the preformed action
CAM  BIT#  DEC  HEX     CAM  BIT#  DEC   HEX
 1    0      1  0001      9   8     256  0100  
 2    1      2  0002     10   9     512  0200
 3    2      4  0004     11   10   1024  0400
 4    3      8  0008     12   11   2048  0800
 5    4     16  0010     13   12   4096  1000
 6    5     32  0020     14   13   8192  2000
 7    6     64  0040     15   14  16384  4000
 8    7    128  0080     16   15  32768  8000
MR-REMOTE-STATUS &sessionID=<clientNumber>
RETURNS: &vidLossMap=<cameraMap> &alarmStatusMap=<cameraMap> &newAlarmStatusMap=<inputMap> &unackAlarmStatusMap=<inputMap> &actionStatusMap=<cameraMap> &newActionStatusMap=<cameraMap> &vidLossAlarmMap=<cameraMap> &newVidLossAlarmMap=<cameraMap> &errorSeverityCode=<severity> &textMessage=<richString> &relayStatus=<outputMap> &relayEnableMap=<outputMap> &ptzLockMap=<cameraMap> &currentDVRTime=<dissTime> &timelineStickyBits=<timelineStickyBits> &dvrIDString=<richString> &inputStatusMap=<inputMap>
Return the status of the device.
IN: sessionID
The user number or session ID
OUT: vidLossMap
Cameras with videoloss active
OUT: alarmStatusMap
Cameras in alarm
OUT: newAlarmStatusMap
Cameras which went into, and maybe out off, alarm since last time this command was issued
OUT: unackAlarmStatusMap
Cameras with alarms unacknowledged past the dwell time
OUT: actionStatusMap
Cameras with motion active
OUT: newActionStatusMap
Cameras which had motion since last time the command was issued.
OUT: vidLossAlarmMap
Cameras in videoloss alarm
OUT: newVidLossAlarmMap
Cameras which had videoloss since last time the command was issued
OUT: errorSeverityCode
Error sevrity code
OUT: textMessage
When severity code != zero this gives the error description in the Divar language.
OUT: relayStatus
Output relay status map
OUT: relayEnableMap
Relay enable map indicating availability for remote control
OUT: ptzLockMap
Map of cameras for which this user is locked out by another from PTZ controlling
OUT: currentDVRTime
Current time
OUT: timelineStickyBits
Sticky bits
OUT: dvrIDString
The identification string
OUT: inputStatusMap
Current open/closed input status
<cameraMap>:
A bitmap in the range 0..65535/511/63 (0xFFFF/0x01FF/0x003F) depending on the device type (DVR16/9/6), where each bit indicates a true/false (1/0) for the preformed action
CAM  BIT#  DEC  HEX     CAM  BIT#  DEC   HEX
 1    0      1  0001      9   8     256  0100  
 2    1      2  0002     10   9     512  0200
 3    2      4  0004     11   10   1024  0400
 4    3      8  0008     12   11   2048  0800
 5    4     16  0010     13   12   4096  1000
 6    5     32  0020     14   13   8192  2000
 7    6     64  0040     15   14  16384  4000
 8    7    128  0080     16   15  32768  8000
<clientNumber>:
Range 1..6
<dissTime>:
Number of seconds since midnight 1-1-2000
<inputMap>:
Range 0..65535 (0xFFFF)
IN#  BIT#  DEC  HEX    IN#  BIT#  DEC   HEX
 1    0      1  0001    9    8    256   0100  
 2    1      2  0002    10   9    512   0200
 3    2      4  0004    11   10   1024  0400
 4    3      8  0008    12   11   2048  0800
 5    4     16  0010    13   12   4096  1000
 6    5     32  0020    14   13   8192  2000
 7    6     64  0040    15   14  16384  4000
 8    7    128  0080    16   15  32768  8000
<outputMap>:
Range 0..15 where each bit position represents an output contact. An enabled bit (1) indicates an active/closed output and a disabled bit (0) indicates an inactive/open output.
OUTPUT   BIT#  DEC   HEX
 1        0     1    0x1
 2        1     2    0x2
 3        2     4    0x4
 4        3     8    0x8
<richString>:
Eight bit character string which allows for normal ASCII 'letters' and 'digits' plus an escape mechanism for the other characters of the form '\HH' where 'H' is a hexadecimal character value.
<severity>:
Error severity code
0 = no error     2 = major error
1 = minor error  3 = severe error
<timelineStickyBits>:
b0 = start or end of recorded video changed
b1 = protected regions changed since last read
MR-VIDEOLOSS-STATUS&
RETURNS: &cameraMap=<cameraMap>
Returns the video loss status for all cameras in the camera map.
<cameraMap>:
A bitmap in the range 0..65535/511/63 (0xFFFF/0x01FF/0x003F) depending on the device type (DVR16/9/6), where each bit indicates a true/false (1/0) for the preformed action
CAM  BIT#  DEC  HEX     CAM  BIT#  DEC   HEX
 1    0      1  0001      9   8     256  0100  
 2    1      2  0002     10   9     512  0200
 3    2      4  0004     11   10   1024  0400
 4    3      8  0008     12   11   2048  0800
 5    4     16  0010     13   12   4096  1000
 6    5     32  0020     14   13   8192  2000
 7    6     64  0040     15   14  16384  4000
 8    7    128  0080     16   15  32768  8000
MR-OUTPUT-STATUS&
RETURNS: &outputMap=<outputMap>
Returns the actual output relay status of the unit.
<outputMap>:
Range 0..15 where each bit position represents an output contact. An enabled bit (1) indicates an active/closed output and a disabled bit (0) indicates an inactive/open output.
OUTPUT   BIT#  DEC   HEX
 1        0     1    0x1
 2        1     2    0x2
 3        2     4    0x4
 4        3     8    0x8
MS-ALARM-CLEAR&
Acknowledges all alarms.
MS-REMOTE-ALARM-CLEAR&
Clears the alarm status of the DVR.
MS-REMOTE-RELAY-STATE &sessionID=<userNumber> &relayNumber=<outputNumber> &bActive=<enable>
Activate or de-activate the requested output relay. Note that you can only control a relay when you are allowed to and the relay is not assigned otherwise e.g. not used for alarm, motion, videoloss or disk full notifictaion. Next to that relay 4 is reserved for system failure and can never be assigned either.
<enable>:
0 = disable, 1 = enable.
<outputNumber>:
Range 0..4 where 0 = 'no output'
<userNumber>:
Range 1..6

5.9 History commands

When using the History commands, the following way of working should be followed:
o Use the MS_HISTORY_FILTER command to set the history filter
o Use the MS_HISTORY_START command to start the history search
o Use the MR_HISTORY_NEXT command to view the first results (0..5)
o Use the MR_HISTORY_NEXT command again to view the next results (0..5)
Logging is done provided that the log catagories are enabled on the unit.
When the real date or time is changed using the local menu or a remote connection, both the old date/time and new date/time are stored into the history list.
MR-HISTORY-FILTER&
RETURNS: &startDate=<date> &startTime=<time> &endDate=<date> &endTime=<time> &bEnableAlarm=<enable> &bEnableMotion=<enable> &bEnableNetwork=<enable> &bEnableError=<enable>
Reads the history filter settings.
Note that an enabled category is included in the result, while a disabled category is excluded.
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
<enable>:
0 = disable, 1 = enable.
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
MS-HISTORY-FILTER &startDate=<date> &startTime=<time> &endDate=<date> &endTime=<time> &bEnableAlarm=<enable> &bEnableMotion=<enable> &bEnableNetwork=<enable> &bEnableError=<enable>
A filter can be used to limit the displayed history items; a begin- and end-time can be set. By default the begin- and end-time are set to the earliest- and latest-logged events and all events will be returned.
Note that enabling a category includes log entries of that category it the result. Disabling a category will remove log entries of that category.
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
<enable>:
0 = disable, 1 = enable.
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
MR-HISTORY-INFO&
RETURNS: &startDate=<date> &startTime=<time> &endDate=<date> &endTime=<time>
Returns the earliest- and latest-logged events.
OUT: startDate
Begin date
OUT: startTime
Begin time
OUT: endDate
End date
OUT: endTime
End time
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
MR-HISTORY-NEXT&
RETURNS: &searchDone=<boolean> &date=<date> &time=<time> &eventType=<eventType> &number=<byte>
History events are sorted time descending. The newest event is placed on top of the history list and the oldest event is placed at the bottom of the list.
MR-HISTORY-NEXT searches for events matching the criteria set in MS_HISTORY_FILTER. The search terminates when 200 events have been searched or five matches have been found, whichever is sooner.
If the first parameter 'searchDone' in the reply is false, the rest of the reply may contain between zero and five sets of return parameters. If the number of sets is less than five it does not indicate that there are no more matching events to be found, but that the search limit of 200 events per execution has been reached.
When the history list has been completely searched, subsequent executions will return a single 'searchDone' parameter with value true.
<boolean>:
0 = False, No, Off, Disabled
1 = True, Yes, On, Enabled
<byte>:
Eight bit positive numeric value range 0..255
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
<eventType>:
The following lists the event numbers. It also indicates between square brackets if and what the event data field indicates.
 0 = Power on [reset reason]
 1 = Defaults
 2 = Login [#user]
 3 = Logout [#user]
 4 = Alarm [#input0]
 5 = Motion [#camera]
 6 = Vidoloss [#camera]
 7 = Internal disk error [#ide device]
 8 = Fatal disk error
 9 = External disk error [#scsi device]
10 = Hardware adv error
11 = Hardware ethernet error
12 = Hardware codec error
13 = Time change
14 = Date change
15 = Start recording
16 = Stop recording
17 = Profile change [#profile]
18 = Disk full
19 = Fan fail
20 = Clear history
21 = Erase disk
22 = Delete video
23 = Disk full warning
24 = Record time left warning
25 = Record recover
Divar 2.0 additions
 26 = Time server connection lost
 27 = Time server connection restored
 28 = Writer defect
 29 = Bridge communication failed [#bridge]
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
MR-HISTORY-SIZE&
RETURNS: &historySize=<numeric>
Returns the number of events in the history.
OUT: historySize
Number of history events
<numeric>:
Numeric value of the following syntax:
<numeric> := [<sign>][0<radix>]<digit>+
<sign>    := + | -
<radix>   := 'b' (binary) | 'd' (decimal)| 'x' (hexdecimal)
MS-HISTORY-START&
Starts the history search with the active history-filter.

5.10 Disk manager commands

MR-DISK-STATUS&
RETURNS: &diskMap=<diskMap> &diskEnableMap=<diskMap> &totalDiskSize=<diskSize> &recordingTimeLeft=<recordingTimeLeft>
Returns the disk status.
<diskMap>:
Range 0..0x7FFF where the value in each table position corresponds to a specific 'diskNumber'
 DISK   BIT#   DEC   HEX
IDE 1     0      1  0001
IDE 2     1      2  0002
unused  2-7
SCSI 0    8    256  0100
SCSI 1    9    512  0200
SCSI 2   10   1024  0400
SCSI 3   11   2048  0800
SCSI 4   12   4096  1000
SCSI 5   13   8192  2000
SCSI 6   14  16384  4000
<diskSize>:
Range 0..17000 GByte
<recordingTimeLeft>:
Hours left to record with the following special values:
0    = disk full (linear recording) or
       protected against overwrite (continious recording)    
8760 = not recording
MR-REMOTE-DISK-STATS&
RETURNS: &protectedPercent=<numeric> &recordingPercent=<numeric> &totalDiskSize=<numeric> &usedDiskSpace=<numeric>
Returns the percentage of disk used for protected and regular recordings
OUT: protectedPercent
Value from 0..100 representing the percent of disk used for protected recording.
OUT: recordingPercent
Value 0..100 representing the percent of disk used for all recording, including protective recording.
OUT: totalDiskSize
Total disk size in GB.
OUT: usedDiskSpace
Amount of disk that is currently used, in GB.
<numeric>:
Numeric value of the following syntax:
<numeric> := [<sign>][0<radix>]<digit>+
<sign>    := + | -
<radix>   := 'b' (binary) | 'd' (decimal)| 'x' (hexdecimal)
MR-REMOTE-VIDEO-INTERVAL&
RETURNS: &startTime=<dissTime> &endTime=<dissTime> &deletionTime=<dissTime>
Get the start and end-time of all recorded video, including protected video. While there is no data on disk yet the video start time is unknown and hence triple zero is returned.
OUT: startTime
Start of all video on disk
OUT: endTime
Latest video on disk
OUT: deletionTime
Last point where video was deleted from disk, either by normal disk overwrite or by manual deletion
<dissTime>:
Number of seconds since midnight 1-1-2000
MS-VIDEO-DELETE &value=<date> &time=<time>
Deletes video from earliest recording up to the specified date and time.
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
MS-REMOTE-DELETE-VIDEO &deletionPoint=<dissTime>
Deletes all video before the specified deletion time
IN: deletionPoint
Deletion time
<dissTime>:
Number of seconds since midnight 1-1-2000

5.11 Local Archiving commands

When using the Local Archiving commands, the following way of working should be followed:
o Insert the medium to archive on
o Use the MR_LOCARCH_STATUS command to check that the medium is seen and to get the writer/medium info
o Use repeatedly the MS_LOCARCH_LIST_ADD command to add a clip to archive
o Use the MR_LOCARCH_LIST_INFO command to retrieve info about the archive list and check if the clips will fit on the medium
o Use (optional) the MS_LOCARCH_LIST_REMOVE command to remove a clip for archiving
o Use (optional) the MS_LOCARCH_LIST_CLEAR command to clear the entire archive list
o Use (optional) the MS_LOCARCH_ERASE command to erase the medium
o Use the MS_LOCARCH_START command to start archiving
o Use the MR_LOCARCH_PROGRESS command to get the progress
o Use (optional) the MS_LOCARCH_CANCEL command to cancel the archive session. This may result in an unusable medium.
MR-LOCARCH-STATUS&
RETURNS: &writerStatus=<writerStatus> &mediumStatus=<mediumStatus> &archiveState=<archiveState> &isFinalized=<boolean> &containsData=<boolean> &freeSpace=<numeric>
Get local archiving status: writer status, medium status, archive state, medium finalized, contains other data (medium not written by Divar), free space
<archiveState>:
Archive state
0 = idle                          6 = finalizing
1 = calculation estimated size    7 = blanking
2 = setup burning                 8 = formatting
3 = calculation exact size        9 = test
4 = burning                       10 = archiving done
5 = closing session               11 = archiving failed
<boolean>:
0 = False, No, Off, Disabled
1 = True, Yes, On, Enabled
<mediumStatus>:
Medium status
0 = no medium     4 = dvd
1 = cd            5 = dvdr
2 = cdr           6 = dvdrw
3 = cdrw
<numeric>:
Numeric value of the following syntax:
<numeric> := [<sign>][0<radix>]<digit>+
<sign>    := + | -
<radix>   := 'b' (binary) | 'd' (decimal)| 'x' (hexdecimal)
<writerStatus>:
Writer status
0 = writer not present
1 = writer fail
2 = writer ok
MR-LOCARCH-PROGRESS&
RETURNS: &progressPercent=<numeric>
Get local archiving progress
<numeric>:
Numeric value of the following syntax:
<numeric> := [<sign>][0<radix>]<digit>+
<sign>    := + | -
<radix>   := 'b' (binary) | 'd' (decimal)| 'x' (hexdecimal)
MS-LOCARCH-ERASE&
Erase medium
Note: The archive state should be idle otherwise this command is ignored
MS-LOCARCH-LIST-ADD &startTime=<dissTime> &endTime=<dissTime>
Add a video clip to archive (local) defined by its (diss) begin/end time
Note: it can take some time (until 5 seconds) before the (estimated) size is calculated and the clip is added to the archive list
The archive list is sorted on start time, begin time
IN: startTime
Begin time
IN: endTime
End time
<dissTime>:
Number of seconds since midnight 1-1-2000
MS-LOCARCH-LIST-REMOVE &value=<numeric>
Remove clip from archive list
The archive list remains sorted after removal of clip
IN: value
Entry number
<numeric>:
Numeric value of the following syntax:
<numeric> := [<sign>][0<radix>]<digit>+
<sign>    := + | -
<radix>   := 'b' (binary) | 'd' (decimal)| 'x' (hexdecimal)
MS-LOCARCH-LIST-CLEAR&
Clear the local archive list
Note: The archive state should be idle otherwise this command is ignored
MR-LOCARCH-LIST-INFO&
RETURNS: &numEntries=<numeric> &entriesRemoved=<boolean> &totalSize=<numeric>
Get the archive list info: The number of entries, entries removed, and the total size is returned.
If the entriesRemoved flag is set then one of the clips in the archive list is removed because the video is deleted
The total size is in Mb
<boolean>:
0 = False, No, Off, Disabled
1 = True, Yes, On, Enabled
<numeric>:
Numeric value of the following syntax:
<numeric> := [<sign>][0<radix>]<digit>+
<sign>    := + | -
<radix>   := 'b' (binary) | 'd' (decimal)| 'x' (hexdecimal)
MR-LOCARCH-LIST-ENTRY &value=<numeric>
RETURNS: &startTime=<dissTime> &endTime=<dissTime> &size=<numeric>
Get the archive list entry Passing a valid entry number the begin/end time and the size of the video clip is returned
Note: The list is sorted on start time, end time of the clips
Valid entry number range is 0.."number of entries" - 1
The size is in Mb
<dissTime>:
Number of seconds since midnight 1-1-2000
<numeric>:
Numeric value of the following syntax:
<numeric> := [<sign>][0<radix>]<digit>+
<sign>    := + | -
<radix>   := 'b' (binary) | 'd' (decimal)| 'x' (hexdecimal)
MS-LOCARCH-START&
Start local archiving
MS-LOCARCH-CANCEL&
Cancel local archiving

5.12 General commands

MR-ADDRESS&
RETURNS: &dvrID=<unitAddress>
Returns the units address
<unitAddress>:
Range 1..30
MR-MODEL-NUMBER&
RETURNS: &value=<modelNumber>
Returns the unit model number string.
<modelNumber>:
The model number depends on the number of channels present
DVR6E  =  6 channels
DVR9E  =  9 channels
DVR16E = 16 channels
MR-REMOTE-DVR-ID-STRING&
RETURNS: &dvrIDString=<richString>
Returns the DVR name string.
<richString>:
Eight bit character string which allows for normal ASCII 'letters' and 'digits' plus an escape mechanism for the other characters of the form '\HH' where 'H' is a hexadecimal character value.
MR-USERS-LOGGED-IN&
RETURNS: &userList=<userList>
Returns a list of users who are logged into the Divar.
<userList>:
A comma separated list of '<userNumber>'s
BEEP-CONSOLE&
Activates the beeper for a small period of time.
DATE&
RETURNS: &date=<date>
Displays the system date.
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
SET-DATE &date=<date>
Sets the Divar date in the system.
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
REVISION&
RETURNS: &value=<revisionNumber>
Returns the revision number.
<revisionNumber>:
For release versions of the firmware the syntax is as follows
 <release>(<build>)/<date>/<build>/<fpga-version>
For development versions the syntax is slightly different
 <frontend-build>(<release>)/<date>/<backend-build>/<fpga-version>
MR-WEBSET-REVISION&
RETURNS: &version=<websetRevision> &date=<date> &time=<time> &description=<string>
Reports the webset revision, date and time created, and description
<date>:
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
<string>:
ASCII text string
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
<websetRevision>:
For release versions of the webset the syntax is as follows
 <major>.<minor>
For development versions the syntax is slightly different
 E<major>.<minor>.<engineering revision>
If no webset is found, the version is displayed as "No webset found"
TIME&
RETURNS: &time=<time>
Displays the system time.
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
SET-TIME &time=<time>
Sets the Divar time in the system.
<time>:
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
TIME-SYNCH&
Synchronize (broadcast) time to all devices on the RS485 channel.

A Type definitions

This appendix gives an alphabetical list of CCL type definitions
Archive state
0 = idle                          6 = finalizing
1 = calculation estimated size    7 = blanking
2 = setup burning                 8 = formatting
3 = calculation exact size        9 = test
4 = burning                       10 = archiving done
5 = closing session               11 = archiving failed
0 = live, 1 = playback
Autoprotection clip full mode 0..2
 0 = Warning only.  Overwrite oldest auto-protected clips.
 1 = Stop. Warning displayed and no more events will be autoprotected.
 2 = No warning.  Overwrite oldest auto-protected clips.
Percentage 1..90
Automap setting index 1..4
Auto protect event before or after time 1..60
System input, range 0..16, 0=none
Auxilary value, range 0..1023
Data value. Range 0..0xF
Camera reference, depends on camera offset and device type (DVR16/9/6). Ranges from '<camOffset>' (see 'MR-CAM-NUMBER') to '<camOffset>'+(16|9|6)-1
Operation code. Range 0..0xF
Left/right pan speed. Ranges from slow to fast, 0..15 (0..0xF)
Up/down tilt speed. Ranges from slow to fast, 0..15 (0..0xF)
Zoom in/out. Ranges from slow to fast, 0..7 (0..0x7)
0 = False, No, Off, Disabled
1 = True, Yes, On, Enabled
Eight bit positive numeric value range 0..255
Camera number of first camera input. Range 1..984.
Cameo number depends on '<displayMode>'. Range 1..maxCameo(displayMode). For example a 'Quad' display mode has 4 cameos, where a '8+2' has 10.
A comma separated list of '<cameraNumber>'s with a maximum length depending on the display mode.
A bitmap in the range 0..65535/511/63 (0xFFFF/0x01FF/0x003F) depending on the device type (DVR16/9/6), where each bit indicates a true/false (1/0) for the preformed action
CAM  BIT#  DEC  HEX     CAM  BIT#  DEC   HEX
 1    0      1  0001      9   8     256  0100  
 2    1      2  0002     10   9     512  0200
 3    2      4  0004     11   10   1024  0400
 4    3      8  0008     12   11   2048  0800
 5    4     16  0010     13   12   4096  1000
 6    5     32  0020     14   13   8192  2000
 7    6     64  0040     15   14  16384  4000
 8    7    128  0080     16   15  32768  8000
Camera number, depends on device type. Range 0..(16|9|6). Where zero indicates 'no-camera'. Note that zero might not be applicable for specific commands.
Range 1..6
Range 1..32767
Year, month, day specification specified as YYYY-MM-DD with 2000 <= YYYY <= 2096, 1 <= MM <= 12 and DD depending on the specified year and month, 1<= DD <= (28|29|30|31)
Direction range 1..4
 
 1 = Up     3 = Down
 2 = Right  4 = Left
Range 0..0x7FFF where the value in each table position corresponds to a specific 'diskNumber'
 DISK   BIT#   DEC   HEX
IDE 1     0      1  0001
IDE 2     1      2  0002
unused  2-7
SCSI 0    8    256  0100
SCSI 1    9    512  0200
SCSI 2   10   1024  0400
SCSI 3   11   2048  0800
SCSI 4   12   4096  1000
SCSI 5   13   8192  2000
SCSI 6   14  16384  4000
Range 0..17000 GByte
Valid modes depend on the device and settings e.g. is a display mode enabled for selection.
 0 = Disabled     4 = Quad 3      8 = 12 + 1 Multi
 1 = Full screen  5 = Quad 4      9 = 8 + 2 Multi
 2 = Quad 1       6 = 4x4 Multi  10 = 4 + 3 Multi
 3 = Quad 2       7 = 3x3 Multi  11 = 5 + 1 Multi
Number of seconds since midnight 1-1-2000
0 = disable, 1 = enable.
The following lists the event numbers. It also indicates between square brackets if and what the event data field indicates.
 0 = Power on [reset reason]
 1 = Defaults
 2 = Login [#user]
 3 = Logout [#user]
 4 = Alarm [#input0]
 5 = Motion [#camera]
 6 = Vidoloss [#camera]
 7 = Internal disk error [#ide device]
 8 = Fatal disk error
 9 = External disk error [#scsi device]
10 = Hardware adv error
11 = Hardware ethernet error
12 = Hardware codec error
13 = Time change
14 = Date change
15 = Start recording
16 = Stop recording
17 = Profile change [#profile]
18 = Disk full
19 = Fan fail
20 = Clear history
21 = Erase disk
22 = Delete video
23 = Disk full warning
24 = Record time left warning
25 = Record recover
Divar 2.0 additions
 26 = Time server connection lost
 27 = Time server connection restored
 28 = Writer defect
 29 = Bridge communication failed [#bridge]
Input number, range 0..16 where 0 = 'no input'
Range 0..65535 (0xFFFF)
IN#  BIT#  DEC  HEX    IN#  BIT#  DEC   HEX
 1    0      1  0001    9    8    256   0100  
 2    1      2  0002    10   9    512   0200
 3    2      4  0004    11   10   1024  0400
 4    3      8  0008    12   11   2048  0800
 5    4     16  0010    13   12   4096  1000
 6    5     32  0020    14   13   8192  2000
 7    6     64  0040    15   14  16384  4000
 8    7    128  0080    16   15  32768  8000
Key mnemonic range 1..38
 1 = live         14 = key 5   26 = F1
 2 = search       15 = key 6   27 = F2
 3 = rewind       16 = key 7   28 = left
 4 = freeze       17 = key 8   29 = up
 5 = playback     18 = key 9   30 = down
 6 = forward      19 = key 10  31 = right
 7 = acknowledge  20 = key 11  32 = select
 8 = multi        21 = key 12  33 = escape
 9 = alt          22 = key 13  34 = menu
10 = key 1        23 = key 14  35 = monitor A
11 = key 2        24 = key 15  36 = monitor B
12 = key 3        25 = key 16  37 = sequence
13 = key 4                     38 = zoom
String representation of the status for the 36 front panel LEDs. Each character represents the status of an individual LED according to the following encoding.
0 = Off        4 = unused
1 = On green   5 = Flashing green
2 = On red     6 = Flashing red
3 = On yellow  7 = Flashing yellow
The order of the LEDs follows the layout on the front panel as close as possible and is defined as follows.
1 = Live         10 = Below-Alt   19 = Sequence  28 = 8
2 = Search       11 = Record      20 = Zoom      29 = 9
3 = Rewind       12 = Network     21 = 1         30 = 10
4 = Freeze       13 = Alarm       22 = 2         31 = 11
5 = Play         14 = Motion      23 = 3         32 = 12
6 = Forward      15 = Video loss  24 = 4         33 = 13
7 = Acknowledge  16 = Menu        25 = 5         34 = 14
8 = Multi        17 = Monitor-A   26 = 6         35 = 15
9 = Alt          18 = Monitor-B   27 = 7         36 = 16
Medium status
0 = no medium     4 = dvd
1 = cd            5 = dvdr
2 = cdr           6 = dvdrw
3 = cdrw
The model number depends on the number of channels present
DVR6E  =  6 channels
DVR9E  =  9 channels
DVR16E = 16 channels
Monitor A (1) only
Monitor A (1) or B (2)
Numeric value of the following syntax:
<numeric> := [<sign>][0<radix>]<digit>+
<sign>    := + | -
<radix>   := 'b' (binary) | 'd' (decimal)| 'x' (hexdecimal)
Range 0..15 where each bit position represents an output contact. An enabled bit (1) indicates an active/closed output and a disabled bit (0) indicates an inactive/open output.
OUTPUT   BIT#  DEC   HEX
 1        0     1    0x1
 2        1     2    0x2
 3        2     4    0x4
 4        3     8    0x8
Range 0..4 where 0 = 'no output'
Ranges 0..11
 0 = pause                  6 = backward normal speed
 1 = forward normal speed   7 = backward 3x speed
 2 = forward 3x speed       8 = backward 6x speed
 3 = forward 6x speed       9 = backward 16x speed
 4 = forward 16x speed     10 = backward single step
 5 = forward single step   11 = live
Range 0..1023
Variable speed function code according to following table
Function    HEX    DEC
All off     0x000    0
Pan right   0x001    1
Pan left    0x002    2
Tilt down   0x004    4
Tilt up     0x008    8
Zoom out    0x010   16
Zoom in     0x020   32
Focus near  0x040   64
Focus far   0x080  128
Iris close  0x100  256
Iris open   0x200  512
Hours left to record with the following special values:
0    = disk full (linear recording) or
       protected against overwrite (continious recording)    
8760 = not recording
For release versions of the firmware the syntax is as follows
 <release>(<build>)/<date>/<build>/<fpga-version>
For development versions the syntax is slightly different
 <frontend-build>(<release>)/<date>/<backend-build>/<fpga-version>
Eight bit character string which allows for normal ASCII 'letters' and 'digits' plus an escape mechanism for the other characters of the form '\HH' where 'H' is a hexadecimal character value.
Range 1..60 seconds
Error severity code
0 = no error     2 = major error
1 = minor error  3 = severe error
ASCII text string
Hour, minute, seconds specification specified as HH:MM:SS where 0 <= HH <= 24, 0 <= MM <= 59 and 0 <= SS <= 59
b0 = start or end of recorded video changed
b1 = protected regions changed since last read
Range 1..30
A comma separated list of '<userNumber>'s
Range 1..6
For release versions of the webset the syntax is as follows
 <major>.<minor>
For development versions the syntax is slightly different
 E<major>.<minor>.<engineering revision>
If no webset is found, the version is displayed as "No webset found"
Writer status
0 = writer not present
1 = writer fail
2 = writer ok
Range 0..2
 0 = Off
 1 = 2x zoom
 2 = 4x zoom