FAQ
TL;DR: If your LN882HKI light switches on/off but will not dim, the missing piece was OpenBeken PWM support: the confirmed fix limited usable PWM paths to 6 channels and one maintainer summarized it as "up to 6 channels should work." This FAQ is for LN882HKI Tuya LED owners who need working PWM dimming after flashing OpenBeken. [#21233453]
Why it matters: It turns a partly working flash job into real dimming control for plant lights, bulbs, and RGBCW hardware.
| Option |
Result on LN882HKI |
Practical note |
| GPIO set as LED on A10 |
On/off works |
No dimming |
| Early LN882H OpenBeken PWM code |
PWM functions missing |
Dimming fails |
| PR #1328-era fix |
Single-channel PWM works |
Good for simple C-only boards |
| PR #1331 merged fix |
Up to 6 channels work |
Confirmed on LEDs and a real bulb |
Key insight: On LN882HKI, dimming started working only after PWM support was added and channel selection was constrained. If your board already switches light on A10, changing that active output from LED to PWM is the core setup step. [#21233497]
Quick Facts
- The original LN882H HAL had empty PWM start, stop, and update functions, so flashed devices could switch power but not dim brightness. [#21153576]
- The SDK PWM demo used 10 kHz frequency and 20% duty cycle in
pwm_init(10000,20,...), showing the chip family had PWM primitives even before OpenBeken integration. [#21181670]
- LN882HKI boards discussed here use a QFN32 package, and users identified FULLMUX-capable pins including GPIOA0-A12 and GPIOB3-B9. [#21190197]
- A controller-specific bug could light LEDs at roughly 1 to 2% after MQTT reconnect if the PWM pin was not initialized. [#21223691]
- After the later fix, one tester reported 5 working LEDs with dimming, color picker control, and warm/cold adjustment on a merged test build. [#21224383]
How can I enable PWM dimming on an LN882HKI Tuya Smart LED controller running OpenBeken?
Enable a working LN882H PWM build, then assign the light’s active output pin as PWM instead of LED. In this thread, the board already switched the light on A10, and the successful advice was to change that same pin role from LED to PWM because only the C output was wired. Users later confirmed the merged fix worked on real hardware.
[#21199714]
Why does PWM dimming not work on LN882HKI after flashing OpenBeken even though on/off control works on GPIO A10?
PWM dimming failed because LN882H PWM support was not implemented in the earlier OpenBeken HAL. The PWM stop, start, and update functions were empty, so GPIO A10 could still act like a simple LED output for on/off control, but not as a dimming source. That is why switching worked while brightness control did not.
[#21153576]
What is PWM in the context of LED dimming, and how does OpenBeken use it on smart light controllers?
PWM is the signal method OpenBeken uses to vary LED brightness by changing duty cycle instead of only switching power fully on or off.
"PWM" is a control signal that rapidly turns an output on and off, changing average power by duty cycle, which lets LED drivers dim light smoothly without changing the supply voltage. The LN882H SDK demo showed PWM running at 10 kHz with a 20% duty cycle.
[#21181670]
What does FULLMUX mean on the LN882HKI datasheet, and which FULLMUX pins can be used for PWM?
FULLMUX means the pin supports multiple alternate hardware functions, including candidates for PWM routing.
"FULLMUX" is a pin-mux category that lets one GPIO expose several peripheral functions, making it suitable for features like PWM when firmware maps a timer channel onto that pin. For the QFN32 LN882HKI package, users listed GPIOA0-A12 and GPIOB3-B9 as FULLMUX pins.
[#21190197]
How do I figure out which LN882HKI GPIO pin is actually responsible for dimming the light on my LED board?
Find the pin that already switches the LED load, then test that same pin as PWM. In this case, the practical guidance was simple: if the light turns on and off with P10 or A10 configured as LED, that is the pin to reassign as PWM. The board exposed full RGBCW-style pads, but only the C line was physically wired.
[#21199714]
What is the correct way to map LN882HKI PWM channels to GPIO pins when the SDK examples only show channel and port combinations?
Map PWM by choosing a supported FULLMUX GPIO and then binding it to an unused working PWM channel. The SDK example proved channels can be initialized with explicit port and pin pairs, such as PWM_CHA_0 on GPIO_B pin 5, PWM_CHA_1 on GPIO_B pin 6, and PWM_CHA_2 on GPIO_B pin 7. The missing piece was reliable channel selection inside OpenBeken.
[#21181670]
When changing an OpenBeken pin role from LED to PWM on LN882HKI, what configuration steps should I follow?
Use the same output pin that already controls the lamp, then change only its role. 1. Verify the light switches with a GPIO set as LED. 2. Reassign that exact GPIO to PWM in OpenBeken. 3. Reboot if needed, then test dimming from the web UI or MQTT. This thread confirmed the light pin, not the abstract color channel number, was the key factor on a C-only board.
[#21199714]
Why does the LN882HKI PWM driver sometimes require a reboot after changing PWM pins, and what are the practical implications?
It may require a reboot because the SDK PWM driver used in the demo lacked a stop function. One contributor explicitly warned that changing PWM pins is safer with a reboot, since the driver does not cleanly stop and rebind outputs. In practice, this means pin experiments can leave stale PWM state until the device restarts.
[#21195618]
How can I troubleshoot OpenBeken OTA updates on LN882HKI when the web UI says 'starting OTA' but the device does not reboot?
Try the OTA upload again with another browser before assuming the firmware is broken. In the reported case, the web UI stalled at “starting OTA,” but the user completed the same upload successfully in another browser and the device then worked. That makes the browser session a first troubleshooting target, not the PWM patch itself.
[#21199833]
Firefox vs another browser for OpenBeken OTA flashing: what can cause upload failures in the web app?
A browser-specific web upload issue can block OTA even when the binary is valid. The user saw the process stop at “starting OTA” in Firefox, then succeeded by using another browser with no hardware changes. For this OpenBeken case, the practical cause was the browser path, not the LN882HKI board or the example PWM firmware.
[#21199833]
Why does an LN882HKI light turn on at around 1 to 2 percent brightness after MQTT reconnect, and how can I prevent it?
It happens because the PWM pin is not initialized early enough after reconnect. The maintainer called it a controller-specific problem and explained that an uninitialized pin can briefly drive the light to about 1 to 2% brightness. Prevent it by using the fixed PWM implementation and ensuring the correct PWM pin is configured from boot.
[#21223691]
How do OpenBeken PWM channels on LN882H work internally, and why did the fix reduce the usable channels from 12 to 6?
LN882H exposes PWM timers with two channels each, but the stable OpenBeken fix used only the first timer channel. That design cut the theoretical count from 12 to 6 usable outputs, but it solved real failures seen with second-channel selections. The tradeoff favored working dimming and RGBCW control over higher channel count.
[#21223716]
What is the difference between using the first and second PWM timer channel on LN882H, and why does the second one fail in some RGB setups?
The first timer channel worked reliably, but the second one failed in some color assignments. One developer explained that each PWM timer has two channels, yet when the second channel was chosen, an RGB LED setup could lose one color, such as green. The later fix therefore selected only the first timer channel for each PWM path.
[#21223729]
How can I configure OpenBeken on LN882HKI for RGBCW lighting if only the C channel is physically wired on the PCB?
Treat it as a single dimmable channel unless you rewire the hardware. In the discussed board, the PCB had full RGBCW-style pins, but only C was actually connected, so channel labels did not matter for light output. The correct setup was to map the wired light pin to PWM and ignore unused RGBW roles.
[#21199714]
What changed in OpenBK7231T_App pull requests #1328 and #1331 for LN882HKI PWM support, and which builds were confirmed working by users?
PR #1328 introduced working LN882H PWM support, and PR #1331 improved multi-channel behavior by making up to 6 channels reliable. The later work was tested on a single RGB LED, confirmed by another user with 5 working LEDs, and then merged on September 20, 2024. After merge, the original poster also confirmed the fix worked on the target setup.
[#21233548]
Generated by the language model.