Stop Wrestling with UniFi Protect! This Plugin Unlocks HomeKit Magic
Stop Wrestling with UniFi Protect! This Plugin Unlocks HomeKit Magic
You've spent thousands building the perfect UniFi Protect security system. Cameras everywhere. Doorbells with crisp 4K footage. An NVR humming in your closet, recording every moment. But then you open the Home app on your iPhone... and nothing. Your $3,000 security fortress is invisible to Siri, absent from automations, and completely disconnected from the Apple ecosystem you've invested years in.
Sound familiar? You're not alone. Ubiquiti's walled garden approach has left countless smart home enthusiasts trapped between two worlds—professional-grade hardware that refuses to play nice with the consumer-friendly HomeKit experience they crave. The native UniFi Protect app works, sure. But it's another silo. Another place to check. Another automation system that doesn't talk to your lights, your locks, or your "Good Night" scene.
What if I told you there's a way to bridge this gap without ripping anything out? A solution so elegant that your UniFi cameras appear as native HomeKit devices—complete with HomeKit Secure Video, instant notifications, and seamless Siri control? Enter homebridge-unifi-protect, the open-source project that's become the secret weapon of serious smart home builders. This isn't some hacky workaround. It's a meticulously crafted plugin that reverse-engineered UniFi Protect's real-time events API before anyone else, delivering performance that often beats Ubiquiti's own app.
Ready to finally unify your smart home? Let's dive deep into how this game-changing plugin works, why thousands of developers swear by it, and exactly how to get it running in your home today.
What is homebridge-unifi-protect?
homebridge-unifi-protect is a Homebridge plugin created by hjdhjd that provides complete, native-grade HomeKit integration for the entire UniFi Protect ecosystem. Born from frustration with the fragmented smart home landscape, this plugin has evolved into the definitive bridge between Ubiquiti's professional security hardware and Apple's consumer-friendly HomeKit platform.
The project's north star is beautifully simple: it just works. No marathon configuration sessions. No deciphering cryptic JSON files. No compromises on features. You provide three pieces of information—your Protect controller's IP address, a username, and a password—and the plugin discovers, configures, and exposes every compatible device to HomeKit automatically.
But calling it "just a plugin" dramatically undersells what hjdhjd accomplished here. This project was the first Homebridge plugin—and reportedly the first third-party application anywhere—to successfully reverse engineer UniFi Protect's real-time events API after Ubiquiti introduced it with UniFi OS. This wasn't trivial. The realtime API uses a proprietary WebSocket-based protocol that Ubiquiti never documented for external use. By cracking this nut, homebridge-unifi-protect achieved something previously impossible: instantaneous event propagation from Protect to HomeKit. Motion detected on your G4 Pro? Your HomeKit automations trigger in milliseconds, not seconds.
This technical breakthrough didn't just benefit HomeKit users. The reverse-engineering work was adopted by major open-source smart home projects across the ecosystem, elevating the entire community. When you install homebridge-unifi-protect, you're leveraging genuinely pioneering engineering.
The plugin is officially verified by Homebridge, maintains rigorous CI/CD practices, and boasts hundreds of thousands of downloads. It's actively maintained with a clear philosophy: aggressively adopt new Ubiquiti capabilities while deprecating outdated approaches. No beta support, no bleeding-edge compromises—just rock-solid reliability on official firmware.
Key Features That Set It Apart
What makes homebridge-unifi-protect genuinely special? Let's dissect the capabilities that separate it from half-baked alternatives:
Zero-Friction Configuration The plugin requires exactly three inputs: controller hostname/IP, username, password. Everything else auto-configures. Device discovery, capability mapping, streaming optimization—it all happens without manual intervention. For power users, the Homebridge Config UI exposes granular feature options through an elegant web interface, but you'll likely never need them.
Complete Device Ecosystem Coverage This isn't camera-only support. The plugin handles cameras (with tamper detection on supported models), chimes, doorbells, lights, sensors—including SuperLink sensors—and even Viewports. Third-party ONVIF cameras added to Protect work too, with full HomeKit Secure Video support when paired with an AI Port for motion detection.
Native HomeKit Secure Video (HKSV) Here's where things get serious. HKSV support is complete and self-contained—no additional plugins, no extra software beyond FFmpeg. This was another community first. Your UniFi cameras gain AI-powered detection (people, vehicles, packages), secure iCloud storage, and rich notifications with thumbnail previews. Third-party cameras using an AI Port get full HKSV capabilities too.
Insane Streaming Performance The developer obsessed over latency optimization. With hardware acceleration on supported platforms—Apple Silicon/Intel Macs, Intel Quick Sync CPUs, Raspberry Pi 4—live streams load in 0.2-0.3 seconds via the Home app. That's often faster than Ubiquiti's native app. Without acceleration, expect 1-2 seconds, still perfectly usable.
Real-Time Event Architecture Thanks to that reverse-engineered WebSocket API, device changes propagate instantly. Add a camera in Protect? It appears in HomeKit immediately. Remove one? Gone. No Homebridge restarts. No manual refreshes. The plugin maintains a persistent, real-time connection to your controller's event stream.
Advanced Automation Capabilities Motion sensors are just the beginning. Enable motion switches for granular automation control—activate camera detection when you leave, disable it when you arrive. Occupancy sensors add temporal intelligence: trigger lights only when motion persists, or restrict to person-detection on smart-capable devices. Liveview-based scenes let you create security presets that control entire camera groups.
Doorbell Supremacy Complete UniFi doorbell support including ring notifications, two-way audio, package camera integration, and LCD message control. Display custom messages on your doorbell screen through HomeKit automations. Two-way audio extends to all compatible cameras, including AI Pro models.
Multi-Controller & MQTT Support Running multiple Protect controllers? Seamless integration. Need MQTT broker access? Built-in. UniFi Access integration even exposes lock accessories for paired reader/camera setups.
Real-World Use Cases Where It Shines
Let's move from feature lists to concrete scenarios where homebridge-unifi-protect transforms daily life:
The Comprehensive Home Security Hub You've got six cameras, a doorbell, and motion sensors scattered across your property. Without this plugin, you're checking the Protect app for camera feeds, the Home app for everything else, and trying to remember which system handles what. With homebridge-unifi-protect, your entire security infrastructure lives in one interface. Create a "Leaving Home" scene that arms all cameras, enables motion notifications, and locks your Access-controlled doors—all triggered by a single Siri command or geofence.
The HomeKit Secure Video Power User You're deep in the Apple ecosystem with iCloud+ and want intelligent video analysis without subscription bloat. This plugin delivers genuine HKSV: your G4 Bullet detects a person at 2 AM, you get a rich notification with zoomed thumbnail, the clip stores securely in iCloud for ten days, and your HomePod announces "Person detected at front door." No UniFi Protect subscription required for AI features—Apple's on-device analysis handles everything.
The Multi-Property Manager You manage Protect installations at your home, office, and rental property. The plugin's multi-controller support consolidates everything into one HomeKit home (or separates them—your choice). Check the beach house cameras while at the office, all through the familiar Home app interface. Real-time device sync means when your property manager installs a new camera, it appears automatically.
The Automation Obsessive You want your home to think. Motion on the driveway camera triggers path lighting for thirty seconds—but only after sunset, and only when occupancy persists for five seconds (no false triggers from passing cars). The package camera detects a delivery, your kitchen lights flash green, and the doorbell LCD displays "Leave packages on bench." All native HomeKit automations, powered by Protect hardware through this plugin.
Step-by-Step Installation & Setup Guide
Ready to transform your UniFi Protect experience? Follow these steps precisely for a flawless installation.
Prerequisites Check
Before touching any install buttons, verify your foundation:
- Hardware: A machine capable of handling video transcoding. Raspberry Pi 4 works for 1-2 cameras max. For 4+ cameras or HKSV, use an Intel NUC, Mac mini, or similar modern x86/ARM64 system.
- Homebridge: Fresh install with Homebridge Config UI enabled. If you're new, complete the official Homebridge setup first.
- UniFi Protect: Version 6.0 or later. Earlier versions are unsupported.
- Local Admin Account: Create a dedicated local user on your UniFi console—never use your Ubiquiti cloud account.
Creating Your Local Admin Account
Navigate to your Protect controller web interface:
- Click OS Settings (top-left of the controller UI)
- Click Add Admin (top-right)
- Check Restrict to local access only
- Enter username and password
- Set role to Full Management for complete functionality
This dedicated account is critical for security and reliability. Never share your cloud credentials with any plugin.
Plugin Installation
The Config UI method is simplest:
- Open Homebridge Config UI in your browser
- Navigate to the Plugins tab
- Search for
homebridge-unifi-protect - Click Install
- Click the Set Up icon on the plugin tile
- Enter your Protect controller's hostname or IP address
- Enter the local username and password created above
- Click Login to verify connectivity
- Click Save, then Restart Homebridge
Child Bridge Configuration (Required)
Isolating plugins in child bridges is Homebridge best practice. It prevents any single plugin from crashing your entire Homebridge instance:
- After restart, click Set Up Child Bridge on the plugin tile
- Toggle the child bridge setting to On
- Save and restart Homebridge again
HomeKit Pairing
- Click Connect to HomeKit on the plugin tile
- Open the Home app on your iPhone/iPad
- Tap the + icon → Add Accessory
- Scan the QR code displayed in Config UI
- Assign rooms and enable HomeKit Secure Video when prompted
That's it. Every compatible Protect device now appears in HomeKit. The entire process typically takes under ten minutes.
FFmpeg Considerations
Most popular platforms include prebuilt FFmpeg binaries. If you're on an unusual architecture, manually install FFmpeg with fdk-aac codec support for audio functionality. This is the only common stumbling block for exotic setups.
REAL Code Examples and Configuration Patterns
Let's examine practical implementation patterns using actual configurations from the homebridge-unifi-protect ecosystem.
Basic Configuration Structure
The minimal configuration that powers the "it just works" experience:
{
"platforms": [
{
"platform": "UniFi Protect",
"name": "UniFi Protect",
"controllers": [
{
"address": "192.168.1.1",
"username": "homebridge_local",
"password": "your_secure_password"
}
]
}
]
}
This single controller definition triggers automatic discovery of all devices. The plugin connects via the realtime events API, establishes WebSocket listeners, and begins populating HomeKit accessories. No camera IDs, no stream URLs, no codec specifications—everything derives from the controller's device manifest.
Multi-Controller Enterprise Setup
For managing multiple properties or separate controller instances:
{
"platforms": [
{
"platform": "UniFi Protect",
"name": "UniFi Protect",
"controllers": [
{
"address": "home-controller.local",
"username": "homebridge_local",
"password": "secure_password_1"
},
{
"address": "office-controller.local",
"username": "homebridge_local",
"password": "secure_password_2"
}
]
}
]
}
Each controller operates independently with isolated device namespaces. HomeKit displays cameras from both locations, properly organized by the rooms you assign. The plugin maintains separate WebSocket connections to each controller's realtime API, ensuring events from either propagate instantly.
Feature Options: Granular Device Control
The webUI generates JSON like this behind the scenes. Here's how you'd manually configure a camera-specific option:
{
"platforms": [
{
"platform": "UniFi Protect",
"name": "UniFi Protect",
"controllers": [
{
"address": "192.168.1.1",
"username": "homebridge_local",
"password": "your_secure_password"
}
],
"options": [
"Enable.Video.Stream.Only.Low.B9F4CBA18B6F", // Force low-res stream for specific camera
"Enable.Motion.OccupancySensor", // Add occupancy sensor capability
"Disable.Motion.SmartDetect", // Disable smart detection on all cameras
"Enable.Doorbell.Messages.FromScreen", // Allow doorbell LCD message control
"Enable.Mqtt"
]
}
]
}
Let's decode these options:
-
Enable.Video.Stream.Only.Low.B9F4CBA18B6F: The suffix is a device serial number. This option forces that specific camera to always use its low-resolution stream—useful for remote viewing on bandwidth-constrained connections or for cameras where quality matters less than responsiveness. -
Enable.Motion.OccupancySensor: Transforms any motion-capable device into an occupancy sensor. In HomeKit, occupancy sensors differ from motion sensors by their temporal behavior—they stay triggered as long as presence continues, rather than pulsing on each movement. This enables sophisticated automations like "keep lights on while someone remains in the room." -
Disable.Motion.SmartDetect: Globally disables Ubiquiti's AI-powered detection (person/vehicle/package). You might use this if you prefer HomeKit Secure Video's analysis or want to reduce controller CPU load. -
Enable.Doorbell.Messages.FromScreen: Exposes the doorbell's LCD as a controllable characteristic in HomeKit. Create automations that change the displayed message based on time of day, delivery expectations, or security modes. -
Enable.Mqtt: Activates MQTT broker publishing for all device events, enabling integration with Home Assistant, Node-RED, or custom automation platforms.
Liveview Scene Configuration
Create security presets using your Protect liveviews:
{
"platforms": [
{
"platform": "UniFi Protect",
"name": "UniFi Protect",
"controllers": [
{
"address": "192.168.1.1",
"username": "homebridge_local",
"password": "your_secure_password"
}
],
"options": [
"Enable.Liveview.StayAtHome", // Expose "StayAtHome" liveview as security system
"Enable.Liveview.Away", // Expose "Away" liveview
"Enable.Liveview.Night", // Expose "Night" liveview
"Enable.Liveview.Switch.StayAtHome" // Also create toggle switch for this liveview
]
}
]
}
In UniFi Protect, you'd create liveviews named exactly "StayAtHome", "Away", and "Night" with your desired camera selections. The plugin then exposes these as a security system accessory in HomeKit—tap "Away" and all cameras in that liveview activate motion detection. The .Switch variant creates an additional toggle for finer automation control.
Advanced Usage & Best Practices
Having run this plugin across multiple installations, here are pro strategies that elevate your experience:
Hardware Acceleration is Non-Negotiable at Scale If you're running 4+ cameras, prioritize hardware-accelerated transcoding. Apple Silicon Macs deliver exceptional performance-per-watt. Intel Quick Sync on 8th-gen or newer CPUs is excellent. The 0.2-second stream load times aren't marketing fluff—they're genuinely achievable and transform daily usage from tolerable to delightful.
Child Bridge Isolation Always, always use the child bridge. If Protect's API hiccups or FFmpeg encounters a problematic stream, the crash affects only this plugin—not your entire Homebridge instance with its dozens of other accessories.
Strategic Feature Option Application Apply options at the narrowest scope possible. Global options affect everything; controller-scoped options affect one controller; device-scoped options (using serial suffixes) affect single devices. This prevents unintended side effects and makes troubleshooting cleaner.
HomeKit Secure Video Storage Planning HKSV consumes iCloud storage: 10 days for one camera tier, 7 days for five-camera tier, 10 days for unlimited. Plan your iCloud+ tier accordingly. The 200GB plan includes one camera; 2TB includes five; 6TB/12TB are unlimited. Remember that HKSV analyzes on-device—your Home hub (Apple TV/HomePod/ iPad) does the AI work, not Ubiquiti's servers.
Network Topology Optimization Place your Homebridge host on the same VLAN as your Protect controller when possible. While cross-VLAN works, it introduces complexity and potential mDNS discovery issues. If segmenting is required, ensure multicast traffic properly routes or use explicit IP addressing.
Monitor the Changelog Aggressively The developer deprecates features that Ubiquiti supersedes. Major version updates can remove options that no longer make sense. Read changelogs before updating, especially if you've invested heavily in custom feature options.
Comparison with Alternatives
| Feature | homebridge-unifi-protect | Home Assistant UniFi Protect | Native UniFi App | Scrypted |
|---|---|---|---|---|
| HomeKit Native Integration | ✅ Complete, first-class | ⚠️ Via HomeKit bridge addon | ❌ None | ⚠️ Plugin-based |
| HomeKit Secure Video | ✅ Full native support | ⚠️ Complex, often broken | ❌ N/A | ⚠️ Partial |
| Real-Time Events | ✅ Reverse-engineered WebSocket | ⚠️ Polling or limited | ✅ Native | ⚠️ Varies |
| Configuration Complexity | ✅ Minimal (3 fields) | ⚠️ Moderate YAML | ✅ Zero | ⚠️ Moderate |
| Doorbell LCD Control | ✅ Full support | ❌ None | ✅ Native | ❌ None |
| Two-Way Audio | ✅ Most devices | ⚠️ Limited | ✅ All | ⚠️ Limited |
| Multi-Controller | ✅ Native | ⚠️ Manual config | ✅ Native | ⚠️ Manual |
| Performance Optimization | ✅ Hardware acceleration tuned | ⚠️ Generic FFmpeg | ✅ Native | ⚠️ Generic |
| Active Maintenance | ✅ Very active, clear roadmap | ⚠️ Community-dependent | ✅ Commercial | ⚠️ Single maintainer |
| MQTT Support | ✅ Built-in | ✅ Native | ❌ None | ⚠️ Plugin |
The verdict is clear: if you're already in the Homebridge ecosystem, homebridge-unifi-protect offers unmatched integration depth with minimal friction. Home Assistant users might prefer native integration for ecosystem consistency, but sacrifice HKSV reliability and doorbell features. Scrypted offers flexibility but lacks the focused optimization and active development velocity. The native app remains essential for controller administration but fails as a unified smart home component.
Frequently Asked Questions
Is homebridge-unifi-protect free to use? Yes, completely free and open-source under a permissive license. The developer accepts sponsorships but the plugin itself has zero cost. You'll need Homebridge infrastructure (a always-on computer or Raspberry Pi) and potentially iCloud+ for HKSV.
Does this work with UniFi Cloud Key Gen2 Plus? Absolutely. Any UniFi Protect controller running version 6.0+ is supported, including Cloud Key Gen2 Plus, Dream Machine Pro/SE, UNVR, and UNVR Pro. The plugin connects via standard Protect APIs regardless of controller hardware.
Will this slow down my Protect system or cameras? No. The plugin is a read-only consumer of Protect's API and video streams. It doesn't modify controller settings or burden camera processors. The only load is on your Homebridge host for video transcoding, which is why hardware acceleration matters.
Can I use this without HomeKit Secure Video? Yes. HKSV is entirely optional. Without it, you still get live streaming, motion sensors, doorbell notifications, and all automation capabilities. Your cameras simply won't record to iCloud or use Apple's AI detection—you'll rely on Protect's native recording instead.
What happens when Ubiquiti updates Protect firmware? The developer tests against official releases and typically updates within days if API changes occur. Beta/EA firmware is explicitly unsupported—stay on official releases for stability. The plugin's architecture gracefully handles most minor API evolutions without updates.
Is two-way audio quality good enough for conversations? Functional, with caveats. Without Acoustic Echo Cancellation (AEC)—still being reverse-engineered—you'll experience echo on the camera side. The developer recommends using UniFi's native app for extended two-way conversations, and this plugin for quick interactions and automations.
Can I expose only specific cameras to HomeKit?
Yes. Feature options allow hiding individual devices or entire controllers. Use Disable.Device.SERIAL options to exclude specific cameras while exposing others. This is useful for privacy-sensitive locations or reducing HomeKit clutter.
Conclusion: Your Smart Home Deserves This Integration
The smart home promise was always about seamless unification—devices from different ecosystems working together through intuitive interfaces. Ubiquiti's Protect hardware delivers professional-grade security, but its software isolation undermines that vision. homebridge-unifi-protect doesn't just bridge this gap; it obliterates it with engineering excellence that often surpasses first-party solutions.
From the pioneering reverse-engineering of real-time events to sub-second streaming performance, from complete HomeKit Secure Video support to granular automation capabilities, this plugin represents what's possible when passionate developers refuse to accept artificial ecosystem boundaries. The "it just works" philosophy isn't marketing—it's a technical achievement born from thousands of hours of refinement.
If you're sitting on UniFi Protect hardware and an iPhone, you're leaving transformative smart home experiences on the table. Every day without this integration is another day of app-switching, automation gaps, and untapped potential.
Stop wrestling with disconnected systems. Install homebridge-unifi-protect today, join the thriving Discord community for support, and finally experience your security cameras as the intelligent, integrated home components they were meant to be. Your future self—the one tapping a single "Good Night" button that arms every camera, locks every door, and confirms everything with a calm "Security system armed" from Siri—will thank you.
The code is waiting. Your cameras are ready. Bridge the gap.
Tags
Explore on the BrightCoding network
Hand-picked resources from our other sites.
Scrypted: The Revolutionary Camera Integration Platform
Scrypted revolutionizes smart home camera integration with sub-200ms latency streaming to HomeKit, Google Home, and Alexa. This comprehensive guide covers insta...
Homebridge Xbox TV: The Smart Home Upgrade Your Xbox Needs
Transform your Xbox console into a native HomeKit device with Homebridge Xbox TV. This comprehensive guide covers installation, configuration, code examples, an...
Stop Fighting HomeKit's Closed API! HomeClaw Exposes Everything
HomeClaw bridges Apple HomeKit's closed ecosystem to AI assistants via MCP. Control lights, locks, thermostats and scenes from Claude Desktop, Claude Code, term...
Continuez votre lecture
Voice Agents That Revolutionize Home Automation & Web Searches
geekmagic-hacs: Your Next Favorite Smart Display Tool
Stop Guessing Camera URLs! Strix Finds Streams in 30 Seconds
Stop Coding Alone: OPC-Skills Gives Your AI Agent Superpowers
Commentaires 0
Aucun commentaire pour l'instant. Soyez le premier à réagir !