Supported Models
AgenticEye supports all UniFi Protect cameras that expose RTSP streams. The models above have been verified and optimized for the best experience.
Prerequisites
- A UniFi Protect application running on a UniFi Dream Machine Pro, Cloud Key Gen2 Plus, or Network Video Recorder (UNVR)
- UniFi Protect version 2.0+ (for RTSP support)
- A local admin account on the UniFi Protect controller
- Network access from the AgenticEye server to the UniFi Protect host on port 7447
- AgenticEye agent installed and configured (v1.0+)
Important: RTSP is disabled by default on all UniFi Protect cameras. You must explicitly enable it per-camera in the UniFi Protect settings before AgenticEye can connect.
Step-by-Step Integration
Enable RTSP in UniFi Protect
Open the UniFi Protect web interface or mobile app. Navigate to the camera you want to connect, then go to Settings > Advanced. Toggle on Enable RTSP Stream. Select your desired stream quality — we recommend the High quality stream for AI analysis.
Protect > Devices > [Camera] > Settings > Advanced > RTSP
Enable: High Quality Stream (recommended for AI analytics)
Enable: Medium Quality Stream (optional, for secondary feeds)
Enable: Low Quality Stream (optional, for preview thumbnails)
Locate the Camera RTSP Stream URL
Once RTSP is enabled, UniFi Protect generates a unique RTSP URL for each camera. You can find this URL in the camera's settings under the RTSP section. The URL follows this format:
# Standard RTSP URL
rtsp://[NVR-IP]:7447/[camera-id]
# Example with a real camera ID
rtsp://192.168.1.10:7447/abcdef1234567890
# If authentication is required
rtsp://[username]:[password]@[NVR-IP]:7447/[camera-id]
The [camera-id] is a unique identifier assigned by UniFi Protect. Copy it directly from the Protect UI to avoid errors.
Test the RTSP Stream
Before configuring AgenticEye, verify the RTSP stream is accessible using FFmpeg or VLC from the same network as your AgenticEye server.
# Test with FFmpeg (recommended)
ffplay rtsp://192.168.1.10:7447/abcdef1234567890
# Or verify stream metadata
ffprobe -v quiet -print_format json -show_streams \
rtsp://192.168.1.10:7447/abcdef1234567890
# Test with VLC from command line
vlc rtsp://192.168.1.10:7447/abcdef1234567890
Configure in AgenticEye
Add the camera to your AgenticEye configuration. You can do this via the dashboard UI or by editing the configuration file directly.
cameras:
- name: "Front Entrance - G4 Pro"
brand: ubiquiti
model: G4 Pro
protocol: rtsp
url: "rtsp://192.168.1.10:7447/abcdef1234567890"
stream_quality: high
fps: 15
resolution: 2688x1512
agents:
- type: security
sensitivity: high
- type: occupancy
zones:
- name: "entrance"
polygon: [[0,0],[100,0],[100,100],[0,100]]
Verify Connection
After saving your configuration, AgenticEye will attempt to connect to the camera. Check the dashboard or logs for confirmation.
# Check camera connection status
agenticeye status --cameras
# View live logs for connection issues
agenticeye logs --follow --filter camera:front-entrance
# Expected output on successful connection:
# [INFO] Camera "Front Entrance - G4 Pro" connected via RTSP
# [INFO] Stream resolution: 2688x1512 @ 15fps
# [INFO] AI agents initialized: security, occupancy
Advanced: UniFi Protect API Integration
For enterprise deployments managing many cameras, AgenticEye can integrate directly with the UniFi Protect API. This enables automatic camera discovery, event synchronization, and centralized management.
# Authenticate with the UniFi Protect controller
curl -k -X POST https://192.168.1.10/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"username": "your-admin-user",
"password": "your-password"
}' \
-c cookies.txt
# List all cameras via the Protect API
curl -k -X GET https://192.168.1.10/proxy/protect/api/cameras \
-b cookies.txt \
| jq '.[].name, .[].id'
# Auto-discover all cameras via UniFi Protect API
unifi_protect:
host: "192.168.1.10"
username: "agenticeye-service"
password: "${UNIFI_PASSWORD}" # Use environment variable
verify_ssl: false # Self-signed certs on UDMP
auto_discover: true
stream_quality: high
default_agents:
- type: security
sensitivity: medium
Protocol Reference
# RTSP Stream (per-camera, must be enabled individually)
rtsp://[NVR-IP]:7447/[camera-id]
# RTSPS (encrypted, if configured)
rtsps://[NVR-IP]:7441/[camera-id]
# UniFi Protect API Base URL
https://[NVR-IP]/proxy/protect/api/
# WebSocket Events (real-time motion/smart detection)
wss://[NVR-IP]/proxy/protect/ws/updates
Troubleshooting
RTSP stream not connecting
RTSP is disabled by default on all UniFi cameras. Navigate to the specific camera in UniFi Protect and enable RTSP under Settings > Advanced. Each camera must be enabled individually — there is no global toggle.
Stream URL changes after NVR reboot
UniFi Protect may regenerate RTSP URLs after a controller reboot or firmware update. If your stream stops working after a reboot, check the Protect UI for the updated URL. Using the API integration mode avoids this issue by dynamically resolving stream URLs.
Cannot access stream outside the NVR network
UniFi Protect RTSP streams are only accessible on the local network by default. The NVR does not expose RTSP streams externally. Ensure your AgenticEye server is on the same network or VLAN as the NVR. Do not port-forward RTSP — use a VPN instead.
Connection refused on port 7447
Verify the NVR firewall allows traffic on port 7447 (RTSP) and 7441 (RTSPS). On UniFi Dream Machine Pro, ensure the Protect application is running and accessible.
High latency or dropped frames
Use the Medium quality stream if bandwidth is limited. Ensure your network switch supports the required throughput — a single 4K stream at high quality can use 8-15 Mbps. Check for network congestion between the NVR and AgenticEye server.
Need help with your UniFi Protect integration?
Our integration team can help you set up and optimize your Ubiquiti camera deployment with AgenticEye.
Contact Our Integration Team