[SOLVED] need help controlling Agent DVR from command line

mmoalem

n3wb
Joined
Jul 24, 2021
Messages
3
Reaction score
2
Location
london
HI all - new here - just setting up my first CCTV setup using agentDVR on a windows machine - figured out most of it but cant get command line commands to work. the online help seems to refer to ispy and the commands in the default commands folder dont seem to work either.

I need commands that switch a single camera on and off. The reason I need it is that I have an autoit script that pings my phone on my home network IP address - if it gets response (i.e. I'm home) it turn off the camera inside the house. If it doesnt get response it turns camera on.
 

TonyR

IPCT Contributor
Joined
Jul 15, 2014
Messages
16,451
Reaction score
38,164
Location
Alabama
I don't use Agent DVR, but suggest you try this ==>> Agent DVR API

Down on lines 10 & 11 I see commands such as:
  • command.cgi?oid=1&ot=2&cmd=alert : Trigger alert on the device. You can use any command (cmd) from: alert, detect, recordOnAlertOn, recordOnDetectOn, recordingOff, record, recordStop, alertOn/Off, snapshot, switchOn/Off, ftpPhotosOn/Off, ftpRecordingsOn/Off, cloudPhotosOn/Off, cloudRecordingsOn/Off, saveLocalOn/Off, applyScheduleToDevice, scheduleOn/Off
  • command.cgi?group=upstairs&cmd=switchOff - apply the switch off command to all devices in the group upstairs. Specify the group on the device under "Groups" on the General tab.
So you have installed it according to the instructions and are attempting to access via HTTP at
Code:
http://localhost:8090
?

EDIT: maybe your reddit post will bear some fruit for you.
 
Last edited:

mmoalem

n3wb
Joined
Jul 24, 2021
Messages
3
Reaction score
2
Location
london
thanks but doesnt work - this is what I get trying it:

Code:
C:\Program Files\Agent>command.cgi?oid=1&ot=2&cmd=switchOn
'command.cgi?oid' is not recognized as an internal or external command,
operable program or batch file.
'ot' is not recognized as an internal or external command,
operable program or batch file.
Microsoft Windows [Version 10.0.19042.1110]
(c) Microsoft Corporation. All rights reserved.

C:\Program Files\Agent>Agent.exe command.cgi?oid=1&ot=2&cmd=switchOn
'ot' is not recognized as an internal or external command,
operable program or batch file.
Microsoft Windows [Version 10.0.19042.1110]
(c) Microsoft Corporation. All rights reserved.
 
Top