Skip to main content
← All Guides | Full Compatibility
UniFi Protect

UniFi Protect + Home Assistant

Full local control for cameras and NVR

~20 minutes Verified: 2026-01-31 HA 2026.1+

Quick Summary

  • Compatibility: Full local control, no cloud dependency
  • Subscription: None required
  • Features: Live streams, motion/AI detection, PTZ, floodlights
  • ! Requirement: API key needed (as of HA 2025.8)

1. Prerequisites

Before starting, ensure you have:

  • Home Assistant 2025.8 or later
  • UniFi OS Console running Protect v6.0.0+
  • Access to your UniFi OS via local IP (not unifi.ui.com)

Supported Hardware

  • Consoles: UDM, UDM Pro, UDM SE, Cloud Key Gen2+, NVR, NVR Pro
  • Cameras: All UniFi Protect cameras (G3, G4, G5, AI series)
  • Accessories: Floodlights, Sensors, Chimes, Doorbell, Locks

Important: Early Access and Release Candidate versions of UniFi Protect are not supported and will cause the integration to fail.

2. Create Local User

You must create a local user account. Ubiquiti SSO cloud accounts will not work.

  1. Access UniFi OS directly via IP address (e.g., https://192.168.1.1)
  2. Log in with your admin account
  3. Go to Admins & Users from the left menu
  4. Click the + button and select Add Admin
  5. Select Restrict to local access only
  6. Enter a username and strong password
  7. Under Protect role, assign Full Management
  8. Save the user

3. Generate API Key

As of Home Assistant 2025.8, an API key is required.

  1. In UniFi OS, go to Settings → Control Plane → Integrations
  2. Click Create API Key
  3. Enter a name like "Home Assistant"
  4. Copy the generated key and save it securely

Note: Store this API key safely. You'll need it during Home Assistant setup and cannot retrieve it later.

4. Enable RTSP Streams

The integration uses RTSP streams for live video. Enable it on each camera:

  1. Open UniFi Protect → Devices
  2. Select a camera
  3. Click the Settings tab
  4. Expand Share Livestream
  5. Enable at least one RTSP stream (high quality recommended)
  6. Repeat for each camera

5. Add Integration

  1. Go to Settings → Devices & Services
  2. UniFi Protect may auto-discover. If shown, click Configure
  3. Otherwise, click + Add Integration and search for UniFi Protect
  4. Enter:
    • Host: Your UniFi OS IP address
    • Username: The local user you created
    • Password: The local user's password
    • API Key: The key you generated
  5. Click Submit

Your cameras and devices should now appear in Home Assistant.

6. Available Features

Cameras

  • Multiple stream qualities (up to 7 per camera)
  • Motion detection sensors
  • AI detection (person, vehicle, animal, package)
  • Privacy mode toggle
  • Microphone sensitivity control
  • Infrared mode control

Doorbells

  • Doorbell ring events
  • Live view camera
  • Chime type selection

Floodlights

  • Light on/off and brightness
  • Motion detection
  • PIR sensitivity

Sensors

  • Door/window contact sensors
  • Motion sensors
  • Temperature and humidity
  • Water leak detection

NVR

  • Disk health sensors
  • Storage utilization
  • Recording status

7. Automation Ideas

Turn on Lights When Person Detected

automation:
  - alias: "Person detected - lights on"
    trigger:
      - platform: state
        entity_id: binary_sensor.front_door_person
        to: "on"
    action:
      - service: light.turn_on
        target:
          entity_id: light.porch

Doorbell Notification with Snapshot

automation:
  - alias: "Doorbell notification"
    trigger:
      - platform: state
        entity_id: binary_sensor.doorbell_doorbell
        to: "on"
    action:
      - service: notify.mobile_app
        data:
          title: "Doorbell"
          message: "Someone is at the door"
          data:
            image: /api/camera_proxy/camera.doorbell_high

Record Clip on Motion

automation:
  - alias: "Save clip on motion"
    trigger:
      - platform: state
        entity_id: binary_sensor.driveway_motion
        to: "on"
    action:
      - service: camera.record
        target:
          entity_id: camera.driveway_high
        data:
          duration: 30
          filename: "/config/www/clips/driveway_{{ now().strftime('%Y%m%d_%H%M%S') }}.mp4"

8. Troubleshooting

Video Feed Delay

  • Default delay is 5-15+ seconds
  • Enable LL-HLS in stream integration settings to reduce to 1-3 seconds

Integration Fails to Load

  • Verify you're not using Early Access or RC firmware
  • Ensure Protect version is 6.0.0 or higher
  • Check that you're using a local user, not Ubiquiti SSO

Cameras Not Showing

  • Verify RTSP is enabled on each camera
  • Check that the local user has Full Management role for Protect
  • Restart the integration after enabling RTSP

404 or 502 Errors

  • This indicates UniFi Protect crashed on the NVR
  • Check disk health in UniFi OS
  • Restart the UniFi Protect application

9. Frequently Asked Questions

Does UniFi Protect work offline with Home Assistant?

Yes, UniFi Protect works 100% offline with Home Assistant. All communication happens over your local network between Home Assistant and your UniFi console (UDM, Cloud Key, or NVR). You don't need internet access to view live streams, receive motion alerts, or run automations. The only features requiring internet are remote access through the UniFi app and cloud backups.

Is UniFi Protect better than Ring or Wyze for Home Assistant?

For Home Assistant integration, UniFi Protect is significantly better than Ring or Wyze. UniFi offers full local control with no cloud dependency, while Ring and Wyze cameras require cloud connections and have limited Home Assistant functionality. UniFi provides native RTSP streams, AI detection events, and complete device control locally. The tradeoff is higher upfront cost, but you avoid monthly subscription fees.

Do I need UniFi Cloud to use Protect with Home Assistant?

No, you don't need a UniFi cloud account to use Protect with Home Assistant. In fact, Home Assistant requires a local user account (not a Ubiquiti SSO cloud account) to authenticate. Create a local admin user directly on your UniFi console, and generate an API key for Home Assistant. The cloud account is only needed for remote access through the UniFi mobile app.

Can I use Frigate AI with UniFi cameras?

Yes, you can use Frigate with UniFi cameras by accessing their RTSP streams. Enable RTSP on each camera in UniFi Protect settings, then configure Frigate to connect to those stream URLs. This gives you Frigate's advanced AI detection (person, car, dog, etc.) while keeping your UniFi Protect recording intact. Many users run both for redundancy: Protect for 24/7 recording and Frigate for intelligent notifications.

What's the minimum UniFi setup for Home Assistant?

The minimum setup requires a UniFi OS console running Protect (UDM, UDM Pro, Cloud Key Gen2+, or NVR) plus at least one UniFi camera. The most affordable entry point is a Cloud Key Gen2+ ($200) with a G3 Instant camera ($30). For a complete system, many users start with a UDM Pro ($380) which includes the console, router, and 8-bay NVR capability, plus 2-3 cameras.

10. Sources

This guide was compiled from official documentation:

Last verified: 2026-01-31 against Home Assistant 2026.1. If you find outdated information, let us know.

Need help with your UniFi system?

We install and configure UniFi Protect systems throughout Oklahoma. Professional setup with ongoing support.