this post was submitted on 16 Oct 2023
18 points (95.0% liked)

homeassistant

12045 readers
10 users here now

Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. Available for free at home-assistant.io

founded 1 year ago
MODERATORS
 

So I have about 30 Cameras I want to run on my instance. Step by step all of them will record their videos on a local sd card and I will only watch the stream over HA (no hardware nvr). How can I set this up so my phone/laptop will not struggle at all loading these streams?

Right now I am playing them using onvif and or fmpeg and all of my hardware starts to lag heavily when I open the camera sites.

The streams are split up over 3 pages so it's 13/10/7 Streams each.

top 18 comments
sorted by: hot top controversial new old
[–] [email protected] 23 points 1 year ago (1 children)
[–] [email protected] 1 points 1 year ago (1 children)

Each Single camera has an sd card I put in. Longevity for sure is an issue I guess I will have to see how long the survive but for now they are all running strong.

[–] [email protected] 2 points 1 year ago (1 children)

What brand of cameras are these? You would be better going for a dedicated solution like Frigate

[–] [email protected] 1 points 1 year ago
[–] [email protected] 10 points 1 year ago (1 children)

If you have no plans on recording you may want to look up setting up a stand alone instance of go2rtc and one of the optional cards to support WebRTC and MSE near real time viewing vs home assistants default HLS which is sometimes 15seconds delayed and chunky.

If you are not going to view ALL of the streams at the same time the system requirements and overhead for go2rtc should be fairly low depending on the codecs of your cameras and the devices you want to view on as video and audio support on various devices is all over the map, but go2rtc can transcode on the fly.

[–] [email protected] 2 points 1 year ago

I am recording the footage its just saved locally on each camera sd card. Right now I am running most of them via webrtc and the dashboard basically break both my laptop and phone (both just basically freezet up)

[–] [email protected] 7 points 1 year ago (1 children)

With that many cameras I'd get a cheap PC to run Frigate..I feel like you're asking for trouble with the setup you're proposing

[–] [email protected] 3 points 1 year ago (2 children)

So basically thin Client + coral tpu with frigate and then homeassistant Integration? How should I Set up the connection to the cameras? Onvif?

[–] [email protected] 1 points 1 year ago (1 children)

I haven't setup Frigate myself yet so I'm not sure on the specifics but yeah that's the idea! You don't need the tpu for it to work but I plan on getting some because... They're very cool lol. You'd need several to cover 30 cameras, though - I believe they recommend one for every 4 cameras.

But yeah, a cheap thin client will work. The minimum specs for frigate are surprisingly low

[–] [email protected] 1 points 1 year ago (1 children)

You can use OpenVINO now on Frigate and get the same/better performance as a Coral, worth checking out.

[–] [email protected] 1 points 1 year ago (1 children)

Whoa, hadn't heard about that. It's all software?

I don't really need what Coral offers, I was just gonna do it for fun....but if I could do it without buying more hardware, that's even better!

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

Technically it runs in the CPU iGPU hardware accelerator I believe, but as long as you have a 6th gen or newer Intel CPU you don't need a Coral.

[–] [email protected] 1 points 1 year ago (1 children)

Hmmm that's not that recent of a chip, I can probably make that work without breaking the bank!

Thanks again for the heads up, I wasn't looking forward to having multiple USB devices on my rack so this will be great

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago)

Yeah you can grab a ready to go dell usff box on eBay with a 7th gen for about $80.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

You don't need a coral anymore since Frigate supports OpenVINO on 6th gen or newer Intel CPUs. It also supports using QSV for any decoding/encoding that needs to happen.

Frigate uses RTSP for the camera connection.

[–] [email protected] 1 points 1 year ago (1 children)

Okay, but does this (or the coral or whatever) make the delivery of 30 (or just 10) simultaneous streams any smoother than just the straight stream from webrtc in homeassistant?

[–] [email protected] 1 points 1 year ago

No, it's just for object recognition to classify recordings.

[–] [email protected] 0 points 1 year ago

I am new to HA, but I have been running DIY NVR for quite a few years. I have never liked the idea of using SD cards as a recording media. Part of the reason I have security cameras is so that if something happens on my property, I can look back and review the footage.

I run BlueIris in a Virtual Machine on an old-ish 2x16-core Xeon server; for 30 cameras, you could probably get away with any modern Intel system with QuickSync enabled or a separate Nvidia GPU. Video is recorded to the local hard drive on the server in real-time; it's a fast XFS array of 10k RPM drives. As the drive on my Blue Iris VM fills up, old footage is automatically transferred to my NAS, and anything older than 30 days is removed from the NAS.

While this is overkill for a lot of situations, I would still strongly advise against recording to SD cards on each camera. Not only would finding the video you want be a huge pain, but there are so many points of failure. For me to lose any recordings, it would require at least 2 hard drives in my array to fail without me noticing and replacing them. With individual SD cards, one fails and your camera is down along with anything that was recorded.

One other thing to consider is when playing back video, I'm playing from a fast server over a 10Gbit connection. Even if your network is 1Gbit, this will still be much faster and more reliable than trying to stream video from a WiFi-attached camera.