- Auto-restart: ProcessorManager detects fatal task crashes via done callback and restarts with exponential backoff (2s-30s, max 5 attempts in 5 min window). Manual stop disables auto-restart. Restart state exposed in target state API and via WebSocket events. - Remove "Running"/"Paused" badge label from sync clock dashboard cards (pause/play button already conveys state). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7.8 KiB
7.8 KiB
Pending Features & Issues
Priority: P1 quick win · P2 moderate · P3 large effort
Processing Pipeline
P1Noise gate — Suppress small color changes below threshold, preventing shimmer on static contentP1Color temperature filter — Already covered by existing Color Correction filter (2000-10000K)P1Zone grouping — Merge adjacent LEDs into logical groups sharing one averaged color- Complexity: medium — doesn't fit the PP filter model (operates on extracted LED colors, not images); needs a new param on calibration/color-strip-source config + PixelMapper changes
- Impact: high — smooths out single-LED noise, visually cleaner ambilight on sparse strips
P2Palette quantization — Force output to match a user-defined palette (preset or custom hex)P2Drag-and-drop filter ordering — Reorder postprocessing filter chains visuallyP3Transition effects — Crossfade, wipe, or dissolve between sources/profiles instead of instant cut- Complexity: large — requires a new transition layer concept in ProcessorManager; must blend two live streams simultaneously during switch, coordinating start/stop timing
- Impact: medium — polishes profile switching UX but ambient lighting rarely switches sources frequently
Output Targets
P1Renamepicture-targetstooutput-targets— Rename API endpoints and internal references for clarityP2OpenRGB — Control PC peripherals (keyboard, mouse, RAM, fans) as ambient targetsP2Art-Net / sACN (E1.31) — Stage/theatrical lighting protocols, DMX controllers- Complexity: medium — UDP-based protocols with well-documented specs; similar architecture to DDP client; needs DMX universe/channel mapping UI
- Impact: medium — opens stage/theatrical use case, niche but differentiating
Automation & Integration
P2Webhook/MQTT trigger — Let external systems activate profiles without HA integration- Complexity: low-medium — webhook: simple FastAPI endpoint calling SceneActivator; MQTT: add
asyncio-mqttdependency + subscription loop - Impact: high — key integration point for home automation users without Home Assistant
- Complexity: low-medium — webhook: simple FastAPI endpoint calling SceneActivator; MQTT: add
P2WebSocket event bus — Broadcast all state changes over a single WS channel- Complexity: low-medium — ProcessorManager already emits events; add a WS endpoint that fans out JSON events to connected clients
- Impact: medium — enables real-time dashboards, mobile apps, and third-party integrations
P3Notification reactive — Flash/pulse on OS notifications (optional app filter)- Complexity: large — OS-level notification listener (platform-specific: Win32
WinToast/pystray, macOSpyobjc); needs a new "effect source" type that triggers color pulses - Impact: low-medium — fun but niche; platform-dependent maintenance burden
- Complexity: large — OS-level notification listener (platform-specific: Win32
Multi-Display
P2Investigate multimonitor support — Research and plan support for multi-monitor setups- Complexity: research — audit DXGI/MSS capture engine's display enumeration; test with 2+ monitors; identify gaps in calibration UI (per-display config)
- Impact: high — many users have multi-monitor setups; prerequisite for multi-display unification
P3Multi-display unification — Treat 2-3 monitors as single virtual display for seamless ambilight- Complexity: large — virtual display abstraction stitching multiple captures; edge-matching calibration between monitors; significant UI changes
- Impact: high — flagship feature for multi-monitor users, but depends on investigation results
Capture Engines
P3SCRCPY capture engine — Implement SCRCPY-based screen capture for Android devices- Complexity: large — external dependency on scrcpy binary; need to manage subprocess lifecycle, parse video stream (ffmpeg/AV pipe), handle device connect/disconnect
- Impact: medium — enables phone screen mirroring to ambient lighting; appeals to mobile gaming use case
P3Camera / webcam — Border-sampling from camera feed for video calls or room-reactive lighting
Code Health (from review 2026-03-09)
Bugs
P1Thread safety: dict mutation during iteration — composite_stream.py / mapped_stream.py_sub_streams.clear()crashes processing loopP1Thread safety: SyncClockRuntime.get_time() race — compound read without lock causes time double-countingP1Thread safety: SyncClockManager unprotected dicts —_runtimes/_ref_countsmutated from multiple threads without lockP1Clock ref-count corruption on hot-swap —_release_clockreads new clock_id from store instead of old oneP1Path traversal guard —auto_backup.pyuses string checks instead ofPath.resolve().is_relative_to()P2Crash doesn't fire state_change event — fatal exception path inwled_target_processor.pydoesn't notify dashboardP2WS broadcast client mismatch —kc_target_processor.pyzip(clients, results)can pair wrong clients after concurrent removal
Performance
P1Triple FFT for mono audio —analysis.pyruns 3 identical FFTs when audio is mono (2x wasted CPU)P2Per-frame np.array() from list —ddp_client.py:195allocates new numpy array every frameP2frame_time recomputed every loop iteration —1.0/fpsin 8 stream files, should be cachedP2Effect/composite/mapped streams hardcoded to 30 FPS — ignores target FPS, bottlenecks 60 FPS targetsP3Spectrum .copy() per audio chunk —analysis.py~258 array allocations/sec for read-only consumers
Code Quality
P212 store classes with duplicated boilerplate — no base class;BaseJsonStore[T]would eliminate ~60%P2DeviceStore.save() uses unsafe temp file — fixed-path.tmpinstead ofatomic_write_jsonP2Route code directly mutates ProcessorManager internals —devices.pyaccessesmanager._devicesin 13+ placesP2scene_activator.py accesses ProcessorManager._processors directly — bypasses public APIP3datetime.utcnow() deprecated — 88 call sites in 42 files, should usedatetime.now(timezone.utc)P3color-strips.js 1900+ lines — should be split into separate modulesP3No DataCache for color strip sources — fetched with raw fetchWithAuth in 5+ places
Features
P1Auto-restart crashed processing loops — add backoff-based restart when_processing_loopdiesP1"Start All" targets button — "Stop All" exists but "Start All" is missingP2Manual backup trigger endpoint —POST /system/auto-backup/trigger(~5 lines)P2Scene snapshot should capture device brightness —software_brightnessnot saved/restoredP2Device health WebSocket events — eliminate 5-30s poll latency for online/offline detectionP2Distinguish "crashed" vs "stopped" in dashboard —metrics.last_erroris already populatedP3Home Assistant MQTT discovery — publish auto-discovery payloads; MQTT infra already existsP3CSS source import/export — share individual sources without full config backupP3Exponential backoff on events WS reconnect — currently fixed 3s retry
UX
P2Tags / groups for cards — Assign tags to devices, targets, and sources; filter and group cards by tagP3PWA / mobile layout — Mobile-first layout + "Add to Home Screen" manifestP1Collapse dashboard running target stats — Show only FPS chart by default; uptime, errors, and pipeline timings in an expandable section collapsed by defaultP1Review protocol badge on LED target cards — Review and improve the protocol badge display on LED target cards