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. 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 ON the motion detection for all your cameras the following .bat file can be used:

@echo off
reg add "HKCU\Software\Contaware\ContaCam\CAMERA_ADDR1" /t REG_DWORD /v VideoProcessorMode /d 1 /f
reg add "HKCU\Software\Contaware\ContaCam\CAMERA_ADDR2" /t REG_DWORD /v VideoProcessorMode /d 1 /f
reg add "HKCU\Software\Contaware\ContaCam\CAMERA_ADDRX" /t REG_DWORD /v VideoProcessorMode /d 1 /f

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

@echo off
reg add "HKCU\Software\Contaware\ContaCam\CAMERA_ADDR1" /t REG_DWORD /v VideoProcessorMode /d 0 /f
reg add "HKCU\Software\Contaware\ContaCam\CAMERA_ADDR2" /t REG_DWORD /v VideoProcessorMode /d 0 /f
reg add "HKCU\Software\Contaware\ContaCam\CAMERA_ADDRX" /t REG_DWORD /v VideoProcessorMode /d 0 /f

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 activated by:

  1. Enabling Movement Detection in bottom toolbar
  2. Optionally setting the Detection Sensitivity to 0
  3. Configuring the Drop detections shorter than to 0 seconds

triggerfile config