BraddCorp Tools

Tools / UniFi Alarm Manager Pro

UniFi Alarm Manager Pro

A white-label campus and facility alarm stack for UniFi Protect AI Speakers: PIN-gated consoles in the cloud, a Raspberry Pi on site, bells, emergency codes, doorbell, door-held-open, and Talk PA.

MITUniFi ProtectCloudflare WorkersRaspberry Piearly-stage

What it does

A white-label alarm stack for UniFi Protect AI Speakers: PIN-gated mobile and desk consoles on a Cloudflare Worker, a Raspberry Pi gateway on site, class bells, emergency codes, doorbell, door-held-open, and Talk PA.

Features

  • Emergency codes — Code Red, Code Blue, and All clear, looping on speakers until cleared.
  • Class bells — first and second bell on a building schedule.
  • Arm / disarm — unarmed commands stay silent but still audit.
  • Convenience PA — UniFi Talk SIP dial-in for a live page (not an emergency path).
  • Doorbell and door held open — Protect webhooks and sensor polling, with optional phone and Pushover alerts.
  • Remote play — off-LAN only for PINs that are granted remote scope, via Ably with a D1 poll fallback.

See it in action

Simulated A PIN-gated campus console. Rooms and announcements are made up.

Campus consoleArmed

Schedule is running. Speakers are quiet. Audit is on.

  • Gym idle
  • Hall A idle
  • Office idle
First bellPlaying

Building schedule, 10:00. Chime loops once on Hall A and the Gym, then returns to idle.

  • Gym chime
  • Hall A chime
  • Office idle
EvacuateLooping

Emergency code is looping on every speaker until an authorized PIN sends All clear.

  • Gym evac
  • Hall A evac
  • Office evac
Talk PALive page

A convenience page, not an emergency path: “Office, please pick up at the front desk.”

  • Gym idle
  • Hall A idle
  • Office page

Set it up

Not affiliated with Ubiquiti. You will need a UniFi Protect NVR, AI speakers, a Pi on the LAN, and a Cloudflare account for the Worker. Read the install and security docs in the repo before you expose anything.

Pi bootstrap and Worker deploy
# Pi
curl -fsSL https://raw.githubusercontent.com/BadBraddA1/unifi-alarm-manager-pro/main/scripts/pi-bootstrap.sh | bash
curl -fsSL https://raw.githubusercontent.com/BadBraddA1/unifi-alarm-manager-pro/main/apps/gateway/scripts/install.sh | bash
# then edit ~/.config/uamp/gateway.env

# Cloud (from a Mac/dev machine)
cd apps/web
pnpm install
wrangler d1 create unifi-alarm-manager-pro   # paste id into wrangler.jsonc
pnpm db:migrate
# wrangler secret put SESSION_SECRET PLAY_JWT_SECRET GATEWAY_POLL_SECRET …
pnpm deploy

Full instructions live in the repository README.

Security

  • Never commit .env, gateway.env, Protect API keys, or a live speaker inventory.
  • Do not port-forward the Pi play endpoint (:8787) or the /agent ops route.
  • Grant remote PIN scope deliberately. Change every example secret before going live.
  • Keep workers_dev off in production, or put Cloudflare Access in front.

Report vulnerabilities to Hello@Braddcorp.com, and read the full SECURITY.md for the threat model and operator hygiene.

Known limitations

Depends on your UniFi gear

This is a community gateway, not a Ubiquiti product. Protect, Talk, and Alarm Manager behavior can change with firmware.

The Pi must stay on the LAN

Remote play is an explicit PIN scope, not a reason to publish the gateway on the internet.

Pre-1.0

Only the main branch is supported. Read SECURITY.md before you deploy to a real building.

Changelog

No tagged releases yet. The project is pre-1.0 and only main is supported, so this is the commit history.

Commits

  • b5d582fDrop leftover previous-host gitignore and preview-hostname install hint (#2)
  • 28a64a9Add SECURITY.md and point disclosure to Hello@Braddcorp.com (#1)

  • 55eaaceInitial public white-label of UniFi Alarm Manager Pro.

Generated at build time from 3 commits on main (b5d582f) on 2026-12-06 UTC. Dates are UTC. No requests to GitHub happen when you view this page.

License

MIT, copyright BraddCorp. See LICENSE. Contributions and forks are welcome on GitHub.