New match types for application conditions:
- "fullscreen": app has a fullscreen window on any monitor (detected via
EnumWindows, works even when another window is focused on a different
display)
- "topmost_fullscreen": app is the focused foreground window AND fullscreen
Optimizes profile evaluation to only call expensive detection methods when
needed: WMI process enumeration (~3s) is skipped when no condition uses
"running" mode; foreground/fullscreen checks (<1ms each) are called
selectively based on active match types.
Filters false positives from fullscreen detection by excluding desktop/shell
process windows, tool windows, and non-activatable overlay windows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace hardcoded updateAllText() calls with languageChanged event
pattern so feature modules subscribe independently. Guard all API
calls behind apiKey checks to prevent unauthorized requests when not
logged in. Fix login modal localization, hide tabs when logged out,
clear all panels on logout, and treat profiles with no conditions as
always-true.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wrap running and stopped target lists under a parent Targets group.
Fix narrow-screen layout by keeping action buttons inline and hiding
metrics below 768px.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace text FPS labels with Chart.js sparklines on running targets,
use emoji icons for metrics, add in-place DOM updates to preserve
chart animations, and add a 1-10s poll interval slider that controls
all dashboard timers. Uptime now ticks every second via client-side
interpolation regardless of poll interval.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Backend: GET /api/v1/system/performance endpoint using psutil (CPU/RAM)
and nvidia-ml-py (GPU utilization, memory, temperature) with graceful
fallback. Frontend: Chart.js line charts with rolling 60-sample history
persisted to sessionStorage, flicker-free updates via persistent DOM
and diff-based dynamic section refresh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add missing common.loading i18n key to en/ru locales. Add close button
and ESC key support to the overlay spinner so users can cancel running
capture tests. Uses AbortController to abort the in-flight fetch request.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Profile management tab with cards, condition editor, process browser
- Dashboard: add profiles section, compact layout, type subtitles
- AmbiLED serial device support (raw RGB + 0xFF show command)
- Unified serial device handling (isSerialDevice helper)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add `static_color` capability to Adalight provider with `set_color()` method
- Add `static_color` field to Device model, DeviceState, and API schemas
- Add GET/PUT `/devices/{id}/color` API endpoints
- Change auto-shutdown behavior: restore device to idle state instead of
powering off (WLED uses snapshot/restore, Adalight sends static color
or black frame)
- Rename `_auto_shutdown_device_if_idle` to `_restore_device_idle_state`
- Add inline color picker on device cards for devices with static_color
- Add auto_shutdown toggle to device settings modal
- Update labels from "Auto Shutdown" to "Auto Restore" (en + ru)
- Remove backward-compat KC aliases from ProcessorManager
- Align card action buttons to bottom with flex column layout
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New filter with color temperature (2000-10000K) and per-channel RGB
gain controls. Uses LUT-based processing for fast per-frame application.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WLED: native on/off via JSON API. Adalight: sends all-black frame
to blank LEDs (uses existing client if target is running, otherwise
opens temporary serial connection). Toggle button placed next to
delete button in card top-right corner.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Dashboard is the new default tab showing running/stopped targets
with FPS, uptime, errors metrics. Updates live via events WebSocket.
Includes Stop All button and Start/Stop per target.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Optimize KC frame processing: downsample to 160x90 with cv2.resize
before rectangle extraction, pre-compute pixel coords, vectorize
smoothing with numpy arrays
- Add WebSocket event stream for server state changes: processor manager
fires events on start/stop, new /api/v1/events/ws endpoint streams
them to connected clients
- Add HAOS EventStreamListener that triggers coordinator refresh on
state changes for near-instant switch updates
- Reduce HAOS polling interval from 10s to 3s for fresher FPS metrics
- Fix overlay button tooltips: flatten nested JSON keys in locale files
to match flat dot-notation lookup used by t() function
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements transparent on-screen overlay that displays LED calibration data
directly on the target display for easier setup and debugging. Overlay shows
border zones, LED position axes with tick labels, and calibration details.
Features:
- Tkinter-based transparent overlay window with click-through support
- Border zones highlighting pixel sampling areas (colored rectangles)
- LED position axes with numbered tick marks at regular intervals
- Calibration info box showing target name, LED counts, and configuration
- Toggle button (eye icon) in target cards for show/hide
- Localized UI strings (English and Russian)
Implementation:
- New screen_overlay.py module with OverlayWindow and OverlayManager classes
- Overlay runs in background thread with proper asyncio integration
- API endpoints for start/stop/status overlay control
- overlay_active state tracking in processor manager
Known limitation: tkinter threading cleanup causes server restart when overlay
is closed, but functionality works correctly while overlay is active.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Eliminate 5 numpy↔tuple conversions per frame in processing hot path:
map_border_to_leds returns ndarray, inline numpy smoothing with integer
math, send_pixels_fast accepts ndarray directly
- Fix numpy boolean bug in keepalive check (use `is not None`)
- Add per-stage pipeline timing (extract/map/smooth/send) to metrics API
and UI with color-coded breakdown bar
- Expose device_fps from WLED health check in API schemas
- Auto-sync LED count from WLED device: health check detects changes and
updates storage, calibration, and active targets automatically
- Use integer math for brightness scaling (uint16 * brightness >> 8)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Baud rate is now a first-class device field, passed through the full
stack: Device model → API schemas → routes → ProcessorManager →
AdalightClient. The frontend shows a baud rate dropdown (115200–2M)
for Adalight devices in both Add Device and Settings modals, with a
live "Max FPS ≈ N" hint computed from LED count and baud rate.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements the second device provider (Adalight) for Arduino-based serial LED controllers,
validating the LEDDeviceProvider abstraction. Adds serial port auto-discovery, per-type
discovery caching with lazy-load, capability-driven UI (brightness control, manual LED count,
standby), and serial port combobox in both Add Device and General Settings modals.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scan the local network for WLED devices advertising _wled._tcp.local.
and present them in the Add Device modal for one-click selection.
- New discovery.py: async mDNS browse + parallel /json/info enrichment
- GET /api/v1/devices/discover endpoint with already_added dedup
- Header scan button (magnifying glass icon) in add-device modal
- Discovered devices show name, IP, LED count, version; click to fill form
- en/ru locale strings for discovery UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce abstract LEDClient base class with factory pattern so new
LED controller types can plug in alongside WLED. ProcessorManager is
now fully type-agnostic — all device-specific logic (health checks,
state snapshot/restore, fast send) lives behind the LEDClient interface.
- New led_client.py: LEDClient ABC, DeviceHealth, factory functions
- WLEDClient inherits LEDClient, encapsulates WLED health checks and state management
- device_type field on Device storage model (defaults to "wled")
- Rename target_type "wled" → "led" with backward-compat migration
- Frontend: "WLED" tab → "LED", device type badge, type selector in
add-device modal, device type shown in target device dropdown
- All wled_* API fields renamed to device_* for generic naming
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skip LEDs at the start/end of the strip are blacked out while the full
screen perimeter is resampled onto the remaining active LEDs using linear
interpolation. Calibration canvas tick labels show per-edge display
ranges clipped to the active LED range. Moved LED offset control from
inline overlay to a dedicated form row alongside the new skip inputs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skip redundant processing/DDP sends when screen is static using object
identity comparison. Add configurable standby interval to periodically
resend last frame keeping WLED in live mode. Track frames skipped,
keepalive count, and current FPS (rolling 1-second send count). Always
use DDP regardless of LED count. Compact metrics grid with label-value
rows and remove Skipped from UI display.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add numpy-based DDP pixel packing (send_pixels_numpy) and fast send
path (send_pixels_fast) eliminating per-pixel Python loops
- Move ProcessedLiveStream filter processing to background thread so
get_latest_frame() returns pre-computed cached result instantly
- Vectorize map_border_to_leds for average interpolation using cumulative
sums instead of 934 individual np.mean calls (~16ms -> <1ms)
- Batch all CPU work into single asyncio.to_thread call per frame
- Fix FPS calculation to measure frame-to-frame interval (was measuring
processing time only, reporting inflated values)
- Add Potential FPS metric showing theoretical max without throttling
- Add FPS label to WLED target card properties
- Add fps_potential field to TargetProcessingState API schema
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add POST /api/v1/picture-targets/{target_id}/test endpoint for single-frame
color extraction preview on Key Colors targets
- Add test button on KC target cards that opens lightbox with spinner,
displays captured frame with rectangle overlays and color swatches
- Add API docs link in WebUI header
- Swap confirm dialog button colors (No=red, Yes=neutral)
- Remove type badges from WLED and KC target cards
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce Pattern Template entity as a reusable rectangle layout that
Key Colors targets reference via pattern_template_id. This replaces
inline rectangle storage with a shared template system.
Backend:
- New PatternTemplate data model, store (JSON persistence), CRUD API
- KC targets now reference pattern_template_id instead of inline rectangles
- ProcessorManager resolves pattern template at KC processing start
- Picture source test endpoint supports capture_duration=0 for single frame
- Delete protection: 409 when template is referenced by a KC target
Frontend:
- Pattern Templates section in Key Colors sub-tab with card UI
- Visual canvas editor with drag-to-move, 8-point resize handles
- Background capture from any picture source for visual alignment
- Precise coordinate list synced bidirectionally with canvas
- Resizable editor container, viewport-constrained modal
- KC target editor uses pattern template dropdown instead of inline rects
- Localization (en/ru) for all new UI elements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce a new "key_colors" target type alongside WLED targets, enabling
real-time color extraction from configurable screen rectangles with
average/median/dominant modes, temporal smoothing, and WebSocket streaming.
- Split WledPictureTarget into its own module, add KeyColorsPictureTarget
- Add KC target lifecycle to ProcessorManager (register, start/stop, processing loop)
- Extend API routes and schemas for KC targets (CRUD, settings, state, metrics, colors)
- Add WebSocket endpoint for real-time color updates with auth
- Add KC sub-tab in Targets UI with editor modal and live color swatches
- Add EN and RU translations for all key colors strings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename "WLED Grab" to "LED Grab" across all files (title, logs, locales)
- Merge Devices and Targets into a single Targets tab with WLED sub-tab
containing Devices and Targets sections (like Sources tab pattern)
- Make target card source name label full-width
- Render engine template config as two-column key-value grid
- Update CLAUDE.md: no server restart needed for frontend-only changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add PictureTarget entity that bridges PictureSource to output device,
separating processing settings from device connection/calibration state.
This enables future target types (Art-Net, E1.31) and cleanly decouples
"what to stream" from "where to stream."
- Add PictureTarget/WledPictureTarget dataclasses and storage
- Split ProcessorManager into DeviceState (health) + TargetState (processing)
- Add /api/v1/picture-targets endpoints (CRUD, start/stop, settings, metrics)
- Simplify device API (remove processing/settings/metrics endpoints)
- Auto-migrate existing device settings to picture targets on first startup
- Add Targets tab to WebUI with target cards and editor modal
- Add en/ru locale keys for targets UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- New FlipFilter with horizontal/vertical bool options (np.fliplr/flipud)
- Add bool option type to filter system (base.py validate, app.js toggle UI)
- Rearrange calibration preview: direction toggle above LED count
- Normalize direction/offset control heights, brighten offset icon
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add BetterCam capture engine (DXGI Desktop Duplication, priority 4)
- Fix missing picture_stream_id in get_device endpoint
- Fix template delete validation to check streams instead of devices
- Add description field to capture engine template UI
- Default template name changed to "Default" with descriptive text
- Display picker highlights selected display instead of primary
- Fix modals closing when dragging text selection outside dialog
- Rename "Engine Configuration" to "Configuration", hide when empty
- Rename "Run Test" to "Run" across all test buttons
- Always reserve space for vertical scrollbar
- Redesign Stream Settings info panel with pill-style props
- Fix processed stream showing internal ID instead of stream name
- Update en/ru locale files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Merge Capture Templates and Processing Templates main tabs into Picture
Streams sub-tabs (Screen Capture shows streams + engine templates,
Processed shows streams + filter templates)
- Rename "Capture Templates" to "Engine Templates" and "Processing
Templates" to "Filter Templates" across all locale strings
- Rename "Picture Streams" tab to "Streams" throughout UI and locales
- Rename "WLED Screen Controller" to "WLED Grab" across all files
- Add subtab section headers and styling for merged template views
- Remove add card labels, keeping only plus icon for cleaner UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace expandable/collapsible groups with tab bar (Screen Capture, Static Image, Processed)
- Persist active stream tab in localStorage
- Shorten tab labels by removing "Streams" suffix
- Remove type badge from cards (redundant with tab separation)
- Add count badge on each tab with active highlight
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces a new "static_image" stream type that loads a frame from a URL
or local file path, enabling LED testing with known images or displaying
static content. Includes validate-image API endpoint, auto-validation on
blur/enter/paste with caching, capture template names on stream cards,
and conditional test stats display for single-frame results.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move WLED UI button into URL badge as clickable link on device cards
- Remove version label from device cards
- Show PP template name on processed stream cards
- Display filter chain as pills on processing template cards
- Add processing template test with source stream selector
- Pre-load PP templates when viewing streams to fix race condition
- Add ESC key handling for all modals
- Add filter chain CSS styles
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the Displays tab and replace <select> dropdowns in stream and
template test modals with a lightbox overlay showing the spatial display
layout. Clicking a display selects it. Uses percentage-based positioning
so the layout always fits its container.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace hardcoded gamma/saturation/brightness fields with a flexible
filter pipeline architecture. Templates now contain an ordered list of
filter instances, each with its own options schema. Filters operate on
full images before border extraction.
- Add filter framework: base class, registry, image pool, filter instance
- Implement 6 built-in filters: brightness, saturation, gamma, downscaler, pixelate, auto crop
- Move smoothing from PP templates to device stream settings (temporal, not spatial)
- Add GET /api/v1/filters endpoint for available filter types
- Dynamic filter UI in template modal with add/remove/reorder/collapse
- Replace camera icon with display icon for screen capture streams
- Legacy migration: existing templates auto-convert flat fields to filter list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Separate Screen Capture and Processed streams into grouped sections with headers
- Remove redundant Type dropdown from stream modal (type inferred from add button)
- Add full-resolution image to test endpoints alongside thumbnails
- Add image lightbox with clickable preview for full-size viewing
- Move test results from modal into lightbox overlay with capture stats
- Apply postprocessing to both thumbnail and full image for processed streams
- Rename "Assigned Picture Stream" to "Picture Stream" in device settings
- Fix null reference errors from removed test result HTML elements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce Picture Stream abstraction that separates the capture pipeline into
composable layers: raw streams (display + capture engine + FPS) and processed
streams (source stream + postprocessing template). Devices reference a picture
stream instead of managing individual capture settings.
- Add PictureStream and PostprocessingTemplate data models and stores
- Add CRUD API endpoints for picture streams and postprocessing templates
- Add stream chain resolution in ProcessorManager for start_processing
- Add picture stream test endpoint with postprocessing preview support
- Add Stream Settings modal with border_width and interpolation_mode controls
- Add stream test modal with capture preview and performance metrics
- Add full frontend: Picture Streams tab, Processing Templates tab, stream
selector on device cards, test buttons on stream cards
- Add localization keys for all new features (en, ru)
- Migrate existing devices to picture streams on startup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Target FPS slider (range 10-90) to Capture Settings dialog
- Fix settings PUT to merge with current values instead of resetting defaults
- Update FPS validation range to 10-90 in schema and config
- Remove irrelevant .github/workflows/validate.yml (HACS leftover)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Generate default templates (MSS, DXcam, WGC) in memory from EngineRegistry at startup
- Only persist user-created templates to JSON, skip defaults on load/save
- Add capture_template_id to Device model and DeviceCreate schema
- Remember last used template in localStorage, use it for new devices with fallback
- Split Device Settings dialog into General Settings and Capture Settings
- Add capture settings button (🎬) to device card
- Separate default and custom templates with visual separator in Templates tab
- Add capture engine integration to ProcessorManager
- Add CLAUDE.md with git commit/push policy and server restart instructions
- Add en/ru localization for all new UI elements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generic tutorial engine supports absolute (modal) and fixed (viewport)
positioning modes with spotlight backdrop, pulsing ring, and tooltip.
Calibration tutorial covers LED count, corner, direction, offset, span,
test, and toggle inputs. Device tutorial walks through card controls.
Auto-triggers on first calibration open and first device add.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tick labels: round-number ticks (300, 900, etc.) now take priority over
edge boundary labels (288, 933). When they overlap, the boundary label
is suppressed but its tick line is preserved.
Calibration tips: convert single paragraph to bulleted list with
individual i18n keys, add tip about toggling edge inputs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Make Devices and Displays sections collapsible with persistent state
- Move WLED config tip from footer to under Devices heading
- Add theme-aware colors for calibration canvas ticks and chevrons
- Rename sections to "Devices" and "Displays" with emoji prefix icons
- Fix display layout scaling to fill available space
- Remove unused footer-tip and modal code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move total LEDs counter, direction toggle, and offset input into the
screen area of the calibration preview
- Remove description paragraph, standalone offset form, and total LEDs banner
- Add mismatch warning (yellow + ⚠) when configured LEDs ≠ device count
- Use actual display aspect ratio for calibration preview
- Fix offset not updating tick labels (buildSegments now starts at offset)
- Remove max-width constraint on preview, add padding for breathing room
- Clean up unused i18n keys from both locale files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace fullscreen pixel preview with a canvas overlay inside the calibration
modal that shows LED index ticks, direction chevrons, and interactive corner
start position buttons. Fix corner hover centering and disable grow animation
for the active corner.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move WLED Configuration tips from Add Device modal to page footer
- Add WLED Web UI link in footer (auto-populated with first device URL)
- Add WLED Web UI button (globe icon) to device card actions
- Move pixel preview button from device card to calibration modal footer
- Add en/ru i18n keys for new UI elements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace segment-based calibration with core parameters (leds_top/right/bottom/left);
segments are now derived at runtime via lookup tables
- Fix clockwise/counterclockwise edge traversal order for all 8 start_position/layout
combinations (e.g. bottom_left+clockwise now correctly goes up-left first)
- Add pixel layout preview overlay with color-coded edges, LED index labels,
direction arrows, and start position marker
- Move "Add New Device" form into a modal dialog triggered by "+" button
- Add display index selector to device settings modal
- Migrate from requirements.txt to pyproject.toml for dependency management
- Update Dockerfile and docs to use `pip install .`
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add background health checks (GET /json/info) with configurable interval per device
- Auto-detect LED count from WLED device on add (remove led_count from create API)
- Add calibration test mode: toggle edges on/off with colored LEDs via PUT endpoint
- Show WLED firmware version badge and LED count badge on device cards
- Add modal dirty tracking with discard confirmation on close/backdrop click
- Fix layout jump when modals open by compensating for scrollbar width
- Add state_check_interval to settings API and UI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>