Fixing UniFi Protect Integration in Home Assistant
By Charles
The UniFi Protect integration in Home Assistant was showing setup_error for weeks. Here’s what was wrong and how I fixed it.
The Symptoms
- Integration showed
setup_errorstatus - No cameras visible in Home Assistant
- Logs showed authentication failures
The Root Cause
The integration was configured without proper credentials. The secrets.yaml file had:
# unifi_protect_password: "" # Empty!
The Fix
Step 1: Create a Local User
UniFi Protect works best with a local account (not cloud SSO):
- Log into UniFi Console at
your-udm-ip - Go to Users → Add User
- Select “Local Access Only”
- Role: Limited Admin
- Application Access: Protect only (Network not required)
Step 2: Configure in Home Assistant
The integration is UI-configured, not YAML:
- Settings → Devices & Services
- Delete the broken UniFi Protect integration
- Add Integration → UniFi Protect
- Enter:
- Host:
your-udm-ip - Username: (the local user you created)
- Password: (the password you set)
- Uncheck “Verify SSL” if using self-signed cert
- Host:
Step 3: Verify
After setup, you should see:
- All cameras as entities
- Motion detection sensors
- Recording access
- Live feeds available for dashboards
Bonus: Security Note
While troubleshooting, I discovered my UniFi cameras needed a firmware update to patch CVE-2025-23123 (RCE vulnerability). Always keep firmware current, especially on cameras.
Lessons Learned
- Check credentials first - Most integration errors are auth issues
- Use local accounts - More reliable than cloud SSO for API access
- View Only is enough - Full admin access isn’t needed for monitoring
Resources
- UniFi Protect Cameras — The cameras we use with this integration. G4 Bullet and G4 Instant are solid choices for Home Assistant.
- UniFi Dream Machine Pro — Runs UniFi Protect natively. The console that hosts the camera NVR.
- Home Assistant — Free, open-source home automation platform with built-in UniFi Protect integration.