Repository navigation
feat: SimpliSafe live frame source with rejoin and blindness heartbeat - #32
Merged
Merged
Conversation
This reverts commit 5333d6c.
…-source # Conflicts: # PLAN.md # docs/decision-log.md # pyproject.toml # src/poolguard/config.py
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vision/live.py—LiveFrameSource: a camera-agnosticFrameSourcegiven a function that opens a stream of BGR images. It owns a background thread/event loop, a newest-frame-only slot, and a rejoin loop keyed on frame arrival (30 s silence → close and reopen, backoff 2 s doubling to 60 s, forever).seconds_since_last_frame()is the health signal. Reusable for the production RTSP camera.vision/simplisafe.py: bench-only adapter (ADR-002). Headless login from a rotating refresh token (vision/simplisafe_auth.py),live-view→ LiveKit credentials, joins the room video-only. Deps in a newsimplisafeextra; the core package never imports it.report_for_frame_age— UP is earned by fresh frames, DOWN afterPOOLGUARD_ALERT_BLIND_AFTER_SECONDS(180).poolguard-simplisafe-login(one-time PKCE sign-in) andpoolguard-simplisafe-watch(runs the source, logs fps per minute, pings Kuma).drowning-test.mp4(39 s, submersion at ~24 s) is the first labeled positive with a calm lead-in.Test plan
uv run ruff check . && uv run ruff format --check .uv run pytestwith all extras — all pass locallytest_live_source,test_simplisafe_auth,test_simplisafe_watch_script) need neitherlivekitnorsimplipy, so they run in CIpoolguard-simplisafe-watch~1 min at 1920x1080, 19–20 fps, clean shutdown