Going from running perfectly HA setup to scaling up for the next level - Video - next step?

I have a RPI4 w/8 Gig of RAM running Home Assistant Supervised (healthy and supported) on an SSD. I have about 150 automations and 90 devices (Wemo, Yolink, Leviton and Shelly) attached. Everything has been thoroughly tweaked and is running flawlessly. RPI CPU only spikes to about 20% and most the time is at 5%. RPI temperature is consistently about 105 degrees Fahrenheit, and RPI memory usage is never more than about 25%.

Even so I want to add high definition surveillance video from seven cameras with local recording only, integrated with HA, most likely with Fortifate Frigate but I am open to suggestions. I know the current hardware will not be able to handle this properly and won’t even try going down that road. What is the very best next step to be able to add the functionality requested while still keeping the new hardware at an average 5% CPU?

1 Like

Not fate. You don’t have to choose some commercial, closed source product from a company which I only know because of their constant stream of vulnerability they are delivering to their (paying) customers. :put_litter_in_its_place:

Privacy respecting and open source solutions like frigate, motioneye, shinobi and more do exist :tada:

Regarding hardware recommendations you could consult the docs of the software planning doing the hard tasks, for example frigate (see the docs for the recommended hardware) and add some more headroom for HA. Probably also want to get your hands on some tpu for efficient object detection if that is a road you want to take :point_down:

A $60 device will outperform $2000 CPU

Source: Recommended hardware | Frigate

Thank you, I did mean to say “Frigate” instead of a misspelled Fortigate!

I will check on the hardware requirements, thank you!

I have been using Frigate for several years happily. I am one of the lucky ones who jumped on a Google coral earlier before the price jumped but I would say you need this hardware if you are going down this path.

I run frigate on a different machine to HA. You don’t have to give up your pi4 for HA. It is working perfectly, get something small, low power but x86_64 and a coral for frigate.

1 Like

That is an outstanding idea, but could I have all the same dashboard functionality within HA for accessing those cameras and videos? How does that work?

this month fortinet did extraordinary and disclosed (and fixed) nothing less than a remotely exploitable pre-auth vulnerability that hits a solid 9.8 ranking on the “shit hits the fan” :poop::dash::straight_ruler: meter :medal_sports:

https://nvd.nist.gov/vuln/detail/CVE-2023-27997

This company should really look out for some knowledge (:brain:) in the “cyber security” area - oh shoot! They think of themselves as a “Global Leader of Cybersecurity Solutions and Services” (:rofl:) guess we are simply doomed :boom:

Oh good :+1:

Actually the recommend way of running frigate is on a dedicated machine an not together with/on HAOS.

(Like always) the docs got you covered for a more information:

If possible, it is recommended to run Frigate standalone in Docker and use Frigate’s Proxy Addon.

PS.: The very helpful thread “How to help us help you - or How to ask a good question” also has a chapter (:seven:) which helps finding a good (and avoid the ugly or bad) title for your topic :muscle: (“What is the next step?” certainly is in located bad/ugly category :wink:)

1 Like

Yes it works just the same.

1 Like

Yes well, I was trying to use a catchy title to gain a little more attention from curious folks - and it worked - but you are right, I changed the title. Thanks for the help!

1 Like

I am looking through the documentation but it is so detailed that it is hard to understand an answer to this question - maybe you know off the top of your head?

@orange-assistant If I use the Add-On instead of the Integration (which would be the case if I have it on different hardware as I understand it) - what do I lose by not being able to have it included as an integration within HA? Does that mean it could not be on the same dashboards and the automation capabilities are diminished?

You can use the integration and the custom card and the proxy addon with HA and frigate on different machines.

Frigate / HA integration consists of three parts:

  1. Frigate itself
  2. The Frigate integration to provide entities you can automate on
  3. A custom card for fancy viewing.
  1. Can be provided in two ways:

a) the frigate addon - runs frigate on your HA machine; or
b) the frigate proxy addon - which links HA to frigate running on another computer.

1 Like

Thank you! You are saying therefore that I would have all the same functionality and available items as there are for the actual integration (I could access deails about it withint automation yaml code etc.)?

Yes, (but there is a 10 char minimum.)

For names of objects, or pieces of data, or - ?

image

1 Like

How is that the solution.

1 Like

Nah, this isn’t really the case. Obviously, you may choose to do this if you want, but it’s absolutely not necessary and both HA and Frigate can cohabit very well indeed, if the configuration is appropriately chosen.

I was running Frigate on 5x cameras as well as a similar number of automations and integrations as OP, all on an RPi4 with CPU generally sitting in the 50-70% area. I’ve recently swapped this for a generic x86 solution (Optiplex 3060, i5-8500T for around £100) and migrated the whole lot to run on this, with CPUs now sitting in the 10-20% area, with additional cameras running for more object detection. The key to making Frigate cohabit nicely is to make sure you are using hardware acceleration for both video decoding and object detection, along with appropriate tuning of camera hardware to ensure that the streams are appropriate for the use case. Decoding offloading is mostly around ensuring that the CPU is handling the decoding workload, and the object detection can be optimised either with a Coral TPU or OpenVINO GPU-based solution if you prefer. (back to back testing for me has shown that the Coral remains king on my hardware).

I have no pressing need to run Frigate on a dedicated hardware and it would seem mostly overkill given its relatively light footprint (for my use case, anyway). Frankly, unless you have a large number of cameras or are doing everything at 30fps/4k (which is absolutely not required to get the best out of it!), you’re just going to end up with hardware lying around, running idle, consuming power.

One thing to note from the documentation is that Frigate really should run directly on the hardware, not through virtualisation. Docker on bare-metal is fine (this would cover HAOS), docker in a VM will be more problematic. So if you are intending to run it on a machine other than the HA host, be aware that this may limit your options if you intended to use it for other things as well.

1 Like

Indeed. A virtual machine is a no-go. But HAOS still got limitations (as today stated in the docs):

image

So your GPU-based test for object detection weren’t probably done on/in HAOS? :thinking:

1 Like

This is a touch out of date. You can absolutely use external storage for HAOS now, as it supports being able to connect SSDs and move data stored (which includes the /media folder used by Frigate). I had this configured since day 1 with my own RPi4 deployment. Also, still using x86 HAOS, you can obviously utilise whatever storage is installed (NVMe SSD for me), and recent developments are adding support for off-box storage using network storage, although this is brand new and I’ve no idea how well it works with Frigate yet! The challenge comes when wanting to use multiple different types of storage - HAOS is indeed quite inflexible here.

I tested using OpenVINO on my Intel GPU (which was supported on HAOS), which is all my Optiplex 3060 had installed. If you were using an Nvidia or AMD GPU, I’d certainly look into a supervised or standalone HA install under docker, but the point about running HA and Frigate together would still stand - it would work fine and, indeed, supervisor and managed OS aside, both of these installs are basically the same as HAOS anyway - you just get more control over the host OS.

The choice between HAOS and a self-managed docker install is a personal one down to your own needs and abilities. My point was more about the need to run Frigate away from HA, which I would still argue is nearly always unnecessary in most deployments.

1 Like

I think I will fork over the $ to run HA Supervised on a miniPC or the like, to support cameras etc., and leave the weewx daemon running on the old RPI…

Having fun here but worth asking… what is the most overkill ridiculous hardware to use and with what specs to be able to run an unlimited number of things (including cameras) on one machine dedicated solely to HA Supervised? Thoughts?