Skip to content

Releases

WLED TV v1.3.5

Choose a tag to compare

@leonida92 leonida92 released this 07 Nov 20:15

WLED TV v1.3.5 - Fixture Geometry Engine & Canvas Layout Solvers

Fixture Geometry Engine Consolidation

  • FixtureGeometryEngine: Dedicated domain geometry module consolidating:
    • Physical LED coordinate mapping across 4 perimeter corners (clockwise & counter-clockwise) with pixel-accurate 16:9 depth normalization.
    • Aspect ratio crop calculations and temporal letterbox/pillarbox snap thresholds (Cinemascope 2.39:1, 4:3 pillarbox, fullscreen 16:9).
    • Ambient fixture sub-zone partitioning (LEFT_AMBIENT, RIGHT_AMBIENT, TOP_AMBIENT, BOTTOM_AMBIENT, and full screen).
    • High-performance layout solving for UI views (calculatePreviewLayout, calculateZoneCanvasLayout).
  • NormalizedRect Pure Domain Primitive:
    • Zero-dependency immutable normalized coordinate rectangle (left, top, right, bottom) with helper properties (width, height, centerX, centerY).
    • Isolated Android RectF boundary conversions strictly into ui.views.RectAdapters.kt, keeping domain and geometry models 100% pure Kotlin.

Decoupled Pure Optical Color Engine

  • ScreenColorProcessor:
    • Stripped of all physical coordinate math and fixture layout collaborators, transforming it into a pure optical color sampling and transformation engine.
    • Margin probing writes directly to primitive floats with zero object allocations on every frame.
    • Optical color extraction operates directly on List<NormalizedRect> slices.

Zero-Allocation 60Hz Streaming Cadence

  • Mutation-Driven Zone Caching:
    • Implemented deviceZonesCache in FixtureGeometryEngine, guaranteeing zero heap allocations during steady-state 60Hz ambient streaming.
    • Invalidation is strictly mutation-driven, firing only when video aspect crop boundaries change or configuration is updated.

UI Views as Pure Rendering Adapters

  • TvPerimeterPreviewView & ZoneCanvasView:
    • Converted into pure rendering adapters with pre-computed geometry vectors, eliminating all layout math and allocations from onDraw.

Architecture & Standards

  • Recorded ADR 0004: Fixture Geometry Engine & Canvas Layout Solvers.
  • Added automated guardrail test geometryPackage_hasZeroAndroidSdkImports to enforce zero Android SDK imports in pure domain packages.
  • Updated GLOSSARY.md, AGENTS.md, and CODING_STANDARDS.md.
  • All JVM unit tests passing 100% green in ~8s.

WLED TV v1.3.4

Choose a tag to compare

@leonida92 leonida92 released this 07 Nov 09:08

WLED TV v1.3.4 - Optical Color Pipeline Consolidation & Zero-Allocation UI Loops

Optical Color Science Consolidation

  • ScreenColorProcessor: Deepened into the single consolidated optical color processing engine:
    • Absorbed ColorSmoothingFilter as an internal component; encapsulated temporal EMA smoothing and per-device state tracking.
    • Added high-performance wire encoding (encodeWireFrame) supporting all 6 channel orders (RGB, GRB, BGR, BRG, RBG, GBR) with fast integer enum decoding and zero GC allocations.
    • Implemented SK6812 4-channel RGBW gamut mapping (AUTO_SUBTRACT, AUTO_ADD, OFF), protected by device.wireBytesPerLed to restrict 4-channel encoding to DDP-compatible devices while safely clamping DRGB and WARLS to 3 channels.

