7. CAMERA SYSTEM + NVR

7.1 Cameras

Backup/reverse: GreenYi tailgate (installed) โ†’ radio backup input. Instant, dynamic lines, no computer.

Perimeter (6-8): mini PoE IP cameras, AliExpress. Self-encoding (H.265), ONVIF/RTSP, dual-stream, metal housing, IP66/67, ~4-15W each.

VENDOR COMPARISON (all unbranded China; buy ONE, test RTSP in OpenCV first):
โ”œโ”€โ”€ HDAY-CAM (BEST track record): 900+ sold, 4.7โ˜…, 1080p/4MP,
โ”‚   lens 1.7-6mm options, 2.8mm + POE48V + metal IP67, ~$27
โ”œโ”€โ”€ REVOTECH: 323 sold, 4.9โ˜…, 5MP/8MP, full spec sheet,
โ”‚   -25ยฐC to 60ยฐC rated, metal, ~$31
โ””โ”€โ”€ MWRCTV MN430: NO reviews, no specs โ†’ avoid unless desperate
PROVEN (larger) fallbacks: Dahua 5442 turret (EmpireTech), Amcrest, Annke C800

Lens: 2.8mm for nearly all (~100ยฐ wide, low distortion, accurate distance). Fisheye (1.7mm) only for one "overview" cam if wanted โ€” heavy distortion, bad for distance judgment. 3.6mm only if a position needs reach.

Resolution: 1080p is fine for underbody/close views (you're judging clearance, not zooming). 4MP for 1-2 "detail" positions. On a 9.7" screen the difference is invisible. Mix freely.

AliExpress notes: legit (Alibaba's retail), real buyer protection + 90-day returns, but factory-direct: 2-week shipping, sloppy specs (verify IR wavelength โ€” many claim 940nm but ship visible 850nm), buy from rated sellers, pay on-platform. Order the test camera EARLY so it overlaps CAN/bench work.

7.2 NVR โ€” Frigate

Recording โ‰  decoding. Recording just writes the camera's already-encoded H.265 to disk โ€” light CPU. Decoding only happens to VIEW footage.

rev. 3 โ€” OptiPlex, CPU-only, records only WHILE AWAKE (no parked 24/7):
โ”œโ”€โ”€ Option A: Frigate (Docker), DETECTION OFF โ€” real NVR UI for free,
โ”‚   records H.265 straight to disk (file-copy, near-zero CPU), strip later
โ”œโ”€โ”€ Option B: plain ffmpeg/go2rtc โ€” `ffmpeg -c copy` segmented chunks
โ”‚   (pure passthrough, no re-encode), Flask UI lists + serves files.
โ”‚   Max simplicity + control, but you build playback UI yourself.
โ””โ”€โ”€ NO AI/CV on cameras (the owner's call): "record + load up to view" only.
    CPU object detection is too slow + spikes power โ†’ defer to Pi 5 + Hailo.
Recommendation: start with Frigate detection-OFF; fall back to Option B if heavy.

7.3 Storage Math (the real NVR constraint)

8 cams continuous, H.265:
โ”œโ”€โ”€ 4K:    ~688 GB/day โ†’ 3 wks = 14.5 TB
โ”œโ”€โ”€ 5MP:   ~344 GB/day โ†’ 3 wks = 7.2 TB
โ””โ”€โ”€ 1080p: ~168 GB/day โ†’ 3 wks = 3.5 TB โœ…

STRATEGY: substream (1080p) while-awake + event-triggered 4K
DRIVE: 4TB SSD in truck (~$200, vibration-proof) โ‰ˆ 3 weeks substream IF run continuously
OFFLOAD: flagged events โ†’ home NAS via Tailscale when in range

rev 3.3: Phase 1 records only while the OptiPlex is awake (driving + awake parks), not 24/7 โ€” so the "3 weeks" above is a continuous-recording ceiling, and real fill is much slower. 4TB is comfortably over-provisioned for Phase 1; that headroom is for when the Pi 5 + Hailo appliance (~1yr out) adds always-on recording.

Where the NVR drive goes (teardown). The Micro has 3 storage paths: M.2 SSD-3 = OS drive (256GB SK Hynix, occupied โ€” keep it; reseat Dell's M.2 thermal pad on any swap) ยท M.2 SSD-2 = empty 2280 NVMe slot ยท internal 2.5โ€ณ SATA bay (SATA-0 header). Cheapest NVR path = a 4TB 2.5โ€ณ SATA SSD (~$150-170) in the SATA bay โ€” sequential H.265 writes don't need NVMe speed, so SATA saves ~$50-80 vs a 4TB NVMe in SSD-2. Keep SSD-2 free for a later 1TB NVMe (ChromaDB/app data) if RAG grows.

7.4 Decode (CPU-only โ€” recording is cheap, viewing is the cost)

OptiPlex 5080 (CPU-only, UHD 630 iGPU):
โ”œโ”€โ”€ RECORDING = file-copy of pre-encoded H.265 โ†’ near-zero CPU โœ…
โ”œโ”€โ”€ VIEWING = decode, done by the DISPLAY DEVICE's browser, not the server
โ”œโ”€โ”€ Server mostly ROUTES streams; pull substreams for monitoring,
โ”‚   serve a main stream only for the camera actively viewed
โ””โ”€โ”€ UHD 630 QuickSync can assist decode for the few streams viewed at once

Key: recording is NOT decoding โ€” the camera self-encodes, the OptiPlex just writes bytes to disk. Decoding only happens to view footage, and the browser on the tablet/radio does that. So even CPU-only, the OptiPlex handles record + restream of the Phase-1 cameras fine. What it canNOT do (CPU-only) is 8-cam Frigate object detection โ€” that's a GPU job, deferred to the Pi 5 + Hailo-8L (~1yr out). An "8 Pis for 8 cameras" farm is unnecessary: cameras self-encode; the server routes, the browser decodes only what's viewed.

7.5 PoE Power


โ€น 6. ESP32 NODE NETWORK (Tier 0)8. CAN BUS INTEGRATION โ€บ