UniFi Protect doorbell ring notifications on your phone.

Get a Highest-priority push notification the moment someone presses your UniFi Protect doorbell, with a button to open the event clip.

How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into UniFi Protect

Add it as a webhook for Doorbell Ring.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the UniFi Protect doorbell ring webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In UniFi Protect, go to Settings > Alarm Manager and click Add Alarm.
  3. Set the trigger to Doorbell Ring and select the camera(s) it should watch.
  4. Under actions, add a Webhook with method POST and paste your webhook URL?tz=Europe/Amsterdam as the URL, using your own time zone.https://••••••••/•••••••• your personal URL, shown after install
  5. Save the alarm, then press Test to send a sample event.
  6. Add your time zone to the webhook URL so the notification shows the local time:
  7. ```
  8. your webhook URL?tz=Europe/Amsterdam
  9. ```
  10. Use your own [time zone name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). UniFi only sends a UTC timestamp; without `tz`, the time is left out of the message.
  11. Alarm Manager sends every alarm to the same webhook shape. This recipe only reacts when the alarm contains a `ring` trigger, so it stays quiet if you later point motion or smart-detection alarms at the same integration.
  12. The **View clip** button uses `eventLocalLink`, which only resolves on your home network (and shows a certificate warning). Away from home it won't load.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// UniFi Protect → doorbell ring
2// Fires when someone presses the button on a UniFi Protect doorbell (G4/G5 Doorbell).
3//
4// Set this up as an Alarm Manager alarm in UniFi Protect with a "Doorbell Ring"
5// trigger and a Webhook action pointing at your JustPush Studio integration URL.
6
7// UniFi only sends a UTC timestamp, not your console's time zone, so the time zone comes
8// from the webhook URL: ?tz=Europe/Amsterdam. Without one (or with an unknown name) the
9// time is left out rather than shown in the server's time zone.
10function localTime(timestamp, request) {
11 const timeZone = typeof request.query?.tz === "string" ? request.query.tz.trim() : ""
12
13 if (!timestamp || !timeZone) return null
14
15 try {
16 return new Date(timestamp).toLocaleTimeString("en-GB", { hour: "2-digit", minute: "2-digit", timeZone })
17 } catch {
18 return null // not a time zone name this runtime knows
19 }
20}
21
22function handleRequest(request) {
23 const alarm = (request.body || {}).alarm
24
25 // Guard: ignore anything that isn't a UniFi Protect alarm payload.
26 if (!alarm || !Array.isArray(alarm.triggers)) {
27 console.log("Not a UniFi Protect alarm payload — skipping")
28 return null
29 }
30
31 // Alarm Manager sends every alarm to the same webhook, so only handle rings.
32 const ring = alarm.triggers.find((trigger) => trigger?.key === "ring")
33
34 if (!ring) {
35 console.log(`Ignoring "${alarm.name ?? "unknown"}" alarm — no ring trigger`)
36 return null
37 }
38
39 const rangAt = localTime(ring.timestamp, request)
40
41 // The local link only resolves on your LAN, and only when the event was recorded.
42 const eventLink = alarm.eventLocalLink
43
44 return {
45 title: "🔔 Someone's at the door",
46 message: rangAt ? `Your doorbell rang at ${rangAt}` : "Your doorbell rang",
47 topic: "UniFi Protect",
48 priority: 2, // Highest — there is a person standing at your door right now
49 // sound: "incoming", // any of Studio's sounds, e.g. incoming, bugle, siren
50 buttons: eventLink ? [{ cta: "View clip", url: eventLink }] : [],
51 }
52}
Payload

The UniFi Protect ring webhook

This is what UniFi Protect sends to your URL for doorbell ring. It is a sample, trimmed to the fields recipes use.

ring · sample.json
1{
2 "alarm": {
3 "name": "Ring",
4 "sources": [],
5 "triggers": [
6 {
7 "key": "ring",
8 "device": "FAKE_MAC",
9 "eventId": "testEventId",
10 "timestamp": 1783505319282
11 }
12 ],
13 "eventPath": "/protect/events/event/testEventId",
14 "conditions": [
15 {
16 "condition": {
17 "type": "is",
18 "source": "ring"
19 }
20 }
21 ],
22 "eventLocalLink": "https://192.168.1.1/protect/events/event/testEventId"
23 },
24 "timestamp": 1783505319286
25}
FAQ

UniFi Protect doorbell ring notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into UniFi Protect and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

UniFi Protect on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.