Pure Byte Transport & Zero-Allocation Streaming

  • WledControllerClient & WledUdpSender:
    • Completely stripped of optical math and channel reordering logic, acting as pure byte transports.
    • Replaced per-pixel loops in sendDdpFrame and sendDrgbFrame with chunked System.arraycopy memory transfers directly into UDP packet buffers.
    • Dynamically sized flashDevice and blackoutFleet payloads based on device.wireBytesPerLed.
  • Three-Stage Decoupled Pipeline (AmbientStreamingEngine):
    • Stage 1: Spatial box sampling into pre-allocated rawTargetBuffers upon video frame arrival.
    • Stage 2: Temporal smoothing on 60Hz ticker into canonical RGB deviceBuffers, ensuring liveFrameListener and getOverlayData() always receive undistorted canonical colors.
    • Stage 3: Wire encoding into pre-allocated wireBuffers immediately before UDP transmission.
    • Strict zero GC allocations on the 60 FPS hot path.
  • Zero-Allocation UI Test Loops:
    • Rainbow test pattern in MainActivity and real-time color balance preview in CalibrationActivity pre-allocate buffers prior to loop entry, eliminating heap churn during diagnostic tests.

Architecture & Standards

  • Recorded ADR 0003: Optical Color Pipeline Consolidation and Wire Encoding.
  • Updated GLOSSARY.md and CODING_STANDARDS.md with protocol-safe channel sizing and zero-allocation cadence loop rules.
  • 128 JVM unit tests passing 100% green in ~7s.

WLED TV v1.3.3

Choose a tag to compare

@leonida92 leonida92 released this 06 Nov 23:43

WLED TV v1.3.3: Unified WledControllerClient & Streamlined Settings

Unified WledControllerClient & Shared Socket Lifecycle

  • Unified Fixture Client (WledControllerClient): Consolidated UDP protocol streaming (DDP multi-packet, DRGB MTU clamping, WARLS indexing, SK6812 RGBW channel conversion) and HTTP device management (/json/state, /json/info) behind a single, high-leverage interface operating on domain models (WledDevice).
  • Eliminated Socket Churn & Port Exhaustion: Replaced independent per-activity DatagramSocket allocations and manual teardown across 5 UI screens with an application-scoped singleton (DefaultWledControllerClient) owning a shared, reusable socket and connection-pooled OkHttpClient.
  • Zero Jitter Hot Path: Frame transmission (sendFrame) remains synchronous on the 60Hz ambient loop for sub-millisecond pacing, while HTTP device control and fleet-wide operations are main-safe suspend functions running off the main thread.
  • Concurrent Fleet Blackout: Multi-device power-off calls execute in parallel with individual timeout safeguards, preventing offline or lagging controllers from delaying shutoff for the rest of the fleet.
  • High-Level Domain Flashing: Added flashDevice(device) on the controller client to replace manual byte allocations and timer loops across device setup screens.
  • Internal Encapsulation: Low-level WledUdpSender and WledHttpClient are now marked internal, preventing any UI screen or service from bypassing the controller client architecture.
  • Fast In-Memory Testing Seam: Added FakeWledControllerClient double, enabling all 106 unit tests across 14 test suites to pass 100% green in ~8 seconds without network I/O.

Streamlined Settings

  • Removed Physical Corner Alignment Wizard: Completely removed CornerFinderActivity, obsolete calculation models, and layout cards to streamline TV strip geometry setup directly to intuitive perimeter segment counters.

WLED TV v1.3.2

Choose a tag to compare

@leonida92 leonida92 released this 06 Nov 22:19

WLED TV v1.3.2: In-Process Ambient Streaming Engine & Reactive Configuration

Architectural Deepening & Core Engine

  • In-Process AmbientStreamingEngine: Extracted capture coordination, zero-allocation buffer pooling, 60Hz ticker cadence, and Widevine L1 DRM state machine into a deterministic core decoupled from Android OS service lifecycles.
  • Reactive ConfigRepository: Replaced static service backdoors with an observable StateFlow<WledConfig> and atomic mutations with background asynchronous JSON persistence.
  • 100% JVM Testability: Core ambient streaming pipeline and configuration repository are fully covered by fast JVM unit tests using controllable Clock abstractions.
  • Slim Service Adapter: Reduced AmbientCaptureService to a thin OS adapter bridging MediaProjection, VirtualDisplay, ImageReader, and foreground service lifecycle.
  • UI Decoupling: All 8 activities now observe state reactively and bind to the active engine lifecycle-safely without memory leaks.

