Integrating Loxone Intercom Video into UniFi Protect via go2rtc
Goal
This guide explains how to make the video stream from a Loxone Intercom (Gen. 1 or newer models supporting MJPEG) visible within the Ubiquiti UniFi Protect NVR system (running on a UDM Pro, UNVR, etc.) by using go2rtc
as an intermediary bridge. go2rtc
will convert the Intercom's authenticated MJPEG stream into an RTSP stream that UniFi Protect can adopt.
This method requires running go2rtc
on a separate machine, commonly as a Home Assistant Add-on or a Docker container on a server/NAS.
Prerequisites
Loxone Intercom: Installed, configured on the network, and accessible via its IP address. You need the username and password for accessing the Intercom's web interface or video stream.
UniFi Protect System: A UniFi Dream Machine Pro (UDM Pro), UNVR, or Cloud Key Gen2+ running UniFi Protect.
Host for go2rtc:
Either a running Home Assistant installation (capable of running Add-ons).
Or a machine capable of running Docker containers (e.g., a server, NAS).
Network Access: The machine running
go2rtc
must be on the same network as the Loxone Intercom and the UDM Pro, or have appropriate network routes and firewall rules configured.Credentials: Know the IP address and login credentials (username/password) for your Loxone Intercom.
Basic Knowledge: Familiarity with your network setup, UniFi interface, and either Home Assistant or Docker basics.
Diagram (Conceptual)
Loxone Intercom --------> [HTTP MJPEG + Basic Auth] --------> go2rtc Host (HA/Docker) --------> [RTSP Auth] --------> UDM Pro / UniFi Protect
(e.g., 10.0.2.88) (e.g., 10.0.2.123) (UniFi NVR)
Step-by-Step Instructions
Step 1: Install go2rtc
You need to install go2rtc
on a host machine. Choose one of the following methods:
A) Using Home Assistant Add-on:
Navigate to your Home Assistant interface.
Go to Settings > Add-ons.
Click the Add-on Store button (usually in the bottom right).
Click the three dots icon (⋮) in the top right corner and select Repositories.
In the "Manage add-on repositories" dialog, paste the following URL into the input field:
https://github.com/AlexxIT/hassio-addons
Click Add.
Close the repositories dialog. The Add-on Store will refresh (this might take a few moments). If the new add-on doesn't appear immediately, try refreshing your browser page.
Once refreshed, search for
go2rtc
within the Add-on Store.You should now see the
go2rtc
add-on from the repository you just added. Click on it.Click Install and wait for the installation to complete.
After installation, configure the Add-on (see Step 3 below).
Enable "Start on boot" and "Watchdog" if desired on the Add-on's page.
Start the Add-on.
You can access the
go2rtc
web UI via the sidebar link or by clicking "Open Web UI" on the Add-on page to verify it's running (usually accessible viahttp://<home-assistant-ip>:1984
).
B) Using Docker:
Ensure you have Docker installed and running on your chosen host machine.
Open a terminal or SSH session to your Docker host.
Run the following command to pull and start the
go2rtc
container:docker run -d --name go2rtc --restart=unless-stopped -p 1984:1984 -p 8554:8554 -v $(pwd)/go2rtc.yaml:/config/go2rtc.yaml alexxit/go2rtc
-d
: Run in detached mode.--name go2rtc
: Assigns a name to the container.--restart=unless-stopped
: Ensures the container restarts automatically.-p 1984:1984
: Maps the host port 1984 to the container's API/Web UI port.-p 8554:8554
: Maps the host port 8554 to the container's default RTSP port.-v $(pwd)/go2rtc.yaml:/config/go2rtc.yaml
: Important: This mounts a configuration file namedgo2rtc.yaml
from your current directory ($(pwd)
) into the container. Create an emptygo2rtc.yaml
file in your current directory before running this command. You will edit this file in Step 3. Adjust the path$(pwd)/go2rtc.yaml
if you store your configuration elsewhere.
Verify the container is running (
docker ps
).You can access the
go2rtc
web UI viahttp://<docker-host-ip>:1984
.
Step 2: Generate Basic Authentication Header
The Loxone Intercom protects its MJPEG video stream with Basic HTTP Authentication. go2rtc
needs this authentication information provided in a specific format (Base64 encoded).
Go to a Basic Auth Header generator website, for example: Generate HTTP Basic Auth Header
Enter the Username and Password that you use to access your Loxone Intercom's web interface or video stream.
Click the "Generate header" button (or similar).
The tool will output a string that looks like
Authorization: Basic yourbase64string=
(the characters afterBasic
will be different based on your credentials).Copy the entire generated string, including
Authorization: Basic
. You will need this exact string in the next step.
Step 3: Configure go2rtc Stream
Now, configure go2rtc
to pull the MJPEG stream from the Loxone Intercom and serve it as an RTSP stream.
Edit the
go2rtc
configuration:Home Assistant Add-on: Go to Settings > Add-ons > go2rtc. Click the Configuration tab. Change the editor mode to YAML (usually via the three dots menu).
Docker: Edit the
go2rtc.yaml
file you created and mounted in Step 1B.
Paste the following configuration into the editor, replacing the existing content or adding it under the relevant sections:
YAML
streams: http_mjpeg: "http://10.0.2.88/mjpg/video.mjpg#header=Authorization: Basic yourbase64string" rtsp: listen: ":8554" # RTSP Server TCP port, default - 8554 username: "admin" # optional, default - disabled password: "pass" # optional, default - disabled default_query: "video&audio" # rtsp: # Enable the RTSP server functionality listen: ":8554" # Port go2rtc listens on for RTSP connections (default: 8554) # Define credentials UniFi Protect will use to connect to *this* go2rtc RTSP stream # You can change these, but remember them for Step 5. username: "admin" password: "pass" # Optional: Specify default codecs if needed, often not required. # default_query: "video&audio" # Loxone MJPEG likely only provides video. Remove or keep commented if unsure. # Optional: Configure the Web UI/API if needed (often defaults are fine) # api: # listen: ":1984"
Make the crucial replacements:
In the
loxone_intercom:
stream definition:Change
http://10.0.2.88/mjpg/video.mjpg
to use your Loxone Intercom's actual IP address.Replace the entire example header
Authorization: Basic yourbase64string
with the full header string you generated in Step 2. Make sure it's enclosed in double quotes and follows the#header=
part exactly.
In the
rtsp:
section:You can keep or change the
username
andpassword
. These are the credentials UniFi Protect will use to connect togo2rtc
, not the Loxone Intercom credentials. Remember what you set here.
Save the configuration:
Home Assistant Add-on: Click Save. You may need to restart the
go2rtc
Add-on for changes to take effect (check the Log tab for confirmation).Docker: Save the
go2rtc.yaml
file. Restart the container:docker restart go2rtc
.
Verify the stream in go2rtc: Open the
go2rtc
Web UI (http://<go2rtc-host-ip>:1984
). You should see yourloxone_intercom
stream listed. Click on it to see if the video is playing correctly. This confirmsgo2rtc
can access the Intercom stream.
Step 4: Enable 3rd-Party Camera Discovery in UniFi Protect
Before UniFi Protect can find the go2rtc
stream, you need to enable the feature.
Log in to your UDM Pro (or other UniFi Console).
Open the UniFi Protect application.
Navigate to Settings (usually the cog icon).
Go to the System section.
Scroll down to find the Advanced settings area.
Toggle ON the setting named "Enable 3rd-Party Cameras" or similar (the exact wording might vary slightly).
Step 5: Add the go2rtc Stream as a Camera in UniFi Protect
Now, adopt the go2rtc
RTSP stream.
While still in the UniFi OS interface (not Protect specifically), navigate to UniFi Devices (usually the icon showing a switch or UDM).
In the top-right corner of the UniFi Devices page, click the Question Mark (?) icon.
From the dropdown menu, select "Try advanced adoption" (or similar wording like "Add device manually" / "Advanced Add").
A window or form will appear asking for camera details. Enter the following:
IP Address: The IP address of the machine running
go2rtc
(your Home Assistant IP or Docker host IP).Port:
1984
(This is the port you specified in the prompt. It typically refers to the go2rtc API/WebUI port. UniFi might use this for initial discovery or proxying. If this fails later, you might need to troubleshoot using the RTSP port8554
).Username:
admin
(or the username you configured ingo2rtc.yaml
underrtsp:
in Step 3).Password:
pass
(or the password you configured ingo2rtc.yaml
underrtsp:
in Step 3).
Click "Adopt" or "Add".
UniFi Protect should now attempt to connect to go2rtc
using the details provided, discover the RTSP stream (rtsp://admin:pass@<go2rtc-host-ip>:8554/loxone_intercom
), and add it as a camera. It might take a minute or two to show up as "Online" and display the video feed within UniFi Protect.
Troubleshooting
No Video in UniFi Protect:
Verify the stream works correctly in the
go2rtc
Web UI first (Step 3.5). If not, checkgo2rtc
logs (Add-on > Log tab; Docker >docker logs go2rtc
) for errors connecting to the Loxone Intercom (e.g., wrong IP, incorrect auth header).Double-check the IP address, Port (try
8554
instead of1984
if1984
doesn't work in Step 5), Username, and Password entered in UniFi Protect's advanced adoption (Step 5). They must match thego2rtc
host IP and thertsp:
credentials ingo2rtc.yaml
.Check firewalls: Ensure the UDM Pro can reach the
go2rtc
host on TCP port 1984 and/or 8554. Ensure thego2rtc
host can reach the Loxone Intercom on its HTTP port (usually 80).Test the RTSP stream directly using a tool like VLC: Open
rtsp://admin:pass@<go2rtc-host-ip>:8554/loxone_intercom
(use the correct credentials and stream name from yourgo2rtc.yaml
).
Incorrect Base64 Header: Ensure you copied the entire
Authorization: Basic ...
string in Step 2 and correctly placed it after#header=
in Step 3.go2rtc Errors: Check the logs for specific error messages.