Skip to content

Frigate Integration ​

Prerequisite ​

Frigate require a MQTT broker to setup before in order for some entities such as Occupancy entity to work. That MQTT broker must be an add-on running in Home Assistant, it cannot be an external MQTT broker such as the one running as Docker container in your Unraid host.

Installing MQTT Broker HA Add-On ​

@ref: https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md

Go to Settings > Add on.

Untitled

Click Install.

Untitled

Click Start button to start the service. You should see a green indicator at the top right corner.

Untitled

Navigate in your Home Assistant frontend to Settings -> Devices & Services -> Integrations. Press Configure button in the newly discovered MQTT integration.

Untitled

Press Submit button to continue.

Untitled

Untitled

Testing MQTT Broker Connection ​

Go to the MQTT integration configure to test publish and listening.

Untitled

Install Frigate Integration ​

Go to Settings > Devices & Services, then search for Frigate under the search menu.

Untitled

After clicking it, you should see a dialog menu. Enter Frigate URL.

Untitled

Follow is my Frigate URL checked from Unraid Docker menu.

Untitled

Done.

Untitled

Troubleshooting ​

In my case, I encountered error when starting it up. This seems to happen if the HACS frigate add on is version 5.0.1, so I have to downgrade to v4.0.1 that works with my Frigate docker container that I downloaded from Unraid, which is an older release back in April 2023.

Untitled

Screenshot of my Frigate docker installed through Unraid Apps. Notice it is last updated on April 8, 2023, which is older than the HACS Frigate v5.0.1 requirement.

Untitled

Downgrading HASS Frigate to v4.0.1 ​

For some unknown reason, selecting a version via HACS Redownload option won't update it to the version we selected.

Untitled

Untitled

Some integration such as Frigate already implement Home Assistant Update Service function that allow us to Call its service Update module, so we will use it instead. See https://experimental.hacs.xyz/docs/entities/update_entities for more details on the update entities.

Go to Developer Tools, then select Services tab. Then search for update in the Service menu. Select Update: Install update option from the selection.

Untitled

Select Choose entitybutton in Targets.

Untitled

Search for frigate then select Frigate update from the selection.

Untitled

Check the Version checkbox, enter v4.0.1 in the text field, then click the Call Service button.

Untitled

Once done, you should see a counter in Settings option, click that and restart Home Assistant.

After restarting, check the System Logs to make sure there is no more error, then check for Frigate integration. You shouldn’t see any more error now!

Untitled

You can also see it now detected 3 devices, with some additional entities along with it.

Untitled

For some reason, its Occupancy entities, which is binary sensor that turned on when it detect a person doesn’t seems to be available in my setup (as shown as red exclamation mark). That is because we haven’t configure Frigate to publish event to the MQTT broker running in HA that we setup in Prerequisite section!

Untitled

Configure Frigate to send event to Home Assistant MQTT Broker ​

For the occupancy entities to work, Frigate must be configured to send its event to the MQTT in Home Assistant Add on, not an external ones.

First, get the username and password from MQTT integration in HA.

Untitled

Then modify Frigate config.yaml and add the username and password. In my case, the config file is at /mnt/user/appdata/frigate/config.yaml

Untitled

Restart Frigate container once the configuration is modified. Also check for logs to see if there is any authentication error when Frigate is logging into HA MQTT server.

Frigate MQTT Publish Check ​

Open up MQTT integration then subscribe to the topic frigate/available, you should see a response online.

Example MQTT message received from HA MQTT broker once I restarted Frigate.

Untitled

Check https://docs.frigate.video/integrations/mqtt for a list of topics that Frigate will publish to MQTT server.

Check Occupancy Entities ​

Once Frigate starts to publish to HA MQTT broker, all Occupancy entities should now work as usual. Notice the red exclaimation icon is now dissapeared!

Untitled

Occupancy showing the detected Person object in Living room area 😉

Untitled

Now I can turn on/off light for an area if the area occupancy has person! No more relying on motion sensor!

Extra Configuration ​

Some additional Frigate integration settings such as RRTMP URL template is only available if Advanced mode is enabled in your Profile.

Untitled

Enable Advanced Mode ​

To enable Advanced mode, go to your Profile settings, then toggle on Advanced mode so that we can configure Frigate HASS integration.

Untitled