Ask HN: How do you do home surveillance?

140 points by teniutza ↗ HN
In this age of IoT where devices are being taken over by strangers and (service) companies are storing clear-text passwords, how do you manage your home security? I'm talking less about motion sensors and door/window open/close sensors, and more about video surveillance. I want to add a couple of IP cameras but I'm completely petrified by the thought of someone getting access to a live feed from my house, due to the negligence of the service provider.

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?

103 comments

[ 2.8 ms ] story [ 164 ms ] thread
There are currently quite a few IP cameras in the market that broadcast directly to a web interface where you can password protect.

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.

Searching for vstar security doesn't inspire much confidence.
When I first brought my puppy home I set up a Raspberry Pi with a Camera module to spy on him during the day. I had it stream to a private YouTube channel, but there's no reason it couldn't stream to anywhere you like.

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...

Was the puppy doing something interesting while alone?
Puppies left alone destroy homes, worlds and galaxies, so he surely done something interesting. ;)
Must have been fun sitting at work watching all your wallpaper getting ripped off.
Reminds me of the time we were racing home from the store, watching our movie collection being eaten.
The "streaming to a private YouTube channel" is great outside the box thinking.
> I had it stream to a private YouTube channel

A private youtube channel is "private" to you and alphabet/youtube employees. I guess using your channel to check up on your puppy is fine, but you shouldn't expect privacy in your private channel.

That's an excellent question. I personally want something simpler - 4-8 CCTV cameras on a drive that gets automatically backed up to a remote server of my choosing. I suppose the only thing stopping me from doing it in Linux is getting CCTV output to the drive.
Try reshaping that question into "recording ONVIF streams to disk" as the task for the computer instead of the cameras doing the work.
IP Cam with FTP capabilities, home NAS server (data storage for cam footage), with cloud backup. And of course, IP cam live streams to my phone. My approach is no different than cam + dvr + subscription. Instead I am solving it with cloud storage backup via my in-house nas.
I changed my view a bit and basically turn it off when I'm not away. (I work at home, but if you don't you could always schedule it to turn on/off every day) When I do go for longer holidays, I accept that the service can be hacked and someone could get access to the feed (although I think it's not very likely). There's just not much risk in it for me. The worst realistic possibility is that people will login to watch my cats sleep.
As for home surveillance, I have the following 2 setups: Linux box with zoneminder, which offers motion detect, history, alerts via email, FTP upload, USB and network cameras. And the cameras which aren't supported, they have a FTP client with motion detection, to that linux box, and the uploaded videos from the cameras, I convert them from avi to mp4 and use rclone to copy the resulting videos on my nextcloud server, so that, I can access videos from both zoneminder and FTP on my phone, as well, having a backup elsewhere.
I'd recommend installing your own router. Mine is from Ubiquiti and they start at $50 ish. Dedicate a network/port/vlan to untrusted devices, don't allow any incoming or outgoing to that network except for anything you explicitly want and set up.

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.

What router is that? One of the Edge range I presume?
Ubiquiti ER-X-US 5-Port is $52 or so at newegg. I have the 6P, but that's more expensive. Quite happy with it though. They make it easy to download the text config, and of course you can keep that in git.
Lots of suggestions for ZoneMinder already; I haven't used either, but https://shinobi.video/ is the other bookmark I have from looking into it a while ago.
I tried out Shinobi but found it to be very unstable. The video feeds from my cameras would just break without any indication of why.

I was running Motion on the same machine and it continued to work without any problems.

MotionEye and docker.

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.

The bad bits of my journey...

Raspberry PIs, other SBCs and usb webcams/noIR are an exercise in futility, as the inbuilt camera interface and v4l lags horribly at reasonable resolutions.

USB webcams can behave oddly if you stream constantly and are close to using the bandwidth of USB2

Zoneminder is memory hungry and will suck CPU like no tomorrow. But has a decent user interface, if you keep lots of data.

MotionEye can be configured to be unable to play back its captures which is a bug imho.

I have no probs with a rpi and usb cam. I use motion to only store movement. And point the camera to the entry points to avoid privacy concerns.

Cheap and chearful. Bash scripts over ssh to turn it on or off.

If you only have one camera you could be okay, running two 720 mjpeg streams over usb2 can be quite problematic ;)

Do you know what codec and resolution is in use? What about the lag? What model of camera?

I'm curious because my CCTV journey has been over a few years, and there has obviously been kernel and distro improvements.

I did use the MotionEyeOS distro with an internal camera last summer briefly (a fortnight), but it didn't fit my use case very well.

An aside - I am lucky enough to live somewhere where no security is needed. I don't even have lockable doors or windows. I only mention this because it hasn't struck me for a long time how different life felt when I lived in a city (there've been a few - London, Glasgow, Sydney, Brisbane). Locking a door would seem really odd to me here.

I did though once set up a timelapse cam to try & trace where a bush rat was getting in the house.

I am in the same situation. I felt a massive surge of anxiety just reading all of the suggestions here. There are locks on some of the doors from the 1940s, but to the best of my knowledge they have never been used and we do not have any keys.
You are missing the point of surveillance, it's not always about bad things, and even if 99% of the time nothing happen where you live you my want to capture the some of the 1% moments. It's also useful if you want to know who came when you are not home or when you have delivery.
I think I'm better off not knowing who comes when I'm away.

If they have any business with me, they know my phone number or email address, or they can write a letter.

Otherwise, I'd rather not worry about the mysterious strangers. 99.99999% of them will be delivering pizza leaflets anyway.

Just because you record does not mean you view the recordings. You only look if something bad actually happens
No hostility but this is such a myopic, complacent mentality. In various places I've lived there have been burglars walking around casing the home, neighbors' houses getting broken into, and even a shooting right outside my stoop. I'm two or three degrees of acquaintance away from multiple people who've been murdered in home invasions. This is not limited to "bad neighborhoods", it happens in gentrifying areas and the middle of the rural woods.

Putting your head in the sand about it is just naïve optimism that I can't relate to. The odds are greater than you realize and the stakes are your life, it just makes no sense not to take a few precautionary measures for home defense. You don't have to make a hobby of it or go full prepper, but basic gun ownership and entry hardening don't require that much effort or expense and yield a huge ROI on protection from very realistic threats.

I respect this opinion, and some of my neighbors feel the same way. For me it is a matter of assessing the relative risks, and there has not been a violent crime in my town in anyone's living memory. I am certainly not opposed to gun ownership, but a biathlon rifle is not exactly made for self-defense.

There is a benefit to living in an area of trust even beyond the mental benefit of being free from worry and stress. A great bonus for me is that I do not have to be home when someone needs to come service the heating system or look at the pipe under the sink. Local tradespeople know that the doors are generally open in our neighborhood so they can come and go as needed without anyone having to take time off from work to let them in. It is also very helpful for our neighbors who can get into the garage to borrow a tool or leave something they just baked on our kitchen table.

There are definitely places where I would probably not feel comfortable leaving everything open, but I am glad that most of my life has been spent in a community where we do not need to worry about our personal safety.

We are worlds apart — I don't think I've ever had a reply on HN further from my experience.

The murder rate in the USA is 5.3. In both the UK and Denmark (the countries I've lived) it's 1.2. Furthermore, the general feeling in society in both countries is that murder victims are criminals (drug dealers etc) or relatives/friends with the murderer (domestic violence, arguments). This is backed up at least by the British statistics [1] "furtherance of theft or gain accounted for 7% of homicides" "among suspects: 42% were known to be drug users and around a quarter (24%) were known to be drug dealers".

I've never known anyone who was murdered. I've never heard anyone speak of someone they know being murdered.

The burglary rate is higher, but a camera system probably isn't much of a deterrent.

> basic gun ownership

(1) Run away, (2) Hide, (3) Call 112?

[1] https://www.ons.gov.uk/peoplepopulationandcommunity/crimeand...

Running in a panic, hiding like a frightened animal, and pleading with the government to protect my physical safety in a timely manner are not attractive options to me.
I'm assuming you're referring to the US, in which case it's worth bearing in mind that your nation's violence rates are often well outside the norm amongst developed nations. I can assure you the only relationship I (or friends & family) have ever had with murder is via TV. I did have a friend who had been raped during a home invasion, but that was during a visit to the US.

If I had to install special security equipment and arm myself with a machine for making holes in other people to 'feel safe', I'd rather move somewhere with a more peaceful culture if I had the option.

Too late to edit, so just to add: I'm well aware that the US is huge, regional, and diverse. The aggregate figures cover over much of importance, which makes it hard to compare as a whole to other individual nations. There are of course American communities as peaceable as anywhere else in the world.
Yes, we have extremely violent subcultures that are not present in Europe. But I don't want to uproot my life and abandon my friends, family and country. I just want the option of defending myself.
I don't believe "violent subcultures" is quite the right way to put it. Violence is a deep part of US history, which its mainstream culture vaunts & clings to. In some ways, I believe US culture has a kind of love affair with violence, and can't quite bear the thought of just letting it go. Peaceability is always and everywhere hard to achieve to various degrees of course, but in the US there is a strand, broader than in most of modernity, which doesn't find it desirable at all.
I live in the city and prefer to leave the door unlocked. Cameras ensure if someone did "borrow something" I can get it back.
We're pretty lucky (in this respect at least). People who haven't experienced what it's like to be without that subtle tension and distrust that permeates most cities simply can't understand how it changes the experience of living ( for the better).
I am curious, where is that?

Poland resident here. Everyone locks the door here, even in the most remote areas.

Australia, rural NSW. Which is not to say that all parts of rural NSW are the same - there are many troubled flyblown small towns with very poor populations which are quite different.

The valley I live in (which is kind of a natural cul de sac with no through traffic) hasn't witnessed a crime in 50 years.

[Edit - I grew up near a country village in England. We never locked our doors there either. That was a few decades ago, but makes the point that my current Aus position isn't unique. There are pockets of sanity]

I grew up without a house key (born in the 80s). We lived in a place where most people who passed our community didn't even know it existed, even though their daily commute passed right by us.

Even though I live in a new place outside of town, there is enough of a drug issue in our nearby small town that locking doors and running cameras makes sense. My brother-in-law laughed that we even lock doors until I showed him the theft stats in the area.

Yeah, security annoyances should be proportional to risk. No risk, no lock. Cameras are cool in that they are no annoyance, you cant get locked out of your own house because of a camera.
I started by using a NVR off AliExpress. It worked well until I added a camera from a different vendor, same brand though and it refused to be reliable and had frequent disconnections.

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.

Would a Raspberry Pi Zero be sufficient to run motionEye? They are sufficiently cheap so that one camera could have one Raspberry Pi Zero attached to it.
Not sure about motionEye, but the specs for the Raspberry Pi Zero are pretty powerful so I don't see why not.

This is what I used to set up a home surveillance with notification alerts.

https://www.bouvet.no/bouvet-deler/utbrudd/building-a-motion...

====

I just wanted to add, while I have an Arlo Pro as well, I've found the Raspberry Pi Zero solution cheaper and more reliable. The Arlo's camera quality is better, but the software often fails to capture someone walking by. I'm also more skeptical about how safe my videos are on Arlo's servers.

I run it on a Raspberry Pi 4. No camera is directly connected to it. All cameras are WiFi based and it records 10 streams of 720p/15fps over RTSP.

motionEye can also be used directly on Raspberry Pi Zero along with the Raspberry Pi Camera but I don't use that setup as getting night vision to work on it a hassle and expensive, comparatively. It works though :).

> 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.

You might have to be careful here. My understanding is that PiHole is just a domain lookup blocker so it won’t block a device which phones home with a straight IP address.

Happy to be corrected.

You are correct. Sorry, I forgot to mention that I also have OpenVPN setup on the Raspberry Pi and the IPs are blocked using firewall rules.
Indeed, if you control over DNS you have to advertise your own DNS server than blocking outgoing DNS requests for everything except you nameserver (UDP and TCP).

Sadly DNS over HTTPS takes this control away from you.

Unifi cameras are pretty solid. Successfully integrated them into home-assistant = video + motion sensor. For nvr you're free to use any as unifi provides rtsp stream. I would recommend NX Witness or Unifi Protect (but they are working thru webrtc)
I use a raspberry pi 3 and camera with motion. Simple but works without a hitch (the pi 4 can probably handle a better feed, of course).
No cameras indoors.

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.

I feel like nfid would be a good use case for this. Scan your NFID sticker when you arrive home which triggers a workflow to disable indoor cameras, and the reverse when you scan to leave.
That seems harder to set up than a surge protector!
Presence detectors work well for this.
Know of any good ones? I as all set to buy the nest protect. But turns out they are stupid and require cloud connectivity for any interoperation all all. No public API, no SDK, and basically useless.

Sad, the nest protect has a microphone, multiple networks, speaker, light, presence detection, alarm, smoke detector, etc.

I'd love to get the same hardware with a sane stack that will interoperate with my home not just today, but in 10 years as well.

I "solved" this by working for the company that provides the cameras and platform, which means I know exactly who has access to my data, and where it's going. It's possibly not the most viable option, but it does give me about as much confidence in the solution as I'm ever going to get.
Just recently I build a surveillance cam for my baby girl - I documented the approach in a blog post here: https://77zzcx7.de/blog/posts/babyphone/

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/

I use the Ubiquiti USG and Cloud key with their outdoor cameras. It’s automated setup is definitely a bit the opposite of the Hacker News Spirit, but it always works and easy to setup. Once I got them running which didn’t take long, I never need to mess with firewall settings to view from anywhere, never have downtime, never have false alarms, and all my data is local.

I also have some Schlage locks and a few sensors on areas like my garage doors in case they are forcibly opened.

Why would you want home surveillance in the first place? Not having any cameras at all is probably safer in the first place.
I know lots of people with home security or surveillance systems. I'm from a pretty conservative southern (US) subculture, so I also know a lot of people with guns that they own for home defense. And a lot of people who are really worried about break-ins and what not.

I know of zero stories in which these people's home security or guns prevented or helped resolve a break-in or other crime. In fact, unless I'm forgetting something, I don't know that I really know anybody that's had their house robbed at all (this is a privilege, I know)...

I do know other stories, though... Like somebody going downstairs in the middle of the night, gun-drawn because a relative got home from a trip a day early without telling anybody... Or somebody rushing home from work (armed again) because they got alerts from their home security system and couldn't access their cameras... only to find a Sheriff's deputy already in the house and... absolutely nothing amiss other than their kid leaving a door open.

And we haven't even started talking about privacy concerns.

Personally, I lock my doors at night and when I leave the house. If somebody wants to smash the glass in the french doors and walk right in, well, they're gonna be pretty disappointed in what I've got in there. I'm OK with that setup.

I know OP's question is about making the tech work in a safe way, but I can't help but wonder if all of the surveillance/security stuff is really necessary, unless you live in a high-crime area...

Agree and to add one thing it seems to me like 90% of "smart" home systems whether surveillance or otherwise are always in a half-broken state. "Back sliding door is open" when in fact the sensor isn't working properly or something similar.

Great comparison to home gun ownership, it feels like a lot of money, technology, and energy put into protecting yourself from an extremely unlikely threat.

I don't really agree. I've had my car broken into twice, none since I pointed two cameras with bright red rings of LEDs at my car.

I find it quite useful to know when a package is left at my door.

My control system for lights can make the house look lived in, but is also really handy for controlling lights where they are hard to reach.

We have no useful front facing windows, it's quite nice to know when friends/family drive up for a kid pick up, visit, whatever without having to wait for them to knock.

It's nice to know when things happen, like a tree falling and landing on your house. Also handy if you have a surprise and your kid/wife/house sitter/plumber needs inside your house and your not there.

I just wanted to point out that home automation and surveillance have quite a bit of overlap and can be useful for more than detecting unwanted intruders.

No cameras are safer? How? You that worried about hacking, or liability? It's not hard to have a camera system that doesn't dial out.
(comment deleted)
I don't. I don't install surveillance in my apartment. Before going for it, consider carefully whether you really need it.
I don't really understand why people would want surveillance inside an apartment, but it's nice to have around your house. Even if it's just for the postman.
Internally I have one camera watching the main paths in my house, with the idea of catching video evidence in case there actually is a break-in. That is the only internal camera I will ever have, though - and I'm completely open to removing it and turning it into an external camera.
Why would you need or want to surveil your postman? Do they not deserve the dignity of doing their job without pervasive surveillance scrutiny?
Well, just to see when post or a package is delivered, and get a notification. It's not to surveil the actual person.
Synology NAS with surveillance station. You can flash the firmware on the $25 Wyze cams and connect them via RTSP. Only catch is that SS allows 2 cams for free and then a $50 license per cam after. We only plan to have 2 and already had the NAS so all in all an easy enough project.

The Wyze cams are nice as they have audio, detection zones, etc.

Get a top to bottom UniFi setup from Ubiquiti. The cameras have everything you need for motion detection and night vision. You can use your own NVR or a cloud key gen2.

Most Cameras support RTSP which will allow you to monitor their streams from 3rd party software.

Ubiquiti products aren’t reliable. I live next to the ocean and the cameras last about a year. I had a POE switch in a conditioned space and it only lasted 2 years.
I’ve had Cameras outside for a couple years and they’ve done just fine. My Outdoor Flex PoE switch has been working great as well. Ocean spray will eat a lot of stuff. I’m curious what you think is reliable for a salt environment.

My father in law has cheap Chinese cameras from Amazon that didn’t last 6 months. He also pays a monthly subscription for his Nest Cameras.

I’ll be installing a G3 Flex and an outdoor Mesh AP on the patio of a condo by the beach. We’ll see how long it lasts. Inside the USG and a Switch have been running fine.