All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
This release is a substantial, breaking overhaul that reworks the library to cover the full WLED JSON API with a strongly-typed, hard-to-misuse design. Legacy members were removed rather than deprecated, so consuming code must be updated.
- Multi-targeting for
net8.0,net9.0,net10.0andnetstandard2.0. - Strong value types and enums for colours (
RgbColor,RgbwColor,Color), brightness/relative adjustments (ByteAdjust), toggles (Toggleable), selectors and more. - Fluent builders for state updates (
UpdateState), segments, playlists and individual LEDs. - Intent methods:
TurnOn,TurnOff,Toggle,SetBrightness,SetColor(RGB/RGBW),SetEffect,SetPaletteandReboot. - Presets: read, apply, save and delete (
GetPresets,ApplyPreset,SavePreset,DeletePreset). - Playlists: read, start and save (
GetPlaylists,StartPlaylist,SavePlaylist). - Individual LED control with automatic, sequential request chunking (
SetIndividualLeds). - Effect metadata parsing from
/json/fxdata(GetEffectMetadata). - Node discovery via
/json/nodes(GetNodes). - Device configuration read and safe partial writes via
/json/cfg(GetConfig,UpdateConfig); network/access-point changes require explicit opt-in. - Typed exception hierarchy:
WledException,WledConnectionException,WledResponseException(withStatusCode/Body) andWledUnsupportedVersionException. CancellationTokensupport on every asynchronous method.- Dependency-injection integration in a new
WLED.DependencyInjectionpackage viaservices.AddWledClient(...), backed byIHttpClientFactory. - A new
WLedClient(HttpClient)constructor for DI /IHttpClientFactoryscenarios.
- Requests and responses are now modelled as separate immutable response types and mutable request types, preventing accidental round-tripping of read-only fields.
- Posting state is now done through intent methods or
UpdateState(...)rather than mutating and re-posting a response object. SetColor/SetEffect/SetPalettewith nosegmentIdnow target the selected segments (the WLED"seg":{…}object form) instead of segment 0. The statesegfield is modelled as aSegmentPayloadunion that serialises as either an object (selected segments) or an array (id-targeted).- Transition values (
transition/tt) widened frombytetoushortto support the documented0–65535range (~109 minutes) instead of clamping at 25.5 s. ColorTemperature.Kelvinrange widened to1000–20000 Kto match the docs' forward- compatible guidance, with a newColorTemperature.KelvinUnchecked(int)escape hatch for values outside that range.WLedClient(string)now refreshes DNS. The convenience constructor's self-ownedHttpClientuses aSocketsHttpHandlerwith a boundedPooledConnectionLifetime(2 minutes) on modern runtimes, so a long-lived client picks up DNS/IP changes instead of pinning a stale connection (fixes #8). Thenetstandard2.0build falls back toHttpClientHandler; useIHttpClientFactory/DI there.- Richer NuGet package metadata for
WLEDandWLED.DependencyInjection: the package pages now link back to the GitHub repository (RepositoryUrl/PackageProjectUrl), render the README (PackageReadmeFile), and ship Source Link (Microsoft.SourceLink.GitHub) so consumers can step through the library source in their debugger.
- Ranged-random effect/palette selection via
Selector.RandomInRange(from, to)(the WLED"from~tor"token). - Typed device-configuration fields for
id.mdns,if.mqtt(en/broker/port/user/cid) anddef(on/bri/ps), while preserving all other keys throughJsonExtensionData. - Device snapshot read model (
GetDevice) returning a queryableWLedDevice/WLedDeviceSegmentgraph from a singleGET /json, resolving each segment's effect and palette and optionally fetching effect metadata viaDeviceSnapshotOptions.IncludeEffectMetadata. - Effect & palette catalogs (
GetEffectCatalog,GetPaletteCatalog) withFindById/FindByName(andTry*) lookups, anAvailableOnlyview that hides reservedRSVD/-slots, andSetEffect/SetPaletteoverloads that accept catalog entries. - Selected-segment fluent updates via
StateUpdate.SelectedSegments(...)(the WLED"seg":{…}object form); mixing selected and id-targeted segments in one update throws. - Actionable effect metadata: collection lookups over
IReadOnlyList<EffectMetadata>, plusSegmentUpdate.Effect(EffectMetadata)andApplyEffectDefaults(EffectMetadata)to seed speed/intensity/custom sliders from metadata defaults. - Strong id and range value types:
SegmentId,EffectId,PaletteId,PresetId,PlaylistId,LedMapId,SegmentBoundsandMatrixBounds, with range validation and overloads onSegmentUpdate.Range/Range2DandStateUpdate.LoadLedMap. - Fluent configuration updates via
UpdateConfig(Action<ConfigUpdate>)withIdentity,MqttandBootDefaultshelpers that emit only the sections and fields you touch.
- Legacy members were removed outright (no
[Obsolete]shims). Update to the new API surface.