Add live estimated LED power draw to the LED Settings page#605
Open
wildemat wants to merge 2 commits into
Open
Add live estimated LED power draw to the LED Settings page#605wildemat wants to merge 2 commits into
wildemat wants to merge 2 commits into
Conversation
Shows estimated strip current (A) and power (W) on the homepage, computed
from the live pixel buffer — no physical sensor or PSU connection needed:
current ≈ N·idle_ma + (Σ subpixel/255)·ma_per_channel·(brightness/255)
Because draw varies by LED chip/strip, three inputs on the card let users
tune it: mA per color channel at full, per-LED idle mA, and supply voltage
(defaults 20 / 1 / 5, matching typical WS2812B @ 5V). The card also shows the
theoretical max (all LEDs full white) as a headroom reference.
- estimate_led_power() in views_api, merged into /api/get_homepage_data
- new settings led_ma_per_channel / led_idle_ma / led_supply_voltage
- change_setting persists them; homepage card + JS render and populate inputs
- README FAQ entry
Reacts live to brightness/color/mode changes, which is where users adjust them. Adds a dedicated lightweight /api/get_led_power endpoint polled only on that page (every 1.5s), instead of riding on the heavier homepage payload. Removes the homepage card and its updater.
wildemat
marked this pull request as ready for review
July 17, 2026 18:45
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.
What
Screen.Recording.2026-07-17.at.2.35.05.PM.mov
Adds an Estimated LED draw card to the LED Settings page (
#ledsettings) showing the strip's current (A) and power (W), computed live from the pixel buffer PLV is already driving — no external meter or PSU tap required.Since real draw depends on the LED chip/strip, the card has three inputs so each user can match their hardware:
It also shows the theoretical max (all LEDs full white) as a headroom reference — handy for sizing a PSU or checking you're under budget at a given brightness.
How it works
estimate_led_power()inviews_api.pyreadsstrip.getPixels()and scales by the strip brightness; exposed on a dedicatedGET /api/get_led_powerendpoint (kept off the homepage data path so it only runs when the card is visible).ui.js/index.js).led_ma_per_channel/led_idle_ma/led_supply_voltage(defaults 20 / 1 / 5) indefault_settings.xml, persisted viachange_setting.ledsettings.html;ui.jsrenders the values and populates the inputs (the input being edited is not clobbered).It's an estimate of commanded output, not a measurement: it ignores per-LED regulation variance, voltage droop and wiring losses.
🤖 Generated with Claude Code