IvedaAI: add cameras from an IP or RTSP URL
ivedaai_add_cameraAdds IP or RTSP cameras to IvedaAI, activates their streams, and checks for partial-creation failures to avoid duplicate camera records.
Instructions
Adds one or more cameras (e.g. from a list of IPs or RTSP stream URLs) and starts their connection. The raw CameraRequest schema has undocumented gotchas confirmed by live testing:
A schema-valid minimal body (name, streamUrl, engineProfileId, roiContour) still throws a bare server-side error unless several other optional-looking fields are also filled — this tool fills them with sane defaults automatically (resolution 1920x1080, frameRate 25, empty schedule/plugins, etc.).
Creating the record is NOT enough for the camera to actually connect or be fully visible in the product UI: a separate activation step (allocating a processing resource and starting the stream) is required, which this tool performs automatically unless
activate: falseis passed.A creation error can still partially create the camera server-side before failing. This tool checks for that by exact name after any error and reports
created_despite_errorwith the real cameraId instead of a falsefailed, so you don't end up with a confusing orphaned duplicate.
Only name plus either streamUrl or ip are required per camera — everything else is optional and defaulted (engineProfileId defaults to the first engine profile found; roiContour defaults to a full-frame rectangle). Providing the exact streamUrl is much more reliable than ip alone: this tool can only guess a generic RTSP root path from ip/account/password, which often doesn't match a specific camera's actual manufacturer-specific stream path.
IMPORTANT: activation starting successfully does NOT mean the stream is actually connected — that can take anywhere from under a second to failing after 90+ seconds with no error at all (observed live), which usually indicates a network-reachability problem between the IvedaAI server and the camera, not a problem with this tool. Check back later with the returned jobId via the ivedaai_job tool (GET /api/jobs/{jobId}), or re-check the camera via ivedaai_camera (GET /api/cameras/{cameraId}) for a populated status field, to confirm it actually connected.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ainvrId | No | Which ainvr/site to add cameras under. Defaults to the first ainvr found if omitted. | |
| cameras | Yes | Cameras to add. | |
| activate | No | Whether to start each camera's connection after creation (default true). |