Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7baa9c1
fix(eufy-stream-server): pass videoCodec=H265 to JMuxer for HEVC streams
May 16, 2026
f2ea04d
fix(eufy-stream-server): cap startLivestream retries on wedged upstream
May 16, 2026
7f7a957
fix: extend metadata + snapshot timeouts to 60s for slow-warmup cameras
May 16, 2026
5ed7b12
fix: recover from wedged upstream P2P via station recycle
May 17, 2026
5643a6b
feat: snapshot keyframe cache + faster cold-start recovery
May 31, 2026
cbbc8b8
fix: make station-recycle guard robust against stale registry entries
May 31, 2026
b58a4b8
fix: audio-aware muxer mode so video-only cameras stream (no more bla…
May 31, 2026
56edc6e
fix: thumbnails serve cache only, never wake the camera
May 31, 2026
164beb9
fix: return placeholder on snapshot cache-miss instead of throwing
May 31, 2026
6475f0d
feat: per-station stream coordinator (one stream per HomeBase, newest…
May 31, 2026
fc18e65
feat: serial background thumbnail refresh (45-min, yields to live)
May 31, 2026
a6fe8a1
perf: stop streaming ~12s after the last viewer leaves (was 30s)
May 31, 2026
a9ccd46
feat: thumbnail refresh default 2h + per-camera UI setting
May 31, 2026
725b522
feat: stop chronically-failing cameras from recycling the shared Home…
May 31, 2026
3972e7e
fix: report the camera's true codec in getVideoStream (don't let the …
May 31, 2026
94ba5c5
fix: don't stampede on reload (empty caches) + quiet the stop-not-run…
May 31, 2026
9faf460
feat: persist last thumbnail keyframe; restore on reload (no tap, no …
May 31, 2026
b4ef31e
Revert "feat: persist last thumbnail keyframe; restore on reload (no …
May 31, 2026
edf2e88
fix: don't preempt a working/warming stream (stop grid-preview thrash)
May 31, 2026
624de4c
Reapply "feat: persist last thumbnail keyframe; restore on reload (no…
May 31, 2026
0f8459e
refactor: fold station-stream-registry into the coordinator
May 31, 2026
5ace53f
fix: recycle a wedged cold-start P2P session within the viewer's pati…
May 31, 2026
49c1561
fix: clean HomeBase handoff + never let a 'both' muxer hang the live …
May 31, 2026
b20d06f
fix: allow a deliberate camera switch to preempt a delivering HomeBas…
May 31, 2026
e05f706
feat: in-plugin H.265 -> H.264 transcoding for plug-and-play HomeKit/…
May 31, 2026
da67aa9
feat: thermal governor — auto-throttle transcoding when the host CPU …
May 31, 2026
9e20895
test: repair eufy-device-{ptz,intercom} suites (storage + StreamServe…
May 31, 2026
b68418e
docs: document fork's reliability/transcode work in CHANGELOG + README
May 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@ All notable changes to the Eufy Security Scrypted monorepo will be documented in
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] — local fork (`josha/eufy-security-scrypted`, branch `fix/h265-muxer-codec`)

Reliability + feature work on top of 0.3.1, focused on making HomeBase-mediated
(battery) cameras behave well in HomeKit. Not yet upstreamed; see the project's
decisions log for rationale.

### Added

- **Per-HomeBase single-stream coordinator** (`utils/station-stream-coordinator`): a Eufy HomeBase serves only ONE camera P2P stream at a time; the coordinator serializes access (concurrency = 1 per station) so cameras don't stampede and mutually starve. Live requests preempt; background work (thumbnail refresh) is denied while busy. 4G LTE cameras are their own station.
- **Snapshot/thumbnail cache that never wakes the camera**: snapshots serve the last-seen keyframe (any age) and convert to JPEG without starting a livestream; a true miss returns a neutral placeholder instead of throwing (throwing made Scrypted's Snapshot plugin fall back to the waking video path). Kills the Home-app "thumbnail storm". The last keyframe is persisted to storage and restored on reload. Optional per-camera "Background Thumbnail Refresh" setting.
- **In-plugin H.265 → H.264 transcoding** (`utils/h264-transcode-server`): per-camera "Transcode to H.264" toggle (default on for H.265 cameras) runs a managed ffmpeg that re-encodes the muxed fMP4 to H.264 so HomeKit live view AND the Scrypted browser (WebRTC) preview work without enabling Scrypted's per-camera "Transcoding Debug Mode". Only engages while the live source is H.265; native H.264 passes through untouched.
- **Thermal governor** (`utils/thermal-governor`): samples host CPU temperature and auto-throttles new transcodes (falls back to H.265 passthrough) above a critical threshold, with hysteresis and a Scrypted UI alert. Inert when the temperature source is unreadable.
- **Clean camera switching**: tapping a second camera on the same HomeBase hands off cleanly (newest-tap-wins after a warm-up guard that absorbs the grid's simultaneous-request burst).

### Fixed

- **Cold-start latency**: a wedged/idle HomeBase P2P session is recycled within HomeKit's ~30s give-up window (cold-start no-data threshold 45s → 18s) instead of after the viewer has already quit.
- **Audio-aware fMP4 muxing**: pick JMuxer `both` vs `video` mode by whether the camera actually delivers usable (ADTS) audio — mic-off / config-packet-only cameras no longer hang the muxer (which left live view black). Backstop: a `both` muxer that emits nothing within 4s is rebuilt video-only.
- **Preemption handoff ordering**: the preempted camera now stops its P2P before the new one starts (the slot lease is released only after the stop completes), so the two don't overlap and starve the one-stream HomeBase.
- **Codec mislabeling**: report the true source codec to Scrypted (codec set after the spread of the consumer's requested options) so an H.265 stream isn't relabeled H.264 and `-vcodec copy`'d as-is.

## [0.3.1] - 2026-04-20

### Added
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

## Overview

> **Fork notice.** This is a fork of [`caplaz/eufy-security-scrypted`](https://github.com/caplaz/eufy-security-scrypted) with substantial reliability and feature work for HomeBase-mediated (battery) cameras in HomeKit, beyond the upstream 0.3.1 release. Highlights: a per-HomeBase single-stream coordinator (a HomeBase serves only one camera P2P stream at a time), a snapshot/thumbnail cache that never wakes the camera, faster cold-start recovery, audio-aware fMP4 muxing with a video-only fallback, clean newest-tap-wins camera switching, **in-plugin H.265 → H.264 transcoding** (so HomeKit live view and the WebRTC browser preview work without Scrypted's per-camera "Transcoding Debug Mode"), and a CPU thermal governor that throttles transcoding when the host gets hot. See the [CHANGELOG](CHANGELOG.md) `[Unreleased]` section for the full list.

This monorepo contains the complete Eufy Security integration for Scrypted, consisting of multiple packages that work together to provide comprehensive home security automation.

The monorepo includes four specialized packages: the main Scrypted plugin for device integration, a WebSocket client library for communication, a streaming server for video delivery, and a command-line interface for testing and automation.
Expand Down
Loading