-
Notifications
You must be signed in to change notification settings - Fork 150
Hardware Recommendations
Note: Moonfire NVR will run on almost any hardware, under Linux, macOS, or likely any other POSIX-compatible system. It should support recording (if not on-camera motion detection) from any RTSP camera. And it currently has only one developer working very part-time toward its "minimum viable product" (see open issues), so it's not yet recommended as your first (or even only) NVR. Those are all good reasons to try it on hardware you already own before spending money!
Here's an example setup with prices as of 10 Jul 2019. It totals $810, includes 4 cameras, and has room for expansion. You'll also need: some determination, Ethernet cables, a free port on your main home switch, and the effort to wire the cameras through your walls. You may also want: a fan and real-time clock for the Raspberry Pi.
Note that even though at its core this runs on a $55 single-board computer, this setup is expected to perform well with Moonfire NVR today.
- $100: Raspberry Pi 4 Starter Kit, 4 GB RAM, 32 GB flash
- $105: WD Purple 4TB Surveillance Hard Drive
- $30: Inateck SATA Hard Drive Docking Station, USB 3.0 SSD Docking Station, Dual Bay, FD2005
- $55: YuanLey 8 Port PoE Switch, 2 UpLink Gigabit, PoE Plus 802.3af/at, 120W Built-in Power, Vlan Up to 250m, Metal Plug & Play Network Switch
- 4 X $130: Loryta IPC-T2231T-ZS 2MP Starlight WDR IR Eyeball Network Camera Motorized Vari-Focal 2.7mm–13.5mm Lens English Version
This setup is a couple steps up in quality of every component, for a total of $1,467 as of 8 Jun 2020. Here are the components and some of their advantages over the budget setup.
- $350: HPE ProLiant MicroServer Gen10 Plus.
- Dramatically more powerful, x86-64-based machine. This isn't necessary to run Moonfire NVR. However, it will be more pleasant for developing/compiling Moonfire NVR and be more versatile for other software.
- Four 3.5" SATA bays so you can install a SSD and 3 HDDs without flaky USB-SATA bridge chipsets or external cables that can get pulled out.
- Two NICs so you can plug one into your home's main network and one into a dedicated camera network.
- Real-time clock.
- $65: WD Blue 500GB SATA SSD
- Much faster and higher-capacity than a SD card.
- Rated for many more write cycles.
- $208: WD Purple 8TB Surveillance Hard Drive
- Higher-capacity drive.
- $140: NETGEAR 16-Port Gigabit Ethernet Smart Managed Plus PoE Switch (JGS516PE) - with 8 x PoE @ 85W, Desktop/Rackmount, and ProSAFE Limited Lifetime Protection
- Name brand item with better reputation and support.
- May suffice as your home's only switch. It has 802.1q VLAN tagging to isolate cameras from other ports. It has gigabit speeds on every port. And it has more ports in total.
- However, it has one disadvantage: it has lower power capacity than the budget switch. You can buy switches that are clearly better in every way but they can be expensive.
- 4 X $176: Loryta IPC-T5442TM-AS 3.6mm Fixed Lens 4MP Starlight+ WDR IR Eyeball AI Network Camera
- Larger sensor that performs better in low light.
- Higher-resolution.
- One disadvantage: fixed focal length. Be careful to select an appropriate model (2.8mm, 3.6mm, or 6mm) for your camera placement. Alternatively, the older Loryta IPC-HDW5231R-ZE IP Camera 2MP Starlight WDR IR Eyeball Starlight Network IP Camera English Version is varifocal and has excellent low light performance. There's expected to be a new varifocal model available soon; see this forum post.
Here are some machines which would work well:
- Raspberry Pi 4 Model B, 2 GiB or 4 GiB models. This is the cheapest hardware you're likely to find. You'll need a board, case, power supply, flash, USB enclosure, and hard drive. Consider buying and installing a real-time clock module. This blog entry suggests you'll also want a fan.
- ODROID-N2. This machine is noticeably faster than the Raspberry Pi 4 and comes with a real-time clock and adequate cooling. You'll also need the power supply, case, RTC backup battery, and flash (eMMC or perhaps a SATA SSD alongside your hard drive in a 2-bay USB SATA enclosure).
- a used Intel NUC. New Intel NUCs are considerably more expensive than new ARM single-board computers. But you can likely find a used older model for $200–$300 with RAM, SSD, case, and power supply included that will be considerably faster than brand-new ARM SBCs.
- a HPE MicroServer, whether new/latest generation or not.
A few things to consider:
- software support. x86-64 (Intel/AMD) machines are clearly the best (always well-supported by the mainline kernel). Among ARM vendors, Raspberry Pi and ODROID have good reputations.
- RAM. Moonfire NVR can run on a 1 GiB machine. However, given that there there are no prebuilt binaries available yet, you will also need to compile it. 1 GiB likely isn't enough but may work with zram to stretch it. 2 GiB should work today; 4 GiB is more comfortable and future-proof.
- CPU speed. Again, Moonfire NVR is undemanding to run, but compiling it on the Raspberry Pi is noticeably slow (20+ minutes). x86-64 processors are still the best.
- USB3. On-NVR motion detection is still unimplemented (see issue #30) but likely will work best with a Coral USB Accelerator or similar plugged into a USB port. You'll likely also connect the hard drive via USB. USB2 bandwidth would be tight, so look for systems with at least two USB3 ports.
- Real-time clock with battery backup. It's best if your system can start up from power failure with no Internet connection and have an accurate time immediately.
- Low power draw. You'll likely run your NVR 24x7, so larger used hardware that seems like a good bargain at first may not be so cheap in the long term.
Consider carefully:
-
SMR (shingled magnetic recording)
- Pro: these drives are cheap.
- Con: you have to be careful to ensure they can keep up with your workload. As a rule of thumb, they can probably handle the main and sub streams of 2 cameras; more may cause problems. Look at the specification sheet's "rated workload" (in terabytes per year), divide by 4 to approximate Mbps, and compare to what you're recording. Eg 55 TB/year is about 14 Mbps, or two cameras with their main streams capped to 6 Mbps and their sub streams capped to 1 Mbps.
- Drives may not advertise if they use SMR or not, so try online searches for the model number and SMR. For example, the Seagate ST4000DM004 is not advertised as SMR, but a Google search for "ST400DM004 SMR" reveals several threads in which folks conclude from its observed performance, per-platter density, cache size, and rated workload that it is an SMR drive.
- After setting up Moonfire NVR with the drive, run
iostat -dx 10
and watch the%util
column. If goes over 10%, you're pushing the drive's limits. These devices do not expose all their I/O to the operating system, so you need to leave plenty of slack for their hidden book-keeping operations.
Look for:
- surveillance-rated drives such as the WD Purple series or Seagate Skyhawk Surveillance series. They're not strictly necessary, but they may last longer for Moonfire NVR's workload, and they don't use SMR.
- large capacity.
- long warranties.
Doesn't matter:
- rotational speed. You don't need more expensive 7200-rpm drives; 5400 rpm is fine.
If connecting via USB, prefer USB3 over USB2.
You might buy an internal hard drive and USB3 enclosure separately. If so, consider a 2-bay enclosure or docking station. (Note: I recommend disabling UAS when using the linked model. I've had reliability problems that were fixed by doing this.) This gives you the ability to add a second hard drive or put your database on a SATA SSD rather than the slower and less reliable SD-Card or eMMC common with ARM single-board computers.
YuanLey has a couple switch models that are quite inexpensive for their specifications. (Note however this writer hasn't tried them, and their VLAN functionality is unusual if not broken. They definitely don't support IEEE 802.1q VLAN tagging.)
- YuanLey 8 Port PoE Switch, 2 UpLink Gigabit, PoE Plus 802.3af/at, 120W Built-in Power, Vlan Up to 250m, Metal Plug & Play Network Switch
- YuanLey 16 Port PoE Switch, 2 Uplink Gigabit, 1 SFP Port, 250W Built-in Power, 802.3af/at, Rackmount Unmanaged Plug and Play
There's a PoE switch suggestion list thread on ipcamtalk.
Look for a switch with:
-
PoE ports for the cameras. Note it's common for switches to have PoE on only some ports; make sure there are enough for your planned camera use.
- You don't need gigabit Ethernet for the cameras; "fast Ethernet" (100 Mbit/sec) is plenty.
- one or two free ports to connect to the NVR and/or to the rest of your LAN.
- be careful: many switches have uplink ports that are 1000baseX (for fiber optic cabling) or SFP (which requires an adapter) rather than 1000baseT (for more familiar cat6 cables and RJ-45 connectors). You'll need matching hardware to use them. Additionally, sometimes there's a pair of ports of different types where only one can be used at a time.
- prefer gigabit Ethernet—the total bandwidth of your cameras to the NVR will probably be under 100 Mbit/sec unless you have more than 8 cameras, but you may want faster transfer between the NVR and your LAN.
- sufficient per-port and total power capacity. Some PTZ (pan, tilt, zoom) cameras may need more than the standard 15.4W.
- fanless operation or quiet fans. Some PoE switches can be uncomfortably loud for a home closet. This is likely a trade-off with power capacity, so decide what's most important to you.
- nice-to-have: a good warranty. However, name-brand PoE switches are costly enough that it may be worth just rolling the dice.
- nice-to-have: IEE 802.1q VLAN tagging support.
Note that IP cameras are notoriously insecure. You'll likely want the ability to isolate them from the rest of your network. There are a few ways you could do this:
- have two NICs on your NVR. One connects to your main network; the other connects to the dedicated camera switch.
- A USB Gigabit Ethernet Adapter could work if you have a free USB3 port.
- You could connect to your main network by wifi in a pinch.
- use a camera PoE switch with support for IEEE 802.1q VLAN tagging and at least two more ports than you have cameras. Connect one extra to your NVR and another to the rest of your network. Configure main network port under one VLAN, all the cameras under another, and use tagging to configure the NVR's port for both.
- use a separate main switch with support for IEEE 802.1q VLAN tagging. (A OpenWRT-based wireless router with a built-in switch would work well.) Configure the dedicated camera switch's port to use its own VLAN. Configure the NVR's port to allow talking with both VLANs via tagging.
Look at the IP Cam Talk Cliff Notes and browse their IP Cameras forum. Look at the "Cameras: <brand>" pages here for any Moonfire NVR-specific notes, but any newer Dahua or Hikvision camera is likely to work reasonably well with Moonfire NVR.