There's a python wrapper for basic UI functionality here: agent-py .
You can open Agent to a specific view by calling the Agent DVR url with (case sensitive):
- ?start=Live&viewIndex=3 (live view on view 3)
- ?start=TimeMachine (timemachine view)
- ?start=TimeLine (timeline view)
- ?start=Photos (photos view)
- ?start=Recordings (recordings view)
- ?start=Floorplans&planIndex=2 (floorplans view on plan 2)
- ?start=VR (virtual reality)
You can open Agent DVR with a specific language (bypassing the language selection). Just pass in the 2 letter language code: ?lang=fr
Set default theme options (theme options are available in the account menu - theme settings):
Auto play audio on load (may also require changing browser settings):
Start in minimised mode (top and bottom UI bars hidden):
Pass in local username and password for auto login (caution - this will expose your credentials to the network):
To access Commands in Agent DVR, click on the Server icon at the top left of the Agent UI, and select "Commands" under System. A quick shortcut is to press "C".
Agent DVR includes several pre-built commands that can control multiple devices simultaneously. These commands utilize the API to perform various tasks. You have the flexibility to add your own custom commands for calling the API or running software on your computer.
Calling a Script File
To execute a generic script file, simply add a .bat file (or .sh file on Linux/OSX) to the commands directory. The script's filename (without the extension) will appear in the Commands list and can be clicked to run. Note: You might need to reload the UI for it to appear.
Calling the API
Create a new .bat file in the Commands folder where Agent is installed. The first line should be:
This line indicates that the file should be processed internally by Agent, not executed as a standalone application.
The subsequent lines are interpreted as commands for the Agent's API. For instance:
broadcast 'external cameras are on and recording'
These commands are appended to API calls in the format /command.cgi?cmd=.... Thus, you can use any command available in the API.
The example commands above will activate all devices labeled as "external", deactivate all "internal" devices, start recording on "external" devices, and send a broadcast message to all connected clients.
Refer to the readme command button for examples and the API documentation for a list of available commands.
After reloading the UI and pressing "C", your new command should be visible in the list. Click on it to execute.
From version 220.127.116.11+, you can use location names in commands (e.g., switchon&location=home). Just assign a location to your devices first!
From version 18.104.22.168, Agent DVR offers Amazon Alexa integration. This feature allows you to control Agent DVR using voice commands through Alexa-enabled devices. You can arm or disarm the system or display live video feeds on Alexa Show devices.
To set it up, select 'Alexa' under Integrations in the Server menu of Agent DVR. This redirects you to Amazon for linking your accounts.
Once linked, run Alexa's discovery process. It should find two devices: the security panel and the camera control.
Now you can use voice commands like:
- "Alexa, arm Agent in home mode"
- "Alexa, show Agent camera"
Set your security code in Agent Settings for operations requiring authentication. The default code is 1234.
The Alexa profiles (Home / Away / Night) match those in Agent DVR. Configure them in Server - Profiles.
For multiple servers, set a server name in settings and use it in voice commands.
Agent DVR fully integrates with Home Assistant, allowing you to add Agent DVR into your Home Assistant setup. Embed the Agent DVR panel in the lovelace UI or select individual cameras. It also includes a control for the main security panel. For more information, see the Home Assistant link under Server - Integrations.
IFTTT lets you set up actions and triggers with IoT devices. Start by linking your IFTTT account with iSpyConnect.com, accessible under Server - Integrations.
Setting up mobile push alerts is detailed at Setting up Push Alerts.
Connect Agent DVR with the Telegram chatbot for control and live alert notifications. Enable Push notifications in device settings for live alerts. Begin by selecting the Telegram button under the Server icon in the remote web interface.