Improve custom bus config UI capabilities - #1
Draft
timle2 wants to merge 1 commit into
Draft
Conversation
timle2
force-pushed
the
codex/govee-s14-wledpixelbus
branch
from
August 22, 2026 16:46
0bad406 to
f165cb6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft / Testing Status
This PR is intentionally draft. It is a proof of concept on top of wled#5704 (
WLEDpixelBus_PR) to show how the tested Govee S14 RGB+WW paired-pixel mapping can be represented by the new custom bus driver.This exact PR 5704-based firmware has not yet been tested on the physical Govee S14 controller. The bulb mapping itself was validated on the earlier dedicated paired-bus prototype in wled#5803; this branch translates that mapping into PR 5704's generic custom-channel model for review.
Why This Change
Some newer string-light bulbs are a single logical lamp but are wired as multiple WS281x-compatible physical pixels. The tested Govee S14 RGB+WW string is one of these: each bulb has one RGB chip and one warm-white chip. For WLED behavior to feel native, effects, segments, presets, JSON API, and Home Assistant should see one logical RGBW bulb, while the driver emits both physical pixels.
PR 5704's custom bus model can represent this without adding a dedicated Govee/S14 LED type. The missing pieces are making the rest of WLED treat the custom channel map as the source of truth for bus capabilities, UI visibility, auto-white behavior, and current estimation.
Concretely, a config can say:
Or for a future bulb with the order reversed:
Both should be represented by changing only
cmap; the UI and runtime should then reflect the resulting capabilities.Summary
This is an incremental patch on top of wled#5704. It keeps paired RGB+WW strings in the generic custom bus path instead of adding a dedicated S14 LED type.
cch,cmap, timing, inversion) into the LED settings UI from config/importWhat Changed
LED Settings UI
When custom bus config is enabled (
cch > 0), the LED settings page now restorescch,cmap, timing, 16-bit, and inversion fields from saved config or config-template import before deciding what controls to show.The UI then computes effective capabilities from those config-backed form fields:
R/G/Bentries expose RGB-capable behaviorW/WW/CWentries expose white controls, including the white slider / RGBW handling and auto-white controlsWWandCWexpose CCT capabilityFor the S14 proof-of-concept config,
cmap: [3, 1, 2, 4, 4, 4]containsW, so the white / auto-white controls become visible without a dedicated S14 mode.Bus Runtime
The bus constructor already derives RGB/W/CCT support from the custom map. This patch preserves the configured auto-white mode after that custom capability pass, so a base RGB bus with a custom map containing
Wcan still behave as a logical RGBW bus.Current Estimation
Current estimation now counts the configured custom channel sources instead of assuming a fixed RGB/RGBW channel count. This matters for paired bulbs where logical
Wmay be duplicated onto three physical wire channels (W,W,W).Example Mapping
For the Govee S14 RGB+WW paired WS281x string tested with the dedicated prototype:
{ "type": 22, "len": 30, "pin": [16], "rev": true, "rgbwm": 2, "drv": 0, "cch": 6, "cmap": [3, 1, 2, 4, 4, 4] }The generic behavior is that
cmapmaps each physical wire channel to the logical UI source it consumes. In this example, the first three wire channels consume logicalB,R,G, and the last three consume logicalW. Because the config containsW, WLED treats the bus as having white capability and the LED settings UI exposes white / auto-white controls.Equivalent future bulbs with different physical ordering should work by changing only
cmap, for exampleW,W,W,B,R,Gas[4, 4, 4, 3, 1, 2]. A dual-RGB bulb that mirrors two RGB chips could use a duplicated RGB map such as[3, 1, 2, 3, 1, 2], and white controls would remain hidden because the map has no white source.Validation
npm run build../WLED/.venv/bin/pio run -e esp32devnpm testgit diff --checkFirmware artifact:
build_output/release/WLED_17.0.0-devV5_ESP32.binSHA-256:
638bf8d2e343eea272a4c06efecbcdd585b273ae18263285ab95b65e14a0d5e6Notes
This PR is intentionally opened against the PR 5704 base branch in this fork to keep the review diff small. It should not be merged independently of PR 5704.