Skip to content

By PromptFission2 min read

Keystone pretends to be Ubiquiti's $799 AI box so UniFi Protect will search cameras with local models

An open source service that UniFi Protect adopts as if it were real AI hardware, then answers its search and description requests with CLIP, YOLOX and a local vision model.


Keystone, by Colin Armstrong, is a piece of software that tells a UniFi Protect camera system it is one of Ubiquiti’s AI add-on boxes. Protect adopts it the way it would adopt the hardware, and from then on its plain-English search and event descriptions are served by open models on a machine you already own. The README prices the boxes it stands in for at $799 for the AI Key and $199 for the AI Port.

How it works

The interesting part is what Keystone does not do. The README says there are no database hacks and no patched Protect files. Keystone speaks the protocols the real devices speak: it announces itself over Ubiquiti’s discovery broadcast on UDP port 10001, goes through adoption over HTTPS, and then talks to the controller over mutual TLS with the controller’s certificates pinned. The one place it reaches into Protect is PostgreSQL, where it keeps rotated passwords in sync so Protect 7.3 and later can run vector search.

Behind that front, the “Find Anything” search runs on CLIP ViT-L/14 embeddings and works on CPU. Event descriptions need a vision model, either local through Ollama, LM Studio or oMLX, or a hosted one. For each event Keystone samples three frames at 960 pixels from about a second either side of the key moment, and maps the model’s output onto Protect’s own vocabulary of 5,375 tags.

The virtual AI Port does the same trick for cameras Ubiquiti does not make. It relays video from ONVIF cameras without transcoding and runs YOLOX detection only when there is motion. The README says it handles up to 10 HD cameras, against three for the hardware.

Some of the adoption code is credited to an earlier project, Olli0103/unifi-protect-local-ai.

What it costs and where it stops

The author reports about 6 percent CPU for seven 1080p cameras on an Intel Core Ultra 5, and 3.5 to 4.5 GB of RAM for the base setup. Descriptions take 2 to 5 seconds on a discrete GPU and roughly 20 to 25 on an integrated one. All of these are the author’s figures.

The limits are listed plainly. AI Port video must be H.264, and with H.265 detections can keep working while Protect receives no picture. Keystone stays in Protect’s basic understanding mode because, the README says, the deeper mode is restricted to internal Ubiquiti accounts. Face recognition is off by default, uses weights licensed for non-commercial research only, and comes with a reminder that biometric law is your problem.

The project describes itself as unofficial and not affiliated with Ubiquiti. It imitates devices a vendor sells, so a Protect update could break it.

Try it yourself

The repo is Apache 2.0 and has installers for Docker Compose, Proxmox, Unraid, Home Assistant OS and Homebrew on macOS. You need UniFi Protect 7.3 or later for search. The README suggests 4 GB of RAM and two to four cores as typical, and says a Raspberry Pi or N100 works with low-memory settings.

We have not installed it or tested it against a Protect controller. This is based on the README.