software

MQTT

A lightweight publish and subscribe messaging protocol used to connect services in a self hosted home lab without them needing to talk directly to each other.

MQTT is a lightweight messaging protocol built around a publish and subscribe pattern. Applications publish messages to named topics on a central broker. Other applications subscribe to those topics and receive the messages as they arrive. Nothing is stored long term. Nothing is queued unnecessarily. The protocol was designed for low power, low bandwidth environments, which makes it well suited for a home lab running on a Raspberry Pi.

The broker

To use MQTT, you run an MQTT broker. It is a small service that sits on your network and handles message routing. Eclipse Mosquitto is the standard choice for self hosted setups. It is open source, lightweight, runs comfortably as a Docker container, and is directly supported by both Frigate and Home Assistant.

Home Assistant also ships with a built in MQTT broker that can be enabled without installing anything separately. For a simple setup this is the easier starting point. Running a dedicated Mosquitto instance gives more control and keeps the messaging layer independent of any single application.

How it connects Frigate and Home Assistant

Frigate publishes a detection event to an MQTT topic the moment it identifies something in a camera feed. Home Assistant subscribes to those topics and can fire any automation in response. The two applications share only the broker as a dependency. Adding new automations in Home Assistant requires no changes to Frigate. Adding new camera feeds to Frigate requires no changes to Home Assistant.

This is the pattern that makes a self hosted home automation setup composable. Services stay small and focused. The broker handles the connections between them.

For more on why this architecture matters, see Message Brokers.