Wondering if anyone has had success in setting up a self-hosted (maybe open source) camera system for their site? And if so, any advice? recommendations? sources for information that you found useful?
I have a bunch of Hikvision cameras (DS-2CD2342WD-I) that were about $120/each that I'm happy with. I don't have any security concerns about them phoning home or doing anything nefarious, because they're completely segregated on their own locked down network.
If you want to record, you'll need to set up an NVR. You can buy one (i.e. https://amzn.to/3HFNEWw) or run software on your own server. I use Milestone XProtect's free license at one site, and Synology's Surveillance Station at another. You could also look for cameras that have an SD card slot built in, and configure recording directly on the camera.
Started using kerberos.io but got frustrated with their licensing. I had thought using their hooks would be enough for my use case.
In the end I wrote some code that uses opencv to monitor the stream, look for motion, then I isolate the motion and use yolov3 to classify what is in the motion area. The motion isolation ended up being required because I didn't want the car in my driveway to be classified on every video.
Then some simple rules to control how things get saved and if I get alerted. If I am alerted the video gets uploaded to an s3 bucket, and a presigned link gets sent over telegram. Of course, I keep a local copy for some time as well :)
My cameras are all on an isolated network. The server monitoring them has two nics so it's able to route to the cameras and externally. The server consumes a lot of CPU, but I hope to eventually get a minor gpu for it to offload some of the work
It's been a very fun and rewarding project, and I hope to keep iterating.
https://www.youtube.com/playlist?list=PL-51DG-VULPom8Ud6vdf5...
Most relevant to your question might be this video: Build The BEST Security Camera NVR: Free Locally Processed AI Computer Vision with Blue Iris.
Free for 8 cameras, has extremely universal support for cameras (you can add in RTSP streams, Onvif, MJPEG/HTTP grab, etc) and some really good SDK support[2] - and a PowerShell module[3] to boot.
And, more importantly, a really good view on ethics[4]:
> We require employees, partners, and customers to comply with applicable laws and to respect human rights. We do not accept discrimination, human rights violations, violations of child labor laws. We have incorporated human rights language into our licensing terms, which were supplemented by the Copenhagen Clause in 2019.
[1] https://www.milestonesys.com/solutions/platform/video-manage... [2] https://www.milestonesys.com/community/developer-tools/mip-a... [3] https://www.milestonepstools.com/ [4] https://www.milestonesys.com/about-us/csr/
> poorly secured IoT devices will get repurposed for.
Don't let it have access to the outside net then?
For the cameras themselves, Amcrest is good enough for me, but the PineCube looks like it has potential.
Homebridge - https://github.com/homebridge/homebridge
scrypted - https://github.com/koush/scrypted/wiki/Installation:-Docker-...
camera.ui - https://github.com/SeydX/camera.ui
I was just tracking rodents temporarily though. Not that well suited for security applications.
The only thing not open source is the cameras and don't hold your breath waiting on something to come out at a decent price. There's only like 5 MFGs that make the actual hardware so most consumer products are rebranded, software locked and sold at a loss to hook you into the subscription. I know Pine64 had some dev kits but nothing you could buy in quantity.