RoboCop: Home Security & CCTV Monitoring
RoboCop is a specialized security persona within the assistant module, designed for real-time monitoring of home CCTV and doorbell events.
Evolution and Purpose
As detailed in Git commit 4da7e9ab, RoboCop was implemented to transform passive CCTV recording into proactive security monitoring. The agent integrates directly with the home's camera systems and the assistant's notification framework to provide contextual alerts.
Key Features
- Doorbell Press Notifications: Immediately notifies the "Home HQ" group with a snapshot when the doorbell is pressed. Includes a 2-minute cooldown to prevent notification fatigue.
- Arrival/Departure Briefings: When a user returns home (detected via the
wakeup.gorouter),RoboCopprovides a "While you were away" summary of any notable events. - Anomaly Detection: Triggers an alert if a person is detected while the primary user has been away for more than 25 minutes.
- Overnight Audits: Every morning at 07:45,
RoboCopperforms an automated check of the previous night's CCTV logs and provides a concise briefing. - Snapshot Gallery: Maintains a rolling gallery of the last 20 doorbell snapshots, accessible via the web API at
/doorbell.
Implementation Details
- Logic Layer:
assistant/cctv_monitor.gomanages the polling of camera events and snapshot capture. - Alert Routing: Events are routed through the
assistant's standard notification system, ensuring persona consistency. - Web Dashboards: Static HTML logs for CCTV events are served at
/cctv-log.
Mermaid Diagram: RoboCop Event Flow
graph TD
C[CCTV/Doorbell Event] --> M[cctv_monitor.go]
M --> R{RoboCop Logic}
R -- Doorbell --> S[Snapshot Capture]
S --> N[Notify Home HQ Group]
R -- Person Detected --> A{User Home?}
A -- No & >25m Away --> N
R -- Daily Audit --> B[Overnight Check Tool]
B --> Briefing[Nikki Morning Pulse]
Guidance for AI Agents
- Security Priority: When
RoboCopgenerates an anomaly alert, treat it with high priority. The agent has already filtered out normal activity based on user presence. - Visual Evidence: Use the
/doorbellsnapshot tools to retrieve images of visitors when the user asks, "Who came to the house today?"