Skip to content

docs: CTRange direction inversion, side effects and persistence - #2291

Open
paoloantinori wants to merge 3 commits into
openshwprojects:mainfrom
paoloantinori:ctrange-docs
Open

paoloantinori wants to merge 3 commits into
openshwprojects:mainfrom
paoloantinori:ctrange-docs

Conversation

@paoloantinori

Copy link
Copy Markdown

What

Extends the CTRange command description in the //cmddetail block of src/cmnds/cmd_newLEDDriver.c, which is where scripts/getcommands.js regenerates docs/commands.md and docs/commands-extended.md from.

Why

I used CTRange 500 154 to invert the temperature direction on LEDVANCE Smart+ AC33908 CCT bulbs (OpenBeken 1.18.219) whose warm and cold channels map backwards, and none of this behavior was documented: the direction inversion, the fact that the value does not survive a reboot, or the side effects.

What the new text states

  • a reversed range (min greater than max) inverts the temperature direction on backwards-mapped CCT hardware
  • while the range is reversed, relative adjustments (add_temperature, SmartButtonForLEDs hold) degenerate: in clamp mode every adjustment lands on the new max, in wrap mode the value flips between the endpoints
  • applying the command snaps the current temperature to the new max without an MQTT led_temperature update, so the published state goes stale
  • swapping the cold and warm channel assignments is the persistent fix when it works; on CCT hardware using the alternate CW mode (flag 8) the channel swap did not change the output direction in my tests (PWM_n on the temperature pin, verified visually), and the reversed range was the working option
  • the value is not saved, so it belongs in autoexec.bat or the short startup command

The example stays a bare command line, matching the other 62 examples in the generated tables.

Extends the CTRange command description: reversed ranges invert the
temperature direction on CCT hardware with swapped channels, and the
values do not survive a reboot, so CTRange belongs in the startup
command.

gate-exempt: documentation-only change (cmddetail comment block)
Adds the caveats found in review: relative temperature commands
degenerate while the range is reversed, the current temperature snaps
to the new max without an MQTT update, the channel swap is the
persistent fix when it works (it did not in my tests on flag-8 CCT
hardware), and the reapplied value goes in autoexec.bat or the short
startup command. Example without the inline comment.

gate-exempt: documentation-only change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant