About meContact
Guides

Frigate with Hikvision or Dahua in Home Assistant: what does it add if you already have an NVR?

You have Hikvision or Dahua cameras, the recorder is recording and Home Assistant shows the picture. A common next question is whether it is worth adding Frigate.

This guide helps you make that decision. It explains what Frigate adds on top of what you already have, when it makes sense, when you do not need it and what to check in the cameras, the recorder and the hardware before any work starts.

This is not an installation guide. Connecting Hikvision cameras to Home Assistant, camera events and linking them to an alarm are covered in a separate guide: Hikvision in Home Assistant.

Does Frigate replace your NVR?

It does not have to. Frigate is itself a recorder with local object detection, but it can run alongside an existing NVR as an extra layer of analysis.

In that setup the NVR keeps recording as before. Frigate takes what it needs for analysis from the camera streams and passes the results to Home Assistant. It can also save its own recordings and event images if you configure it to.

Whether you still need the NVR afterwards depends on what you expect from it: continuous recording on its own disks, the manufacturer's app or access for other people. That is a decision to make deliberately, not something that happens automatically when Frigate is added.

What Frigate adds on top of a normal camera view

A camera view in Home Assistant shows the picture. Frigate analyses it. First, lightweight motion detection finds where something changed in the frame, and then object detection runs on that area.

Frigate also has additional features, such as face recognition and licence plate recognition. These are separate modules with their own requirements and have to be assessed for each camera and mounting position.

Object detection

By default Frigate tracks people. Cars, animals and other objects from the model have to be enabled separately. This means a shadow, a branch or a change in light does not have to become an event.

Zones

You can draw zones in the frame, such as the driveway or the gate, and choose which objects count in them. A person on the pavement outside the fence and a person on the driveway can then produce different events.

Event images and recordings

Frigate can save an image of every tracked object and keep recordings for a set retention period. It groups activity in its review view as alerts and detections, which makes it quick to see what happened.

Data for automations

Home Assistant gets entities for cameras, zones and objects, for example whether a person is in a zone right now and how many objects of a given type there are. Notifications with an image and automations can be built on top of that.

Analysis in the camera or in Frigate

Some Hikvision and Dahua cameras have their own image analytics, such as telling people and vehicles apart. Home Assistant can receive those events through the manufacturer integration, as described in the Hikvision guide.

Frigate does the analysis on its own side, on the server. It works regardless of the camera brand, but it needs processing power. Which approach works better in a specific place depends on the cameras, the view and your expectations. That cannot be settled without checking the actual installation.

How Frigate works with your NVR and Home Assistant

In simple terms, the data flows like this:

  1. The camera or the recorder provides video streams over RTSP.
  2. go2rtc, which is built into Frigate, pulls the streams and can pass them on, which reduces the number of connections to the camera.
  3. Frigate usually analyses the lighter sub stream, while it can record the high quality main stream.
  4. Information about detected objects and events reaches Home Assistant over MQTT.
  5. The Frigate integration in Home Assistant creates entities, gives access to images and recordings and provides the basis for notifications.

The Frigate integration is not built into Home Assistant. It is installed through HACS and needs a configured MQTT broker that both systems use in order to work fully.

What to check in the cameras and the recorder

Frigate depends on the quality and availability of the streams. In an existing Hikvision or Dahua installation these are the key areas.

Access to RTSP streams

RTSP has to be enabled. If the cameras are connected to the PoE ports on the recorder, you need to check whether they can be reached directly or whether the streams have to be taken through the recorder using a channel number. Hikvision documents the RTSP address format for recorders as well. How this works in practice depends on the model and firmware.

Main stream and sub stream

A lower resolution sub stream with a few frames per second is usually enough for analysis. It helps if it has the same aspect ratio as the main stream. A resolution that is too low makes small objects harder to detect.

Codec

H.264 gives the best compatibility. H.265 saves space, but not every browser can play it. The Frigate documentation recommends turning off features such as H.264+ or H.265+ and setting the keyframe interval to match the frame rate.

Number of connections

Every client that pulls a stream, such as Frigate, the recorder, an app or Home Assistant, uses a connection to the camera. The limits depend on the camera and recorder model. Passing the stream on through go2rtc helps keep that number down.

Authentication and firmware

Based on user reports referenced in the Frigate documentation, newer Hikvision cameras may need a change to their RTSP authentication settings. The exact model and firmware version of the cameras and the recorder always matter.

ONVIF

Frigate can use ONVIF to read the stream addresses from a camera and to control PTZ cameras. The picture it analyses still comes from the video streams.

What hardware Frigate needs

Frigate decodes and analyses video continuously, so it needs real resources. The project documentation highlights a few principles:

  • a detector is recommended for object detection, and the CPU on its own is not recommended for everyday use;
  • on Intel computers, the integrated graphics can support detection through OpenVINO and hardware video acceleration can handle decoding;
  • the Google Coral is no longer recommended for new installations;
  • the Raspberry Pi 5 has no hardware H.264 decoder, so decoding those streams falls on the CPU, although it can work with a Hailo accelerator;
  • recordings need suitable storage, and RAM has to match the number of cameras and the features you enable.

How many cameras a specific computer can handle depends on the resolution and frame rate of the analysed streams, the activity in the frame, the number of detected objects and the chosen detector. Only a measurement on the actual installation gives a reliable answer, which is why I do not give universal numbers here.

When Frigate makes sense

Frigate is a valuable addition when:

  • you want to tell people and vehicles apart from ordinary motion, regardless of what the camera itself can do;
  • you need zones, for example a notification only when someone walks onto the driveway, not when they pass on the pavement;
  • you want notifications with an image of the detected object and automations based on what is actually in view;
  • you have cameras from different brands and want one consistent analysis for all of them;
  • local video processing without the cloud matters to you.

How to connect events like these with the alarm, presence and lighting is covered in the Home Assistant automations guide. An example dashboard that combines cameras with an alarm is shown in the Cameras and alarm project.

When you may not need Frigate

Frigate is not always a good idea. It may not make sense when:

  • your current system already gives you everything you need, such as reliable camera events in Home Assistant;
  • you only need live view and recording, not image analysis;
  • the cameras or the recorder do not provide suitable streams or do not allow additional connections;
  • there is no hardware that can handle the analysis without overloading the system that runs Home Assistant.

In that case it is better to make good use of what is already installed first.

What to prepare before the installation is assessed

Before deciding to go ahead, it is worth collecting a few facts:

  • the camera and recorder models and their firmware versions;
  • the number of cameras and whether they are connected to the recorder or to the local network;
  • the codecs, resolutions and frame rates of the main stream and the sub stream;
  • how the cameras are connected to Home Assistant today, if at all;
  • what hardware Home Assistant runs on and whether there is room for Frigate;
  • what you expect from detection: which objects, in which places and at what times.

Want to check whether Frigate makes sense for your CCTV?

I can assess whether your cameras, recorder and hardware are suitable for Frigate, suggest a stream layout and take care of the Home Assistant integration, notifications and automations.

Tell me which cameras and recorderyou have, how many cameras there are, and what you expect from Frigate. I will check the options and reply. → click here

Sources and freshness