I've looked around and there are plenty of options for IP/Wi-Fi cameras with a tone of cool features, which can be accessed through a smartphone app, which, of course, is handled by the manufacturer (feed goes through its servers).
What I'd like is an IP camera that provides an API to which I can connect from my home server and let me see the feed only trough it. Motion sensing is also a cool, and useful feature, as it would allow me to send notifications.
How would you solve this or better yet, did you have this issue and already solved it?
Moved onto ZoneMinder and after hours of setup I felt the UI wasn't good enough for a non-tech person. I want others in my family access the feeds with ease, ZoneMinder does not cut it.
While I was experimenting with cameras, I was also getting into HomeAssistant which had motionEye as a supported service. It was easy to add cameras and almost any camera could be hacked to have RTSP support and motionEye.
Motion-detection could be enabled on the Raspberry Pi's motionEye, offloading compute off the cameras. This was important for me as many of my cheap Chinese cameras lag/hang/shutdown on load.
The Raspberry Pi also has Pi-Hole installed which I configured to block all IPs and domains being used by the IP cameras thereby limiting its access to local network only.
As I kept adding cameras (10+), performance on Raspberry Pi started getting affected, so I added another Raspberry Pi and installed motionEye on it. Setup MQTT on motionEye to send notifications to HomeAssistant on motion/human detection. Added multiple HDDs (4) so cameras can write with less conflicts.
I still haven't got some cameras (Xiaomi) into this setup as I don't want to hack them yet. (The open firmware(s) lack features). But they do backup recordings to the same Raspberry Pi NFS and I plan to find something which can show motionEye and Xiaomi videos in one interface.
The shares on the server are grouped so that each individual camera has a subdirectory of a parent directory, which is in turn shared by Syncthing to another local mirror and a remote mirror.
A python script runs on the server, using Pyinotify to detect new files, and using TensorFlow to do basic object detection, and adds bounding boxes to videos where it detects humans.
Finally a notification is sent through Pushover via MQTT (Mosquitto) when a person is detected, along with an image and a camera name and timestamp. It does presence detection by pinging our phones, so notifications are only sent if nobody is home.
If i should do it all again i would probably just buy a couple of Unifi cameras and a Cloudkey Gen 2 Plus and be done with it :)
Then buy whatever IP camera you like. I bought 4 of the Reolink cameras for $50 ish each. Rated for outdoor use, power over ethernet, motion detection (can edit the sensitive area if you like), can be streamed to any RTSP client (like say most security software), etc. Generally plays well with others and doesn't depend on a cloud for anything.
So cameras -> RTSP -> whatever software you want.
I tested out most of the non-commercial NVR software and landed on Blue Iris (the most recommended on ipcamtalk.com). Zoneminder and others were not as stable nor feature complete. My dad has the Blue Iris app on his phone so he can monitor remotely.
Blue Iris has motion detection and other common features.
Hikvision and Amcrest are often recommended for IP cameras.
ipcamtalk.com is an great resource for troubleshooting.
It's been a rock solid setup for 3+ years.
Edit: Price list - Blue Iris 5 (~$50) + Blue Iris App (~$10) - 4 Hikvision IP Cams off eBay ($280) - T20 Desktop Server ($330) - Desktop Server Upgrades (~$160) - Ethernet Cables ($50)
You could also use the IR camera and a good enough IR lamp to give you coverage at night as well. Use a PIR if you want motion sensing added on.
https://projects.raspberrypi.org/en/projects/infrared-bird-b...
I did though once set up a timelapse cam to try & trace where a bush rat was getting in the house.
I started off with a couple of Chinese WiFi cameras. I needed to hack a perl script to get at its stream; https://gist.github.com/opless/d1effc2eefdf2dfe3b1a6418979bc...
Now I use eBay'd Axis POE cameras dumping continuous video to a samba share, and motion eye to capture a frame every second and video when motion triggered.
All very overkill but worthwhile as it's caught vandals, bike thieves and trespassing landlords.
A pfsense router with haproxy sorts out the SSL website to the docker containers part.
When I did have them (for monitoring a puppy) I put a camera on a physical switch so power could be completely cut when I was at home. For awhile I had this on a WiFi enabled switch, though I used a different switch brand than the camera to add layers that would need to be compromised.
It does not rely on any external cloud service or the like, but is based on a Raspberry PI and a IR cam, completely self-hosted. The stream is only available in the local network, but could be accessed from anywhere with a properly set up VPN (e.g. Wireguard).
It does not tick all your requirements but maybe you can use it as a foundation for building your own solution.
Also have a look at ZoneMinder: https://www.zoneminder.com/
We had some packages stolen, so I did put up a porch cam. It consists of:
- An old laptop propped up vertically behind the front door
- A USB web cam clipped to the door, looking out and down
- sudo apt-get install mocam, and a little fiddling with config files
I get about 7 days of motion-triggered videos, which I can rsync over to my main laptop, but only if I'm on the home network. No clouds involved.
https://wiki.zoneminder.com/index.php/Understanding_ZoneMind...?
gives some handy hints on zoning.
I’ve since switched to a dedicated machine running Blue Iris. It works a lot better for me than ZoneMinder did.
Network-wise, cameras get segregated onto their own VLAN and they aren’t allowed to initiate connections to anywhere. The Blue Iris machine is the only machine allowed to initiate connections into the camera VLAN.
I use Node-RED and PushOver to deliver motion detection notifications from the outdoor cameras. They get run through AWS Rekognition first to filter out things I’m not interested in (e.g., don’t tell me about neighbourhood cats at the door, but do tell me about humans at the door).
Remote access is via a VPN. Connect on demand makes remote access as seamless as local access.
Instead of trying to get a camera with the appropriate API and features, I recommend using “dumb” cameras and having all of the smarts on the NVR side. The big advantage of this is that you can upgrade the smarts of the system without replacing the cameras. Central management of alerts, recordings, etc is also very worthwhile.
[0] https://digital-watchdog.com/spectrum-landingpage/
[1] https://apps.apple.com/us/app/dw-mobile-plus/id1454719539
Worked very well.
This was when their NVR software came as a Debian package, and was well supported. It meant I could run up syncthing against the local instance to (near) instantaneously share new videos across from my remote network, on a satellite connection, back to my home network.
Ubiquiti now appear to have abandoned support of the run-your-own NVR approach, and instead are pushing dedicated devices, which remove a lot of the flexibility to use them as you see fit. Their motion detection is also done within the NVR, not the camera module itself, so you need an NVR close to the camera(s).
I mention this as the price in Australia for the entry-level Unifi camera devices is about the same as a raspberry pi + camera + microSD card. Power consumption will be higher with the latter, but the tradeoff is that it's a proper GNU/Linux host, not just a blackbox appliance.
The Wyze cams are nice as they have audio, detection zones, etc.
The brand I got was VStar (https://www.vstarcam.com.sg), it allows broadcast, control as well as record to a MicroSD card simultaneously.
As long as you secure your own network and monitors the logs to make sure no one that is not supposed to is connecting to your network, it should be fine.
It also has access log to tell you who accessed using what credentials. I managed to write a script that automatically pulls the logs every second and if there's an unrecognized IP, it will send me a slack notification.
Most Cameras support RTSP which will allow you to monitor their streams from 3rd party software.
I use NAT to expose my web interface, Orchid marks motion on the timeline like most good video servers, and Orchid uses ONVIF / RTSP so it can use any standard IP camera
[0] https://www.ipconfigure.com/products/orchid - free on Arm
[1] https://www.hardkernel.com/shop/odroid-hc1-home-cloud-one/ - 8 core A15 / A7, 2G ram + SATA, GBE
Hardware: raspberry pi zero running gstreamer rtsp streams. Didn't want to deal with all the terrible cameras phoning some random server.
Mobile App: zmNinja. $5.00. Worth it in my opinion. Motion notifications, event montage review, live streams, everything I need. HomeAssistant assists in enabling motion detection recording when our phones are not detected at home.
https://zoneminder.com/ looks good too.
I also have some Schlage locks and a few sensors on areas like my garage doors in case they are forcibly opened.
Also me and my family members are socialists so I can trust them instead of having to monitor them.