How 0xethano/bbb-security-cam works
This repository packages a BeagleBone Black security-camera system: Motion detects activity, a separate FFmpeg process maintains a rolling video buffer, and event capture preserves footage to removable storage. Camera services are controlled and managed on the device, while WireGuard and host hardening constrain remote access. The README documents these runtime relationships; no source excerpts were provided, so script-level call details and some service wiring are not represented.
Main entry points: motion.conf Motion detection · bbb_wg0.conf.example WireGuard peers · save-event.sh Event collector · security-cam-ctl Camera control
Components 16
Capture and recording
- Motion detection
appliance/motion/motion.conf - FFmpeg segmenter
- Rolling buffer
- Event collector
appliance/security-cam/save-event.sh - Segment service
appliance/security-cam/segment-ring.service - Segment runner
appliance/security-cam/segment-ring.sh
Storage and operations
- Saved events
- Event pruning
appliance/security-cam/prune-saved-events.sh - Prune schedule
appliance/security-cam/prune-saved-events.timer - Camera control
appliance/security-cam/security-cam-ctl
Network security
- WireGuard peers
appliance/wireguard/bbb_wg0.conf.example - Firewall rules
appliance/hardening/nftables.conf - Host hardening
appliance/hardening/setup-hardening.sh - SSH restrictions
appliance/hardening/sshd-security.conf
Other components
- USB webcam
- VPN administrator
Connections 16
- USB webcam → Motion detection: supplies video
README.md - Motion detection → FFmpeg segmenter: serves MJPG
README.md - FFmpeg segmenter → Rolling buffer: writes segments
README.md - Motion detection → Event collector: triggers capture
README.md - Event collector → Rolling buffer: preserves recent segments
README.md - Event collector → Saved events: writes events
README.md - Segment service → Segment runner: runs
- Prune schedule → Event pruning: schedules
- Event pruning → Saved events: prunes recordings
README.md - VPN administrator → WireGuard peers: connects through
README.md - WireGuard peers → SSH restrictions: permits peer access
README.md - WireGuard peers → Motion detection: permits stream access
README.md - Firewall rules → WireGuard peers: restricts ingress
README.md - Host hardening → Firewall rules: configures
- Camera control → Motion detection: controls service
README.md - Camera control → Segment service: controls service
README.md