Files
HomeAssistantVS/.session_nest_snapshot_20260729.md
T

2.0 KiB

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.yamlcapture 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_cameracamera.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)