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

API (Application programming interface)

$
0
0

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

1. 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

2. 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