From b4e3c5c84f4aefe9431f084609c7a7c2e038c613 Mon Sep 17 00:00:00 2001 From: Home Assistant Version Control Date: Wed, 29 Jul 2026 15:35:15 +0000 Subject: [PATCH] .session_nest_snapshot_20260729.md --- .session_nest_snapshot_20260729.md | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .session_nest_snapshot_20260729.md diff --git a/.session_nest_snapshot_20260729.md b/.session_nest_snapshot_20260729.md new file mode 100644 index 0000000..32221c8 --- /dev/null +++ b/.session_nest_snapshot_20260729.md @@ -0,0 +1,34 @@ +# Nest Snapshot Session — July 29, 2026 + +## Goal +Capture still images from Nest cameras (Google Nest SDM API, `supported_features: 2` — streaming only) for AI (Ollama) analysis. + +## What Was Built + +### Custom Integration: `nest_snapshot` +Location: `/homeassistant/custom_components/nest_snapshot/` + +3 files: +- **manifest.json** — domain `nest_snapshot`, depends on `nest`, no extra requirements +- **services.yaml** — `capture` service with `entity_id` (camera, required) and `filename` (template string, optional) +- **__init__.py** — Main logic: resolves Nest config entry → gets `CameraLiveStreamTrait` → creates `RTCPeerConnection` → generates SDP offer → calls `trait.generate_web_rtc_stream(offer_sdp)` → receives one `av.VideoFrame` → saves JPEG via PIL → cleans up + +### Config Change +- `/homeassistant/configuration.yaml` — line `nest_snapshot:` appended at end + +### Test Automation +- **`automation.test_nest_snapshot_capture`** — manual trigger, calls `nest_snapshot.capture` on `camera.front_door_front_door` → `/media/nest_snapshot_test_{{ now().strftime('%Y%m%d_%H%M%S') }}.jpg` + +## Key Technical Details +- Nest cameras do NOT support `camera.snapshot`, `camera.record`, `camera.play_stream`, `camera.get_stream_source`, or `camera_proxy` — all return errors or placeholders +- Working approach: one-shot WebRTC stream via `google-nest-sdm` + `aiortc` inside HA's Python env +- `aiortc` and `PIL` are NOT available in this MCP add-on container — they live in HA's separate Python environment. All WebRTC/SDP handling runs inside HA. +- HA version: `2026.7.4` +- Primary test camera: `camera.front_door_front_door` +- Blink cameras work fine with `blink.trigger_camera` → `camera.snapshot` (separate flow) + +## To Resume Testing +1. **Restart HA** — required for `nest_snapshot` component to load +2. Verify service `nest_snapshot.capture` appears in Developer Tools → Services +3. Trigger automation `automation.test_nest_snapshot_capture` (or call service manually) +4. Check `/media/` for output file (>10 KB = success, ~1-2 KB = placeholder)