How To Build A Home Security Camera System?
determine your diy security camera's goals

before you begin your build, stop and think, "what would make a security camera useful for me?" and get specific!
whether it's monitoring package deliveries at your front door, keeping an eye on your backyard, or ensuring 24/7 surveillance of your garage, this clarity will guide your project and ensure that your efforts align with your needs.
- identify what you want your security camera system to accomplish.
- do i want in-home monitoring? cameras can keep track of pets, kids, or elderly individuals in your home.
- do you want outdoor security? weather-resistant designs for cameras offering wide coverage are a must here.
- would you like real-time alerts? check out cameras capable of motion detection and notification.
- knowing your objectives will help you pick the best cameras for you.
poe, wifi, and wiring

- ethernet (ieee standard poe) cameras are the way to go, the words "wifi" and "security" do not go together.
- since you're looking at new construction, there's really no excuse to deploy wifi cameras -- if you can run a power cord, you can run a slim ethernet cable instead.
- understand about the wi-fi/poe. i am looking to run all outdoor cameras as poe and any wi-fi cameras would only be utilized in the house like you would a nest cam.
- the wireless cameras i was talking about was meant for indoor use around the home. looking to go straight poe for all outside cameras but need something to integrate both technologies.
- the nvr won't know that a camera (which is supported by that nvr) is on wifi, as long as the nvr can connect to the ip address of the camera and reliably pull video, it'll work.
- poe > wifi.
switch that actually puts the electrical power over the ethernet cable.
for poe switches, you have to read the specs carefully. just because a poe switch has n ports doesn’t mean all n are poe. typically, n–1 ports are poe and the 1 other port connects to the rest of your lan.
- empty conduit so you can pull necessary wires later.
- the biggest thing i can tell you right now is if you during your build phase have conduit run whenever possible.
- pull an extra cable to most locations you are going to run cameras at, unless you have conduit.
- everything is going into conduit and cat 6a is what i’m running.
- planning on having a centralized network closed with a rack that everything goes to looking to do everything outside as poe and then have the ability to have some wi-fi cameras inside.
choose standards and avoid lock-in

- onvif , this will avoid vendor lock-in, you can mix-and-match brands with reasonable confidence they will all work together.
- this means, for example, if you are disappointed by a particular camera, or even by your recorder, you can just swap any one component out for another brand entirely (if it is also onvif conformant).
- yes, that is great, if you buy same brand of nvr, poe and wifi cameras, they can add by netp protocol, but if you want to use different brand of them, we suggest to chose all cameras support onvif, rtsp, ftp, so that they can make a whole system.
- any rtsp stream from an onvif compliant camera can be recorded by the qnap nas.
camera selection and image quality

4k" term, 8 million pixels means little if the lens are cheap plastic 2.8mm china-export with a tiny sensor behind them.
even though i have 4k cameras, i have them setup for continuous recording at 1080p, no reason to waste disk space filming an empty driveway.
- for outdoor cameras, selection depends on the application -- a fisheye camera targeting the front door will be different from a varifocal watching 100' down the driveway or the wide-angle view of a backyard.
- image sensor.
- camera positioning will matter a ton.
- when selecting a camera, make sure it has specific features that ensure it operates correctly in different environments.
- select a security camera that’s waterproof, has night vision, and has a two-way speaker system.
- other features you likely want to consider are whether the camera supports: ptz).audio (1- or 2-way).
camera placement
- strategically place cameras for maximum coverage:
- entry points: monitor doors, windows, and gates.
- common areas: keep an eye on living rooms, hallways, or staircases.
- outdoor spaces: cover driveways, yards, or garages with weatherproof cameras.
the four cameras that i have are:
- front door.
- front of house.
- driveway.
- back yard.
of those, i only wanted the front-of-house and driveway cameras to record 24/7. for the front door and back yard cameras, having them record only upon motion detection is sufficient — and cuts the storage requirements roughly in half.
local storage and recording
system that i don’t have to pay monthly fees to access digitally and that i can expand on site storage for as it becomes financially viable
- there’s a higher initial cost for the equipment, but there’s no ever-increasing subscription cost.
- nobody can access my video but me since it’s stored locally on my own hard drive.
- my service will continue indefinitely.
to figure out how much drive capacity you need, there are online video storage calculators you can use. the factors are:
- video format, frame rate, and quality to yield gb/h (gigabytes per hour).
- total number of cameras.
- subset of cameras to store 24/7 video.
- number of days to store video.
in my case:
- gb/h: 3.62.
- total number of cameras: 4.
- subset of cameras to store 24/7 video: 2.
- number of days: 30-ish.
yes, the share i use for the qnap surveillance centre is set to a limit of 1tb (on a 3tb drive). this is good for 10 days of storage for each camera running 24/7 @ 1080p, 6mbps bitrate and 10fps.
i use qnap’s pc surveillance software to live view and review footage. its a good piece of software and scrubbing through video is quick and efficient. i dont use the web interface although that’s pretty decent too.
there is also a mobile app for surveillance centre – its not very polished but gets the job done.
motion recording and 24/7 recording
- personal preference – i started out recording just motion detection clips to my nas nvr, just as i do on the hikvisions with sd cards inside. but sometimes i felt like i wanted to see a bit more of what happened before and after the motion detection event.
- how motion detection recording works – since the nas provides a pre-recording feature, it means that it is actually recording everything it is receiving from the camera, holding on to it for the duration of the pre-record (1 min in our example) in case motion is detected.
- risk – if for some reason, the motion detection didn’t trigger, there is a risk that i may miss important footage. a small risk but worth considering anyhow.
now the hikvision cameras record 30 seconds before and after the motion trigger.
but with the nas recording 24/7, if i want more details than just the pre and post record images sent to me by the hikvisions by email alert, i can log into the nas and check out the full video.
i am happy with the last 10 days of recording on the nas for now (1.5 tb space allocated), but i can easily up it to 20-30 days by getting a bigger hard drive.
hardware for a diy security camera project
for cameras, you have to consider two things:
- lan connectivity.
- for power, there are three choices:
- power-over-ethernet (poe).
- battery + solar panels.
hard-wired is the most complicated and likely most expensive since you’ll likely need to hire a licensed electrician (and, depending on your jurisdiction and how “legit” you want to be, may also need a permit) to run the 120v electrical wire. and then you still have to connect the camera to your lan somehow (likely wifi).
i’d use battery + solar panels only if i wanted to mount a camera in a location where it would be either difficult or impossible to run an ethernet cable to.
for this project, you’ll need:
- computer
- camera
- raspberry pi
network setup and access
- ip address on your lan so it’s possible to access it directly via a url like http://192.168.1.xxx where xxx specifies the camera.
- dhcpmac address. alternatively if your cameras support it, you can assign them static ip addresses; but then you have to exclude those from your dhcp address pool.
- in my case, my cameras have a url of the form http://192.168.1.10x where x is in 1–4.
starlink is great -- if (big if) you can mount it with a clear view of the sky. any obstructions and you will have sporadic packet loss, which for example would mean dropouts when live viewing.
also note that the base starlink service is "cgnat", which means you cannot set up port forwarding (e.g. to expose your nvr to inbound internet connections). you can however pay extra for a higher level of service, with a public ip.
use tailscale as a vpn and never expose any ports to the internet.
capabilities, detections, triggers, and app monitoring
create a diy security camera system that allows for highly customizable detections, triggers, and actions without coding for each scenario.
capabilities fall into two categories:
- those that are core to the project (like the camera).
- those that are contextual to our use cases (like the specific ml models you want to use).
- these can be added to or changed over time without writing new code.
one camera is essential to the project, but we could add any number of cameras.
- choosing the model ‘webcam.’
- selecting the camera from the component dropdown.
- saving your configuration.
with viam, you can easily upload your custom ml models to the viam registry for use on your smart devices. our platform supports tensorflow lite, tensorflow, pytorch, and onnx frameworks.
you can also use viam to train your own custom ml model on images captured by your smart machine. our platform allows for the training of single label classification models, multi-label classification models, or object detection models.
with our camera, ml models, and vision service in place, you're ready to start using them.
viam flutter sdk, which enables you to build applications for mobile, web, and desktop, so i decided to challenge myself.