Quantcast
Channel: Manual & FAQ
Viewing all articles
Browse latest Browse all 31

Command line options and API (Application programming interface)

$
0
0

Here are explained the ways to control ContaCam without the user interface. The APIs 2. and 3. are also working in service mode because they use the registry/ini file/trigger file to communicate with the running instance.

1. Command line options (not working in service mode)

All command line options are case sensitive, file names are not:

  • /play "Audio File Name"
    to start playing an audio file.
    Note: if no full path is specified the file must reside in the same directory as the program (not the current directory).
  • /close
    to close the program right after audio playing is done.
  • /hide
    used to hide the program window while playing an audio file (use this switch together with the /play and the /close switches).

The following .bat file could be executed on movement detection, it would bring the ContaCam window in foreground and play a sound:

@echo off
START "" "C:\Program Files (x86)\ContaCam\ContaCam.exe"
START "" "C:\Program Files (x86)\ContaCam\ContaCam.exe" /hide /close /play "C:\sounds\ring.wav"

2. Change detection mode (or enable/disable movement detection)

The detection mode is regularly polled by ContaCam. If the settings are stored in an ini file then modify VideoProcessorMode under your CAMERA_ADDR section. When using the registry the wanted path is:

HKEY_CURRENT_USER\Software\Contaware\ContaCam\CAMERA_ADDR\VideoProcessorMode

CAMERA_ADDR

is a long hardware address for USB/DV/PCI devices and the network address plus port and mode for IP cameras (do not invent those addresses, just get them from the ini file or registry)

VideoProcessorMode

0: detection off

1: both trigger file + software detection on

To turn off the motion detection for all your cameras the following .bat file can be used:

REGEDIT4
; @ECHO OFF
; CLS
; REGEDIT.EXE /S "%~f0"
; EXIT
[HKEY_CURRENT_USER\Software\Contaware\ContaCam\CAMERA_ADDR1]
"VideoProcessorMode"=dword:00000000
[HKEY_CURRENT_USER\Software\Contaware\ContaCam\CAMERA_ADDR2]
"VideoProcessorMode"=dword:00000000
[HKEY_CURRENT_USER\Software\Contaware\ContaCam\CAMERA_ADDRX]
"VideoProcessorMode"=dword:00000000

3. Trigger a movement detection

It's possible to trigger a movement detection by writing something to movtrigger.txt in your camera's folder. ContaCam polls the modified time of the mentioned file and triggers a movement on change. See the movtrigger.bat file in your camera's folder:

@echo off
SET batchdir=%~dp0
echo PIR detection: %date% %time% > "%batchdir%movtrigger.txt"

By adapting the DetectionTriggerFileName entry in registry or ini file it's possible to change the trigger file name from the default of movtrigger.txt to something else. To also change the location from the default of the camera's folder, provide a full path name in DetectionTriggerFileName.

Trigger File mode is enabled by:

  1. Choosing Det ON
  2. Optionally setting the Detection Sensitivity to 0
  3. Configuring the Drop detections shorter than to 0 seconds

triggerfile config


Viewing all articles
Browse latest Browse all 31

Trending Articles