Import send_alert into processor.py, store engine as self._engine after
init_db(), extend _execute_action() to accept event_type/severity/source_id
and call send_alert for alert_all and push_and_record actions, and pass
those params from _handle_event().
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add vigilar/alerts/sender.py with _CONTENT_MAP for human-readable push
notification titles/bodies, build_notification(), and send_alert() which
retrieves VAPID key, iterates push subscriptions, calls pywebpush, and
logs results to alert_log with auto-cleanup of expired (410) endpoints.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After FFmpeg finishes writing, _stop_ffmpeg() now reads VIGILAR_ENCRYPTION_KEY
and encrypts the MP4 to .vge format via encrypt_file(), updating the returned
RecordingSegment to reflect the encrypted file path and size.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds PIN checking to arm/disarm endpoints using verify_pin() against
cfg.security.pin_hash, and a new POST /system/api/reset-pin endpoint
that verifies the recovery passphrase before updating the PIN hash.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Local face recognition with visitor profiles, unknown clustering,
household presence integration, and privacy-first opt-in model.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per-pet configurable rules with conditions (zone, time, presence)
and actions (push, log, record). Walk tracker, missing pet, on-the-loose
detection via composable rule builder UI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Highlight reel video, kiosk ambient mode for magic picture frame,
and on-demand time-lapse generator with scheduling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Activity heatmaps, wildlife journal with weather correlation,
and package detection with sunset-aware reminders.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Notification delivery, recording playback/encryption, HLS.js bundle,
and PIN verification with recovery passphrase.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pet detection (YOLOv8), pet ID classifier (MobileNetV3-Small),
wildlife threat-tiered alerting, pet dashboard, training UI,
and recording labeling overlay.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CameraConfig.location now uses CameraLocation enum (Pydantic v2 coerces TOML strings)
- Wildlife classifier returns ThreatLevel enum values with correct return type annotation
- Model backup path fixed: pet_id_backup.pt instead of pet_id.backup.pt
- Dashboard submitLabel JS now posts to /pets/<sighting_id>/label matching Flask route
- Pet status API computes status field (safe/unknown) based on last-seen recency
- digest.py comment explains timestamp unit difference between tables
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Pass pets list to dashboard template (Critical 3)
- Sanitize upload filenames with werkzeug secure_filename (Important 6)
- Validate image extension against allowlist (Important 7)
- 404 check for pet existence in upload and update endpoints (Important 8)
- Save uploads to training/{pet_name}/ not training/{pet_id}/ (Important 11)
- Wire /train to PetTrainer with background thread (Important 12)
- Wire /api/training-status to stored trainer status (Important 13)
- Implement /api/highlights from sightings + wildlife queries (Important 14)
- Cap limit param at 500 on sightings and wildlife endpoints (Important 15)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the flat pet/detected handler with context-aware classification:
unknown animals (no pet_id) → UNKNOWN_ANIMAL/WARNING, known pets in
exterior/transition zones → PET_ESCAPE/ALERT, known pets indoors →
PET_DETECTED/INFO. Adds four new unit tests covering all three paths.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements all /pets/* routes (register, status, sightings, wildlife,
unlabeled crops, label, upload, update, delete, train, training-status,
highlights), registers the blueprint in app.py, adds a placeholder
dashboard template, and covers the API with 11 passing unit tests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 tasks covering: YOLOv8 detector, pet ID classifier, wildlife threat
classification, crop management, alert integration, web UI, and training.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers pet detection (YOLOv8), pet ID classifier, wildlife threat
tiers, zone-based alerting, training UI, and pet dashboard.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Task 4 — Alert Profiles: presence-aware + time-of-day alert routing.
Profiles match household state (EMPTY/KIDS_HOME/ADULTS_HOME/ALL_HOME)
and time windows (sleep hours). Per-detection-type rules control
push/record/quiet behavior with role-based recipients (all vs adults).
Task 5 — Recording Timeline: canvas-based 24h timeline per camera
with color-coded segments (person=red, vehicle=blue, motion=gray).
Click-to-play, date picker, detection type filters, hour markers.
Timeline API endpoint returns segments for a camera+date.
All 5 daily-use feature tasks complete. 140 tests passing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5-task plan covering presence detection, person/vehicle AI detection,
smart alert profiles, recording timeline UI, and health monitoring.
Tasks 1-3 parallelizable, 4 depends on 1+2, 5 depends on 2.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Spec covers 5 feature areas for making Vigilar a system a household
relies on daily: multi-person presence detection, MobileNet person +
vehicle detection with driveway fencing, smart alert profiles with
presence/time awareness, recording timeline UI, and health monitoring
with auto-prune and daily digest.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>