Context
Hardware description - Frigate -
Lessons learned
Next up
Context
After ordering a back-ordered Yellow box in fall of 2022, and playing with a few dozen Shelly wifi switches over the six months, I gave up waiting and bought an Intel based mini-pc, overpaid for a Google TPU, and installed HAOS in March of 2023 and the adventure started.
Background is a single family home on 3 acre parcel with a long driveway with a detached garage/shop, and another detached building that holds a dog rescue facility.
In the beginning we had two Cat5 wired networks, one for the house and one for the detached shop, connected by TPLink outdoor access points on light posts aimed at each other. Network components all TPLink OMADA switches and access points. In addition a legacy CCTV/DVR system for three driveway cameras. The digital motion detection would basically run most of the night from insects showing up on the IR field of view making it worthless
Hardware Description - Frigate
Frigate conversion of the IP cameras was the job 1, along with automation dependent CCTV bells and whistles. The vision is to integrate the three driveway cameras, and alerts from Frigate detected Objects, into the living room where we spend most of our time and cannot see the driveway.
I soon learned the limitations of trying to move a lot of 4k video around. Network pipes have to be fast and consistent, and the computers driving them also need more horsepower to avoid jerky or slow loading video on the home network. The wireless bridges (TP Link Omada EAP 650s, mounted 18 feet tall, 80 feet apart) did not hold up to the latency requirements, and a 220 foot fiber optic cable connecting my two physical networks dramatically reduced lag and dropped connections.
Once things were going OK with the network flow, I discovered the CROP features of FFMPEG and dramatically improved the driveway CCTV cameras. By this time I had dedicated a second Intel NUC Home Assistance instance to Frigate to isolate the CPU and traffic loads, using the Frigate Proxy to integrate those cameras into the main HA system.
Imagine my surprise when the Frigate box started rebooting without notice. I traced it to sustained processor loads above 60%, which was leading to thermal shut down and restart. So my second lesson was that MMPEG transcoding is processor intensive, and the Mini PCs (Intel N3305, Intel i5 12450H), cannot be run anywhere near peak processor loads without overheating.
My solution was to implement a third Home Assistant NUC that is a dedicated transcoding / restreaming box separate from the Frigate NUC that records and detects objects in the video. I can keep both processor temps below 70c with this technique. Frigate itself is very efficient, but transcoding and restreaming multiple channels definitely loads up the processors.
Current system load (I kept adding cameras…) is 10 4k cameras, 8 of which are object detected (at low res) and recorded (at high res) and seems to be fit fine on an Intel i5 12450H processor, but the dedicated restreaming box struggles to transcode more than 6 video feeds at a time with the same i5 12450H. A short term stint on an i712650H did better but box died after a few weeks so returned to tried and true Beelink i5 12450H’s.
Lessons learned -
Network infrastructure for smoothest video really matters. Removing all wireless bridges, even industrial strength ones, improved process dramatically.
Frigate detection and event recording is low CPU, but continuous recording, restreaming of cameras is material, and FFMPEG transcoding takes significant CPU resources and must be deployed with care.
Max CPU is not usable in room temperature ambient conditions without PC overheating, so analysis is required to determine max acceptable CPU loads that keeps CPU temps under 80c.
For i5-12450H, CPU loads per channel were - 2% Frigate object detection and recording. 0.5% restreaming. 4.5% transcoding. Max loads about 30% for comfortable CPU temps.
Multiple HA instances have been a great solution to share CPU workloads and keep the load on the core HA instance as low as possible for longevity.
–
Next steps -
Currently have achieved restream of my two home Tivo boxes to escape the disastrous Tivo App for remote use. Next up are Boardlink RM4 and ESP 360 remote in an attempt to bring inbound and outbound IR support to the whole property beyond the living room that uses the Harmony Hub.
A if anyone is interested, I can offer a similar a lessons learned post about (request in comments);
Network configuration / using VLANs to isolate IOT and camera layers from the internet and other local network layers)
Lighting control that includes door sensing for motion lights that come on before you get there.
Logic based interpretation of driveway motion and vehicle sensors to voice announce intruder activities on smart speakers.
Just amazing how much cool stuff can be done even as a first year rookie! Exciting to see what future years bring. The potential is limited only by my imagination and smarts.