Unifi Home Assistant Problems: Fix RTSP and MQTT Errors Now
If your Unifi cameras are failing to connect to Home Assistant or sending MQTT events inconsistently, This is a commonly reported issue. This guide provides targeted steps to resolve these issues using brand-specific tools like UniFi Protect and model-specific configurations. Begin with quick checks, then dive into detailed troubleshooting for persistent problems.
First Steps for Your Unifi Issue
Before diving into complex diagnostics, try these 30-second checks to resolve common issues:
- Restart your UniFi Protect app and Home Assistant to refresh connections.
- Check the camera's LED status in the UniFi Protect app — a solid green light indicates a stable connection.
- Verify the camera's power supply (wired or battery) and ensure it's fully charged.
- Confirm your Home Assistant MQTT broker settings match the UniFi Protect configuration.
- Log out and back into the UniFi Protect app to refresh the session.
Step 1: Verify RTSP/ONVIF Stream Settings
Incorrect stream protocols are a common cause of connectivity issues. In the UniFi Protect app, navigate to Device Health → Stream Status to confirm your camera is using RTSP or ONVIF. For Home Assistant, ensure the integration uses the correct stream URL format:
- RTSP:
rtsp://[camera-ip]:554/Streaming/Channels/101 - ONVIF: Confirm the camera supports ONVIF in Camera Adoption Status.
If using ONVIF, ensure your Home Assistant configuration includes the correct ONVIF discovery settings. Restart both the UniFi Protect app and Home Assistant after changes.
For G5 Bullet Cameras
- Check the Ethernet port for loose connections.
- Ensure the camera is connected to a 2.4GHz Wi-Fi network for optimal RTSP performance.
For AI 360 Cameras
- Verify the Storage RAID Status in UniFi Protect to ensure sufficient space for video streams.
- Confirm the PoE cable is properly connected and the camera is receiving power.
Step 2: Configure MQTT Broker Settings in Home Assistant
MQTT failures often stem from incorrect broker configurations. In Home Assistant, go to Configuration → Integrations → MQTT and ensure the broker address matches your UniFi Protect setup (e.g. mqtt://unifi-mqtt-broker:1883).
Check MQTT Status in UniFi Protect
- Navigate to Device Health → MQTT Status to confirm the camera is enabled for MQTT.
- If the status shows an error, restart the MQTT service in Home Assistant via the Developer Tools → MQTT section.
Verify MQTT Topics
- Ensure your Home Assistant automation rules are using the correct MQTT topics for your camera (e.g.
homeassistant/camera/g5_bullet_01/event). - Use the MQTT Explorer tool in Home Assistant to test topic subscriptions.
Step 3: Troubleshoot Automation Triggers
Incorrect automation conditions can lead to false triggers or missed events. In Home Assistant, navigate to Automation and verify the camera's entity ID matches the one in the UniFi Protect app (e.g. camera.g5_bullet_01).
Test Motion Detection
- In Device Health → Motion Detection, check for false positives or missed detections.
- Ensure the Motion Detection Zone is correctly configured for your camera's field of view.
Validate Stream Access
- Use the
ffmpegtool in Home Assistant's Developer Tools to test RTSP stream access (e.g.ffmpeg -i rtsp://[camera-ip]:554/Streaming/Channels/101). - If the stream fails, check for firewall or port forwarding issues blocking RTSP traffic on port 554.
Step 4: Update Firmware via UniFi Protect
Outdated firmware can cause compatibility issues with Home Assistant. In the UniFi Protect app, go to Device Health → Firmware Update and ensure the camera is connected to a stable 2.4GHz Wi-Fi network.
For AI 360 Models
- Check Storage RAID Status to confirm sufficient space for the update.
- If the update fails, reset the camera via the reset button (hold 5-10 seconds) and retry after 10 minutes.
For G5 PTZ Cameras
- Ensure the PoE+ cable is properly connected and the camera is receiving power.
- If the firmware update fails, factory reset the camera via the reset button and retry the update after 10 minutes.
Step 5: Factory Reset and Re-Pairing
If basic fixes fail, perform a factory reset on your camera and re-pair it with UniFi Protect. For all models, press and hold the reset button for 5-10 seconds until the LEDs indicate the restore has begun.
Re-Pairing in UniFi Protect
- After the reset, add the camera to UniFi Protect via Add Device → Camera.
- Ensure the camera is connected to a stable 2.4GHz Wi-Fi network during the pairing process.
Reconfigure Home Assistant Integration
- After re-pairing, re-add the camera to Home Assistant via Configuration → Integrations → UniFi Protect.
- Verify the camera's entity ID and stream settings in Home Assistant.
Root Causes of Unifi Home Assistant Problems
Persistent issues often stem from:
- Incorrect stream protocol settings (RTSP/ONVIF) in UniFi Protect.
- Outdated firmware on the camera or UniFi Protect app.
- MQTT broker misconfiguration in Home Assistant.
- Insufficient Wi-Fi signal strength (especially for battery-powered models).
- Conflicting automation conditions in Home Assistant.
UK-specific challenges include double NAT from Virgin Media routers and CGNAT from mobile broadband providers, which can block remote access. Ensure your router is configured to allow traffic on port 554 for RTSP and port 1883 for MQTT.
Long-Term Unifi Maintenance Tips
To avoid recurring issues, follow these best practices:
- Regularly update firmware via the UniFi Protect app.
- Monitor Wi-Fi signal strength using the Network Diagnostics tool in UniFi Protect.
- Use 2.4GHz Wi-Fi for cameras to ensure compatibility with Home Assistant.
- Test MQTT connections periodically using the MQTT Explorer tool.
- Backup camera configurations in UniFi Protect to avoid data loss during firmware updates.
Full disclosure: we built scOS to address exactly this — the frustration of cameras that depend on Wi-Fi to function. scOS uses permanently powered cameras connected via Ethernet, eliminating connectivity issues caused by unstable Wi-Fi networks.
Is a Your Camera Replacement Needed?
If troubleshooting fails and your camera is over 5 years old, consider replacement. Wired cameras typically last 5-8 years, while battery-powered models degrade after 3-5 years. Check the Camera Adoption Status in UniFi Protect to confirm compatibility with newer firmware updates. Under the Consumer Rights Act 2015, UK consumers have up to 6 years to claim faulty goods.
Final Tips for Success
- Always use UniFi Protect for camera management and firmware updates.
- Ensure your Home Assistant MQTT broker is configured correctly and accessible to the camera.
- For AI 360 models, monitor Storage RAID Status to avoid firmware update failures.
- If issues persist, contact Unifi support via https://help.ui.com/hc/en-us/.