WLED TV v1.3.1

Choose a tag to compare

@leonida92 leonida92 released this 01 Nov 12:53

What's New in v1.3.1

Real-Time System Stats Overlay HUD

  • CPU, RAM & Disk Telemetry: When the floating sampling HUD overlay is enabled, a secondary minimalist glass mini-pill displays live TV CPU utilization (/proc/stat delta), RAM usage (ActivityManager.MemoryInfo), and internal storage free space (StatFs).
  • Throttled Sampling: System statistics are sampled at 1 Hz on the background capture thread with cached string formatting, having 0% impact on 60 FPS ambient capture.

Comprehensive Codebase Audit Fixes & Hardening

Critical Bug Fixes

  • Resilient Hardware Teardown: Fixed a race condition where stopping the capture service cancelled the coroutine scope before blackout frames and HTTP power-off commands reached WLED controllers. Teardown now runs in an asynchronous non-cancellable job before closing the UDP socket.
  • Widevine L1 DRM Detection & Throttling: Bypassed bilinear zone scanning and letterbox cropping during 100% black frames. When DRM is detected (>5s black frame with active audio), UDP streaming throttles from 60 PPS down to a 1.5s keepalive packet, eliminating network congestion during DRM playback.
  • Live Calibration Slider Refresh: Fixed an issue in CalibrationActivity where adjusting RGB gain or brightness sliders did not update solid calibration colors on physical LEDs until the color was clicked again.
  • State Synchronization: Added missing config reload in MainActivity.toggleDeviceEnabled() and fixed stale config overwrite when returning to SystemSettingsActivity.
  • Test Mode Overrides: CornerFinderActivity and EditDeviceActivity.identifyDevice() now properly set isTestingOverride = true, preventing 60Hz ambient frames from overwriting test LEDs.
  • Protocol Limits & Accurate Telemetry: Clamped DRGB to WLED's MTU limit of 490 LEDs (1472 bytes) and made frame dispatchers return the exact number of datagrams transmitted for 100% accurate PPS statistics.

Performance & Zero-Allocation Hot Path

  • Integer Color Ordering: Hoisted color order decoding outside loops in WledUdpSender, eliminating up to 24,000 per-LED string allocations per second.
  • Zero-Allocation Canvas Rendering: Cached LED zone layouts in ZoneCanvasView and pre-allocated HSV/RectF buffers in TvPerimeterPreviewView.
  • Shared OkHttpClient Pool: Consolidated all HTTP calls across Activities and the Service onto a single singleton OkHttpClient instance.

Security & Concurrency

  • Coroutines: Upgraded serviceScope to SupervisorJob() + Dispatchers.IO.
  • Thread Safety: Made mDNS device discovery thread-safe using CopyOnWriteArrayList in DeviceManagerActivity.
  • Android 13+ Hardening: Restricted system broadcast receivers to Context.RECEIVER_NOT_EXPORTED.
  • Build Security: Externalized keystore credentials in app/build.gradle.kts.

WLED TV v1.3.0

Choose a tag to compare

@leonida92 leonida92 released this 16 Oct 10:54

What's New in v1.3.0

Multi-Protocol Streaming (DDP, DRGB, WARLS)

  • DDP (Distributed Display Protocol, port 4048): Added high-performance streaming with atomic multi-packet frame synchronization (PUSH flag) to completely eliminate visual tearing on long strips (>480 LEDs).
  • Native 4-Channel RGBW Support (SK6812): Accurate white channel gamut extraction with selectable Auto Subtract and Add modes for true warm/neutral/cool white LEDs.
  • Protocol Selector: Choose between DDP, DRGB (port 21324), or indexed WARLS (port 21324) per device in Light Setup.

