UniFi Protect
UniFi Protect decides when something happened - a person in the driveway, a smoke alarm, a leak
sensor. OpenAlarm decides who finds out: texts, calls, and email to your people, in order,
until someone acknowledges. Protect’s Alarm Manager connects the two directly: its webhook
action is a bodyless HTTP GET with Bearer authentication built in, which is exactly the shape
of an OpenAlarm trigger call. No relay, no scripts.
This guide matches UniFi Protect 7.2 (Alarm Manager also exists in UniFi Network 9.3+ and UniFi Access; the steps here are Protect’s).
Before You Start
Section titled “Before You Start”You need an alarm and an API key - the Quickstart gets you both in a few minutes. Two OpenAlarm-side choices matter for a camera:
- Scope the key to this alarm. The key sits in your UniFi console’s webhook config; a key that can fire one alarm is the right blast radius.
- A camera never arms anything, so its alarm sits in Disarmed and a bare
triggerruns the Away policy - that is the designed behavior, not a problem to fix. If you want a specific response, point the webhook attrigger/{modeId}instead; a named mode never falls back.
Create the Alarm in Protect
Section titled “Create the Alarm in Protect”-
Open UniFi Protect and go to Alarm Manager in the left-hand sidebar.
-
Click Create Alarm.
-
Name it, then configure the Trigger - person or vehicle detection, motion, doorbell ring, line crossing, or a sensor event like water leak or smoke - and the Scope: which cameras or sensors it watches. An optional schedule limits it to certain hours (Always or Custom).
-
In the Action settings, add an action and select Webhook, then Custom Webhook.
-
Enter the OpenAlarm trigger URL as the Delivery URL:
https://api.openalarm.io/v1/alarm/k7m3x9q2f8d4w1b5n6p0r3t7v2x5z9c4/trigger -
Check Advanced Settings - that is where the method and authentication live.
-
Leave Method on
GET- the URL is the whole call, and there is no body to build. -
Set Authentication to Bearer and paste your API key as the token:
oa_m9s346q3d25vt4f5v37e3s3e28jt97kb6cq643dzvmxxqkfbf5kznwj47tan9zt2OpenAlarm accepts
Authorization: Beareras a first-class equivalent ofX-API-Key, so Protect’s Bearer option is the clean path - the key travels in a header, never in the URL. (Prefer a custom header? Leave Authentication on None and addX-API-Keywith the same key as a custom header instead - both work identically.) -
Save.
Protect’s Ignore Repeated Actions option suppresses rapid re-fires of the same trigger. Useful, but optional: OpenAlarm folds repeat triggers into the alarm’s open incident anyway - a busy camera cannot page your contacts twice.
Test It
Section titled “Test It”Set the OpenAlarm alarm’s Environment to Test in the console, then walk in front of the camera.
- In Protect, the Alarm Manager History table shows the alarm fired and the webhook was sent.
- In OpenAlarm, the alarm’s log shows the trigger and the incident records everyone who would have been reached - nobody actually contacted. See Test Mode.
When the chain reads right, flip the alarm to Live. Nothing in Protect changes.
- The webhook fires from your console, which only needs ordinary outbound HTTPS to reach
api.openalarm.io. - Protect 7 has Global and Local Alarm Manager modes (they appear once you adopt an Alarm Hub or sensors with arm profiles). Webhook alarms behave the same in either; just be aware which mode owns the alarms you create.
- A
401in your webhook’s delivery means the key; a404means the alarm ID is not one this key can fire - see Errors.