Skip to content

feat: V3 — audio monitoring, event timeline, and Tailscale integration - #15

Merged
johnoct merged 5 commits into
mainfrom
feat/v3-audio-timeline-tailscale
Feb 6, 2026
Merged

feat: V3 — audio monitoring, event timeline, and Tailscale integration#15
johnoct merged 5 commits into
mainfrom
feat/v3-audio-timeline-tailscale

Conversation

@johnoct

@johnoct johnoct commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Summary

BabyPing V3 — three new pillars built in parallel using agent teams.

Audio Monitoring

  • New AudioMonitor class using sounddevice for mic capture in ~100ms chunks
  • Auto-calibrates sound threshold from first 3 seconds of ambient noise
  • Real-time VU meter in web UI status bar (color-coded: gray → green → amber → red)
  • Sound alerts reuse existing Web Audio chime + Vibration API
  • CLI flags: --no-audio, --audio-device N, --audio-threshold N

Event Timeline Dashboard

  • New EventLog class with JSONL file storage (~/.babyping/events.jsonl)
  • GET /events API with pagination, offset, and type filtering
  • GET /timeline — full dashboard page with scrollable event cards, filter buttons (All/Motion/Sound), auto-refresh
  • Both motion and sound events logged with timestamps and snapshot references
  • Auto-prune with --max-events flag (default 1000)

Tailscale Integration

  • Auto-detects Tailscale IP (CGNAT 100.64.0.0/10 range) on startup
  • Prints both LAN and Tailscale URLs in console
  • Green "Secure" pill in web UI header when accessed via Tailscale
  • README setup guide for remote access

Stats

  • 3 new modules: audio.py, events.py, docs/plans/2026-02-06-v3-design.md
  • 87 new tests (73 → 160 total)
  • New dependency: sounddevice

Test plan

  • All 160 tests passing
  • Manual: verify audio level meter with real microphone
  • Manual: verify timeline page loads and displays events
  • Manual: verify Tailscale IP detection (if Tailscale installed)
  • Manual: verify sound alerts trigger on loud noise

Audio monitoring:
- New AudioMonitor class (sounddevice) with auto-calibrating threshold
- Real-time VU meter in web UI status bar (color-coded levels)
- Sound alerts via existing Web Audio chime system
- CLI flags: --no-audio, --audio-device, --audio-threshold

Event timeline dashboard:
- New EventLog class with JSONL file storage and auto-pruning
- GET /events API with pagination and type filtering
- GET /timeline page with scrollable event cards, filters, auto-refresh
- Motion and sound events logged with timestamps and snapshots

Tailscale integration:
- Auto-detect Tailscale IP (CGNAT 100.64.0.0/10) on startup
- "Secure" pill in web UI header when accessed via Tailscale
- README setup guide for remote access

87 new tests (73 → 160 total), 3 new modules, 0 new breaking changes.
Replace the separate /timeline page with a draggable bottom sheet overlay
that keeps the camera stream always visible. Three snap states (peek, half,
full) with touch/mouse drag support, velocity-based snapping, and rubber-band
resistance for a native app feel.
…ble peek

The bottom sheet was covering the status bar (including ROI button) with
its always-visible 60px peek state. Now the sheet starts fully hidden
and opens when you tap the motion status card ("No motion" / "Motion Xs
ago"). Swipe down or tap backdrop to dismiss.
Tap "Motion" or "Sound" pills in the status bar to enable/disable macOS
notifications for each alert type independently. State is synced via
POST /alerts endpoint and reflected in /status. Sound toggle only
appears when audio monitoring is active.
@johnoct
johnoct merged commit 07989bc into main Feb 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant