Repository navigation
Conversation
Both lights' crowd-sourced database entries are missing commandPatterns, so the app fell back to the legacy setLongCCTLightBrightness/ setLongCCTLightCCT (0x82/0x83) command family. That family is acknowledged by the firmware (notify replies look normal) but does not actually drive the LED output on these two models, so the brightness and CCT sliders had no physical effect while power control worked fine. Root cause for the FS150C specifically: its raw model number "20230029" had no entry in getProjectName(_ str:), so its nickname never resolved to "FS150C", which meant getLightType() could never reach its dedicated branch and instead silently fell back to a generic default (lightType 0), which in turn made CCTRange() fall back to the generic 3200-5600K range instead of the FS150C's real 2500-7500K. Changes: - getProjectName(_ str:): map "20230029" to "FS150C" so the light is correctly identified (NeewerLightConstant.swift). - CCTRange(ligthType:projectName:): add the FS150C's real 2500-7500K range instead of falling back to the generic 3200-5600K default (NeewerLightConstant.swift). - builtInCommandPatterns(lightType:): new fallback consulted by findCommandPatternFromDB() after the live database and temporaryCommandPatterns, so it survives a database.json re-sync. Provides power/cct patterns for FS230 (type 53) and FS150C (type 75), and an hsi (color) pattern for the FS150C, which is a true RGB light per its product listing (the FS230's database entry explicitly marks it as non-RGB). The cct/power patterns were physically confirmed against real hardware; the hsi pattern is copied verbatim from every other RGB-capable light in the same tag family sharing this exact cct pattern shape (identical hsi pattern across all of them, so it should generalize), and was also confirmed working on the FS150C. - getCCTOnlyLightCommand(): send the brightness and CCT legacy commands as two separate BLE writes with a short delay between them instead of one concatenated packet, since write() debounces/cancels a pending write within 15ms of the next one. This didn't turn out to fix the FS230/FS150C issue on its own (root cause was the missing command patterns above), but it's a real, independent correctness fix for any other light that still relies on this legacy code path. Tested on real hardware: 2x FS150C, 1x FS230 5600K. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Thanks a lot for this PR, and for testing on real FS150C and FS230 hardware! The diagnosis is spot on: both lights were falling back to the legacy 0x82/0x83 commands. There are a few things I'd like changed before merging: 1. Please move the command patterns into
Then 2. Please drop the 3. Could you double-check brightness-only changes on the FS230? The Thanks again! |
|
Following up with a suggestion prompted by your review comments on #118. You noted there that command-pattern fixes should live in #118 is the mirror image of this issue: those lights fell back to the legacy frames and needed combined patterns; mine is stuck on a combined pattern and needs the legacy fallback. Deleting that one DB entry would reach my light on the next database auto-sync — no release needed. The second request (persisting user-edited Happy to test either — this unit reproduces the problem in about ten seconds. (Diagnosis and this comment drafted by Claude, who did the protocol archaeology; I just move the sliders.) |
setBRR100LightValues() skipped findCommandPatternFromDB("cct") in CCT mode
and always built the legacy packet, so brightness-only changes (Stream Deck
dial, MCP set_brightness) updated the UI but not lights whose working CCT
command is pattern-based. Route through setCCTLightValues() when a cct
pattern exists, matching the HSI branch.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BTXihLs9VFMXcUAJtDJ2se
- Add power/cct commandPatterns to the type 53 (FS230) entry and a new type 75 (FS150C) entry with power/cct/hsi and cctRange 25-75. - Remove builtInCommandPatterns() and the type-75 CCTRange special case. - Drop the getCCTOnlyLightCommand split-write change. - Keep the "20230029" -> "FS150C" mapping and the setBRR100LightValues cct-pattern fix. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BTXihLs9VFMXcUAJtDJ2se
|
Thanks for the review. I've pushed the changes:
Note: the lights.json entries use the same pattern strings I tested on 2× FS150C and 1× FS230 (power, brightness, CCT, and HSI on the FS150C) with an earlier in-code version, but I haven't been able to run the lights.json route itself on hardware before it is merged and synced. |
Both lights' crowd-sourced database entries are missing commandPatterns, so the app fell back to the legacy setLongCCTLightBrightness/ setLongCCTLightCCT (0x82/0x83) command family. That family is acknowledged by the firmware (notify replies look normal) but does not actually drive the LED output on these two models, so the brightness and CCT sliders had no physical effect while power control worked fine.
Root cause for the FS150C specifically: its raw model number "20230029" had no entry in getProjectName(_ str:), so its nickname never resolved to "FS150C", which meant getLightType() could never reach its dedicated branch and instead silently fell back to a generic default (lightType 0), which in turn made CCTRange() fall back to the generic 3200-5600K range instead of the FS150C's real 2500-7500K.
Changes:
Tested on real hardware: 2x FS150C, 1x FS230 5600K.