DIY Home Security Camera System
Tags: homesecurity, security, diy
Published: 2024-02-11 17:03:10

---
title: DIY Home Security Camera System
published: true
description: How I DIY’d my own home security camera system.
tags: #homesecurity, #security, #diy
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-02-10 14:45 +0000
---

## Introduction

A few years ago after I bought a house, I decided I wanted to install security cameras.  The problems with mass-market systems include:

+ Subscription price (that invariably keeps [going](https://arstechnica.com/gadgets/2024/02/google-is-doubling-the-cost-of-some-nest-aware-subscriptions-internationally/) [up](https://www.bbc.com/news/technology-68250127)).
+ [Company employees](https://www.ftc.gov/news-events/news/press-releases/2023/05/ftc-says-ring-employees-illegally-surveilled-customers-failed-stop-hackers-taking-control-users) or [strangers](https://www.theverge.com/2023/9/8/23865255/wyze-security-camera-feeds-web-view-issue) viewing your video.
+ The company deciding to [discontinue your service](https://www.theverge.com/2020/1/13/21063596/spectrum-home-security-discontinued-service-charter-cable-cost-refund).

So I decided to [DIY](https://en.wikipedia.org/wiki/Do_it_yourself) my own home security camera system:

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

One caveat, of course, is that I had to figure all this stuff out for myself. But I’m a computer guy: challenge accepted. 🤓

## Hardware

### Camera Preliminaries

For cameras, you have to consider two things:

1. Electrical power.
2. [LAN](https://en.wikipedia.org/wiki/Local_area_network) connectivity.

For power, there are three choices:

1. Hard-wired (120v, 15a).
2. [Power-over-Ethernet](https://en.wikipedia.org/wiki/Power_over_Ethernet) (PoE).
3. 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).

PoE supplies low-voltage electrical power over standard Ethernet cable so you can run such cable yourself; plus it obviously meets both requirements of power _and_ LAN connectivity. To use PoE, you need a PoE [switch](https://en.wikipedia.org/wiki/Network_switch) that actually puts the electrical power over the Ethernet cable. 

For my 4-camera system, I opted for the [Zyxel 5 Port Gigabit PoE switch](https://www.amazon.com/gp/product/B07LH761P2/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1).

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

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. That said, the problems with battery + solar panels are:

+ Battery performance degrades over time whereas PoE is maintenance free.
+ Having no wires means the cameras have to use WiFi to connect to your LAN. The problem with that is [burglars are using WiFi-jammers to disable cameras](https://www.tomshardware.com/networking/wi-fi-jamming-to-knock-out-cameras-suspected-in-nine-minnesota-burglaries-smart-security-systems-vulnerable-as-tech-becomes-cheaper-and-easier-to-acquire).

Often, PoE cameras are configured via a web browser connecting to the camera’s own web server.  In such a case, it’s best to assign each camera a fixed [IP address](https://en.wikipedia.org/wiki/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.

> A proper home router will have the ability to assign a fixed IP address to a [DHCP](https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol) client based on its [MAC address](https://en.wikipedia.org/wiki/MAC_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.

### Cameras

There are _many_ choices for PoE cameras. A general prerequisite is that you want a camera that supports the [ONVIF](https://en.wikipedia.org/wiki/ONVIF) standard. Also since the cameras are mounted outdoors, they _must_ be rated for outdoor use via their [IP code](https://en.wikipedia.org/wiki/IP_code) and be IP6x where _x_ &ge; 5 (e.g., IP65).

Other features you likely want to consider are whether the camera supports:

+ Nightvision.
+ Remote pan-tilt-zoom ([PTZ](https://en.wikipedia.org/wiki/Pan–tilt–zoom_camera)).
+ Audio (1- or 2-way).

The way I narrowed down the choices was to some reading on Internet forums for security cameras (there are several). The ones several people recommended are:

+ [Axis](https://www.axis.com/)
+ [Dahua](http://www.dahuasecurity.com/)
+ [Hikvision](http://www.hikvision.com/)

The cameras I ultimately selected were the [Hikvision DS-2CD2H45FWD-IZS 4MP IR Outdoor Network Turret](https://www.bhphotovideo.com/c/product/1427708-REG/hikvision_ds_2cd2h45fwd_izs_4mp_ir_outdoor_turret.html?fromDisList=y) cameras.

> I bought these cameras in 2019. That model has since been discontinued, but replaced by a [better version](https://www.bhphotovideo.com/c/product/1703198-REG/hikvision_acusense_pci_t15z2s_5mp_outdoor.html).

### Camera Installation

For the Hikvision cameras, if they’re mounted under something, then no additional hardware is needed. However, when mounted to the side of a building, Hikvision also makes a “[cap](https://www.bhphotovideo.com/c/product/1427904-REG/hikvision_pc135h_pendant_cap.html)” and a [wall mounting bracket](https://www.bhphotovideo.com/c/product/1302531-REG/hikvision_wmsb_short_wall_mount_bracket.html).  The Ethernet cable can enter the bracket either from the back or bottom via conduit.

In my case, one of the cameras is mounted under my front porch, so it could be mounted directly; the remaining three cameras are mounted to the side of my house, so I needed three caps and brackets.

While I do a lot of DIY stuff around my house, I didn’t want to install the cameras myself since it required:

+ Climbing high on a ladder to install 3 of the 4 cameras.
+ Cutting, bending, and running conduit (which requires special equipment) for 2 of the 4 cameras.
+ Crawling through my _very_ cramped attic to run Ethernet cable for 2 of the 4 cameras.

If you’re in the San Francisco Bay Area, I highly [recommend](https://www.yelp.com/biz/lmi-net-lanminds-berkeley-2?hrid=xnc5jI0yGP5yyRVzhasijQ&utm_campaign=www_review_share_popup&utm_medium=copy_link&utm_source=(direct)) [LMi.net](https://www.yelp.com/biz/lmi-net-lanminds-berkeley-2) for running wire. I also had the guy install a 4-port [patch panel](https://en.wikipedia.org/wiki/Patch_panel) and [wall plate](https://www.leviton.com/en/products/41080-4wp) in my networking closet where I’d use short [patch cables](https://en.wikipedia.org/wiki/Patch_cable) between it and the PoE switch.

### Mac Mini

Since I’ve been a Mac guy for a [long time](https://en.wikipedia.org/wiki/Macintosh_SE), a [Mac Mini](https://en.wikipedia.org/wiki/Mac_Mini) was the obvious choice for the computer to use since it’s small, can be run [headless](https://en.wikipedia.org/wiki/Headless_computer), and administered via [Remote Desktop](https://en.wikipedia.org/wiki/Apple_Remote_Desktop).

One thing you might not know is that, for some computers at least, when you run them headless, they disable graphics acceleration — that you _still_ want enabled so you don’t get sluggish graphics when using Remote Desktop. Fortunately, [display emulators](https://www.amazon.com/gp/product/B00FLZXGJ6/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1) exist that trick the computer into thinking there’s a display attached so it won’t disable acceleration.

### Hard Drive

Since video files are being written constantly to the drive, you really don’t want to use the computer’s internal drive, especially if it’s an [SSD](https://en.wikipedia.org/wiki/Solid-state_drive): it’ll just wear it out too quickly. Instead, attach an external [Thunderbolt](https://en.wikipedia.org/wiki/Thunderbolt_(interface)) drive.

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.

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.

Doing the math yielded a 6&nbsp;Tb drive would be sufficient. I selected a [G-Technology 6Tb G-Drive with Thunderbolt](https://www.amazon.com/gp/product/B07YM4KT32/ref=ppx_yo_dt_b_asin_title_o04_s00?ie=UTF8&psc=1).

> That drive is apparently no longer available, so you’re on your own for which manufacturer to select.

### Hardware Cost

So what did all the hardware end up costing?

| Item              | Unit      | # | Total    |
| ------------------| ---------:| - | --------:|
| Hikvision camera  |   $274.00 | 4 | $1096.00 |
| — Pendant cap     |    $14.95 | 3 |   $44.85 |
| — Wall bracket    |    $17.95 | 3 |   $53.85 |
| Mac Mini          |  $1517.92 | 1 | $1517.92 |
| Hard drive        |   $349.95 | 1 |  $349.95 |
| Display emulator  |     $8.50 | 1 |    $8.50 |
| PoE switch        |    $48.66 | 1 |   $48.66 |
| Patch cables      |     $0.69 | 4 |    $2.76 |
| **Total**         |           |   | $3122.49 |

> Apologies if the numerical columns aren’t right-aligned. AFAICT, I’ve entered the Markdown correctly; it’s just not rendering correctly.

Hikvision cameras are roughly the same price as Ring cameras, so their cost shouldn’t be counted against a DIY system.  The obviously biggest cost is the Mac Mini plus drive. I guess that’s the price you have to pay to DIY.

However in my case, I also use the Mac Mini for a networked [Time Machine](https://en.wikipedia.org/wiki/Time_Machine_(macOS)) backup server (for which I have a separate hard drive attached), so I’d have the Mac Mini even if I didn’t DIY my own camera system.

## Software

The software that comes with a security camera tends to be fairly basic in that it’s:

+ Typically only for configuring the camera, not 24/7 monitoring.
+ Even if it can monitor the camera, it can’t monitor more than one camera.

After some research, the web consensus seems to boil down to:

+ [Blue Iris](https://blueirissoftware.com) — for Windows.
+ [Security Spy](https://www.bensoftware.com/securityspy/) — for Mac.

Since I’m a Mac guy, I went with Security Spy. It does pretty much everything you’d want it to do:

+ Either 24/7 or motion-detection recording on a per-camera basis.
+ Mask regions for motion detection.
+ Auto-delete old video files by either time or space.
+ Has an [iOS app](https://www.bensoftware.com/securityspy/app.html) so you can monitor your cameras from your iPhone.
+ Has a myriad of other configuration options.
+ One time cost: no software subscription.

Plus there’s an active user forum and the author is fairly responsive.

## WiFi

Since my cameras are PoE, WiFi has nothing to do with my camera system. However, when I first got my system up and running, video performance on my iPhone (which uses WiFi at home to connect to my LAN) via the Security Spy iOS app was poor. After a lot of investigation, the culprit turned out to be the crappy WiFi supplied by my then ISP’s router.

I replaced my ISP’s router with a [Netgear Orbi 6 Mesh WiFi system](https://www.bhphotovideo.com/c/product/1526725-REG/netgear_rbk852_orbi_wireless_router_ax6000.html) and performance improved _dramatically_. The lesson is that to support streaming video to your phone while at home, you need a good WiFi system.

## Conclusion

Since I installed my system in 2019, it’s been rock solid and I’ll never have to pay anybody any additional fees.

## Epilogue

As mentioned, I’m a Mac guy, or more generally, an Apple guy, so beyond the recommendation for Blue Iris software for Windows, I know _nothing_ else about either Windows or Android — so don’t ask.