Floating Diagnostic HUD & Sampling Zone Visualizer

  • Real-Time Visualizer (SamplingOverlayView): Optional system overlay rendering thin wireframe sampling boxes and inner live color dots directly over your TV screen.
  • Live Telemetry Pill: Compact glass HUD displaying real-time Capture FPS, Network PPS, Aspect / Letterbox crop percentages, and total LED count.
  • One-Click Toggle: Turn on/off directly from the Android TV notification drawer action button or via broadcast intent (com.wled.tv.ACTION_TOGGLE_OVERLAY).
  • Zero Video Interference: Intelligent color filtering prevents sampling routines from picking up the HUD's own wireframe lines during active playback.

Physical Corner Finder Calibration Tool

  • Corner Finder Activity: Dedicated visual utility to help identify and map physical strip corner indices (Top-Left, Top-Right, Bottom-Right, Bottom-Left).
  • Automatic Perimeter Calculator: Automatically computes top, right, bottom, and left segment counts, physical starting corner, and clockwise/counter-clockwise wiring direction.

Widevine L1 DRM Blackout Detection

  • Smart Protection: Detects when protected commercial streaming services (Netflix, Disney+, Prime Video) blank the hardware surface (100% black frame with active audio).
  • Bandwidth Saver: Automatically pauses unnecessary frame transmission during DRM blackouts with lazy, throttled (2 Hz) audio IPC checks.

Performance & Android TV Safeguards

  • Zero-Allocation Hot Path: Precomputed Gamma 256-entry Look-Up Table (LUT) in ScreenColorProcessor, cached letterbox probes, and reusable direct buffers eliminating GC pauses.
  • UI Thread Decoupling: Re-routed config reloads and overlay telemetry reads to the dedicated WledCaptureThread to prevent UI thread race conditions.
  • Leanback Intent Safeguards: Multi-tier fallback for ACTION_MANAGE_UNKNOWN_APP_SOURCES preventing Settings app crashes on Google TV / Fire OS.
  • mDNS Discovery Timeout: Added a 3000ms safety timeout to sequential mDNS resolution preventing discovery stalls when devices reboot or drop off Wi-Fi.
  • Expanded Test Suite: 47 unit tests covering UDP framing, smoothing filters, perimeter calculation, letterbox cropping, and pillarbox detection.

WLED TV v1.2.5

Choose a tag to compare

@leonida92 leonida92 released this 10 Oct 13:46

What's New in v1.2.5

Live Real-Time Throughput Indicator

  • Header Telemetry Badge: Added a lightweight, unintrusive live status pill directly in the main screen header bar showing real-time capture FPS and total UDP packets per second (PPS).
  • Subtle Visual Feedback: Solid cyan indicator dot to confirm capture pipeline activity at a glance without cluttering the TV interface.

Interactive 3-Hour Telemetry History Graph

  • Rolling Telemetry Buffer: Captures a continuous rolling 3-hour history (10,800 data points) of screen capture frame rate and network output rate using zero-allocation circular ring buffers.
  • Custom Hardware-Accelerated Charting: Implemented a bespoke Android TV Canvas graph (PerformanceHistoryChartView) featuring:
    • Thin 1.2dp stroke lines with anti-aliasing and subtle gradient fills.
    • Dual independent Y-axes for Capture FPS (left, cyan) and Network PPS (right, amber).
    • Dynamic time axis formatting (-3h, -1.5h, Now).
    • D-pad navigable time window selectors: 5m, 15m, 30m, 1h, and 3h.
  • Accurate Telemetry Presentation: Removed misleading bottleneck diagnosis cards, reflecting true Android TV compositor behavior where static menus naturally pause hardware frame production while active video playback runs smoothly at full rate.

WLED TV v1.2.4

Choose a tag to compare

@leonida92 leonida92 released this 09 Oct 20:03

What's New in v1.2.4

Multi-Device Letterbox Crop Fix

  • Fixed an issue where dynamically detected letterbox black bar crops were inadvertently applied to secondary fixtures/lamps that had auto-letterbox disabled, ensuring manual edge crop configurations are always respected.

