Agentdvr Api __link__ Guide

import requests snapshot = requests.get("http://localhost:8090/video/1/snapshot") bot_token = "YOUR_BOT_TOKEN" chat_id = "YOUR_CHAT_ID" files = "photo": ("alert.jpg", snapshot.content) requests.post(f"https://api.telegram.org/botbot_token/sendPhoto?chat_id=chat_id", files=files) Using Node-RED or ESPHome: when a magnetic door sensor opens, send:

http://localhost:8090/file/CAMERA_NUM/path/to/recording.mp4 ✅ 1. Home Assistant Integration Add this to your configuration.yaml : agentdvr api

http://localhost:8090/list/CAMERA_NUM?year=2024&month=3&day=15 This returns JSON with file paths and timestamps. You can then download a file using: import requests snapshot = requests

# Start recording on camera 2 curl "http://localhost:8090/video/2/record?1" curl "http://localhost:8090/video/1/snapshot" --output snapshot.jpg Trigger a manual alert on camera 3 curl "http://localhost:8090/video/3/alert" 2. System Commands | Action | API Endpoint | |--------|---------------| | Get system status | /status | | List all cameras | /get cameras | | List recent events | /events?limit=10 | | Reboot Agent DVR | /shutdown (use with caution) | 3. Retrieving Recordings To get a list of recordings for a specific camera: System Commands | Action | API Endpoint |