Skip to content

UniFi Protect

Aperture can show UniFi Protect cameras next to your other cameras. It takes the stream your UniFi console hands out and, by default, sets the camera up for live view only: Protect keeps doing the recording and motion detection. This page shows how to add one and what is different about it.

Protect cameras do not stream to Aperture directly and do not speak ONVIF. Your UniFi console (the device that runs Protect) serves every camera’s video over RTSPS, at a link of this shape:

rtsps://<console>:7441/<stream key>?enableSrtp
  • <console> is the console’s address on your network, for example 192.168.1.1.
  • 7441 is the console’s RTSPS port. Some links use port 7447, which is plain RTSP.
  • <stream key> is a long string of letters and digits that names one camera at one quality.

There is no username or password in the link. The stream key is the secret: anyone who has the link and can reach the console can watch that camera.

  1. In UniFi Protect, open the camera’s settings and switch on RTSPS for the quality you want. Protect then shows a link for it. Turning on a second, lower quality gives you a sub stream link too.
  2. In Aperture, open Devices and click Add camera.
  3. Enter a Camera name and paste the Protect link into Main stream (RTSP URL). Paste a lower-quality link into Sub stream (optional, used for motion) if you made one.
  4. Aperture recognises the link and says so under the field: “UniFi Protect link: set up for live view only, with no recording, no motion detection, and kept out of Home Assistant and HomeKit. Change any of that below.”
  5. Click Test connection to check the picture, then Add camera.

The camera’s Source in Devices reads UniFi Protect. Its IP Address is the console’s address, the same for every Protect camera.

When a new camera’s main link is a Protect link, Aperture changes three defaults, once, as the link is entered:

Setting Default for a Protect camera Why
Recording mode Off Protect already records the camera.
Motion detection Off Protect already detects motion.
Show in Home Assistant & HomeKit Off Home Assistant usually has the camera already, through its own UniFi Protect integration.

These are only starting values. Change any of them in the same dialog before you click Add camera, or later in the camera’s Settings. A Protect camera can record, detect motion and run object recognition like any other camera; it then uses the server’s CPU and disk like any other camera too.

A camera added through the API without these fields gets the same defaults.

Protect links arrive as rtsps://, but the console’s certificate is self-signed, so a normal certificate check would refuse it. When you save the camera, Aperture rewrites the link:

  • rtsps:// becomes rtspx://, go2rtc’s RTSPS without the certificate check. The connection is still encrypted; Aperture only stops checking the console’s identity.
  • enableSrtp is removed from the query string. It only means something to Protect’s own apps.

Links on port 7447 (plain rtsp://) and links that are not Protect links are stored as entered.

Aperture handles the stream key the same way it handles a camera’s login:

  • Once saved, the key never leaves the server. The web app, nvrctl and the API show the link as rtspx://192.168.1.1:7441/•••••.
  • The editor tells you: “The stream key is hidden. Leave the dots to keep it, or paste a new link to change it.”
  • Leaving the dots keeps the saved key. To change it, paste the camera’s full link again.
  • The saved key is only ever used for the address it was saved for. If you change the console’s address in the link, paste the full link again (“the stream’s address changed, so paste its full link again”).

A Protect link is recognised as one when it uses port 7441 or 7447 and its path is a single string of at least 16 letters and digits.

  • Everything goes through the console. Every Protect camera’s stream is served by the console, so when the console is down or unreachable, all Protect cameras go offline in Aperture together.
  • No ONVIF. Protect cameras do not speak ONVIF, so leave Camera picture settings off for them. Picture settings are changed in Protect.
  • No pan/tilt controls from Aperture.
  • A new link from Protect replaces the old one. If Protect gives the camera a new stream key, the saved link stops working. Paste the new link into the camera’s Main stream (RTSP URL).
  • Test connection fails. Check that the Aperture server can reach the console on port 7441, and that RTSPS is still switched on for that camera and quality in Protect.
  • “Paste the full stream link.” You entered a masked link (with dots) into a new camera. Masked links only work on the camera they came from; copy the link from Protect again.
  • The camera works but shows up twice in Home Assistant. You switched Show in Home Assistant & HomeKit on while Home Assistant’s own Protect integration also has the camera. Switch it off again.

Related: Add cameras · Home Assistant · Live view