Zero-Allocation Hot Path Performance

  • Capture Loop Zero Allocations: Decoupled sampleChromaWeightedBox to write directly into output buffers, eliminating ~9,000 temporary array allocations per second at 60 FPS.
  • Dynamic LED Zone Caching: Cached computed perimeter and ambient sub-zones, avoiding per-frame computeLedZones recomputations.
  • Letterbox Probe Caching: Cached scan probe coordinates in detectLetterbox to eliminate repetitive IntArray allocations.
  • UI Render Optimization: Eliminated PointF, RectF, and list allocations inside onDraw() in TvPerimeterPreviewView and ZoneCanvasView for silky smooth live simulation rendering.

Reliability & Resource Leaks

  • Socket Leak Prevention: Ensured UDP sockets are properly closed in onDestroy() across all UI activities (MainActivity, CalibrationActivity, DeviceManagerActivity, EditDeviceActivity).
  • Thread-Safe UDP Streaming: Hardened WledUdpSender with ConcurrentHashMap and synchronized socket lifecycles to prevent race conditions during rapid state transitions.
  • WakeLock Timeout Guard: Added a 6-hour guard timeout to prevent indefinite CPU lock on unexpected service termination.
  • Test Coverage: Added unit tests for WledUdpSender and ColorSmoothingFilter.

WLED TV v1.2.3

Choose a tag to compare

@leonida92 leonida92 released this 30 Sep 16:54

What's New in v1.2.3

4K Playback & Performance Pipeline Optimizations

  • Decoupled Buffer Lifetime: Decoupled Android ImageReader hardware graphic buffer release from UDP network transmission. The graphic buffer is closed immediately within sub-millisecond time after memory sampling, preventing buffer queue stalls and display composition stutters during 4K 60Hz/120Hz playback.
  • Triple-Buffered Capture: Configured ImageReader with maxImages = 3 to eliminate SurfaceFlinger buffer starvation on high refresh rate displays.
  • Background Thread Priority: Assigned THREAD_PRIORITY_BACKGROUND to the capture handler thread, ensuring system video decoders (YouTube, ExoPlayer, Nuvio) retain CPU scheduling priority.
  • Optimized Letterbox Probing: Letterbox scanning probes are consolidated and executed only when auto-letterbox detection is actively enabled on a device.
  • Throttled Live Simulation UI: Live LED dashboard rendering is throttled to 50ms (~20 FPS) with decoupled buffer copies to eliminate UI overhead on the capture pipeline.

Ultra Capture Resolution

  • Added 80x45 (Ultra) capture resolution option in System Settings for low-power TV processors (processes only 3,600 pixels / ~14 KB per frame).

WLED TV v1.2.2

Choose a tag to compare

@leonida92 leonida92 released this 14 Sep 16:13

What's New in v1.2.2

Selectable Capture Resolution

  • Eco Mode (160x90): Tailored for older TVs (such as 2020 Sony Bravias) and lower-powered streaming devices. Reduces pixel count and memory bandwidth by 75%, eliminating frame lag, buffer backpressure, and stuttering.
  • Standard Mode (320x180): Default balanced resolution providing smooth performance and responsive edge extraction.
  • High Mode (480x270): High precision capture for high-density LED setups (300+ LEDs).
  • Live On-the-Fly Switching: Dynamic VirtualDisplay and ImageReader buffer resizing applies changes immediately without interrupting the capture service.
  • Settings UI: Quick toggle under System & Connection using D-pad Left/Right or Click.

Interactive Perimeter Depth

  • Added full D-pad Up/Down controls to adjust sampling depth (3% to 30%) in the Screen Zones & Crop editor.
  • Dynamic LED zone boundary computation immediately recalculates sampling rectangles with real-time on-screen preview.

TV Navigation & Focus Improvements

  • Fixed an issue in System Settings where clicking "Check for Updates" caused focus to inadvertently jump to the Capture Frame Rate card.
  • Retains focus correctly on the update item and restores focus upon closing update dialogs.