FAQ
TL;DR: The LightningSemi LN882H Wi-Fi relay module draws just 5 µA in deep-sleep mode [LightningSemi DS], and “it’s already on our list” [Elektroda, p.kaczmarek2, post #20943170] OpenLN882H firmware plus larger MQTT buffers restores Home-Assistant discovery. Why it matters: You can fully local-control these cheap switches without cloud lock-in.
Quick Facts
• MCU: LightningSemi LN882H (32-bit RISC-V, 160 MHz) [LightningSemi DS]
• Observed SDKs: v1.8 (Sep 2023) & v2.1_rc1 (Nov 2023) [Elektroda, protectivedad, post #20839581]
• Default UART console: 115 200 bps, 8-N-1 [Elektroda, divadiow, post #20974623]
• Cloud endpoint: TCP 8899; local debug: TCP 5555 [Elektroda, darknesspaladin, post #21315355]
• AliExpress price: US $4–6 per unit [Product Listing, 2024]
1. What microcontroller powers the Cozylife/Elivco 16 A mini smart switch?
It uses the LightningSemi LN882H single-chip Wi-Fi/BLE MCU, silk-marked LN882H or LN-02 on the PCB [Elektroda, Lesnoi, post #20815114]
2. Can I flash custom firmware on the LN882H module?
Yes. OpenLN882H (a fork of OpenBeken) and full SDK/toolchain are on GitHub [Elektroda, p.kaczmarek2, post #20815901] Several users have flashed v1.17.478 and newer without desoldering the chip [Elektroda, silvestro_gatto, post #20974595]
3. Where do I get the flashing tool?
4. Which pins and baud rate should I use for serial access?
Connect RX, TX, GND and leave BOOT un-grounded for normal logs at 115 200 bps [Elektroda, divadiow, post #20974623] Ground BOOT to enter the boot-loader before flashing.
5. How do I back up the factory firmware?
- Solder a wire to BOOT and hold it low. 2. Run LN882Loader –r 0x0 0x400000 to dump 4 MB. 3. Save the .bin safely. Users confirmed this works via USB-UART dongle [Elektroda, divadiow, post #20911009]
6. MQTT discovery doesn’t work; any fix?
Update to commit 2907315: it raises MQTT_OUTPUT_RINGBUF_SIZE and related buffers, restoring 100 % discovery in Home Assistant [Elektroda, p.kaczmarek2, post #20953098]
7. Is ESPHome supported on LN882H?
No. ESPHome targets ESP32/8266/BK72xx; flashing it on LN882H shows no output and fails [Elektroda, vit5041, post #21349628] Use OpenLN882H instead [Elektroda, p.kaczmarek2, post #21350030]
8. Where can I find the GPIO template for OpenBeken/OpenLN882H?
The Elivco Cozylife 16A Mini Switch (RMW002) template is in the online devices list. Import it and only the pin map/flags are stored on the device [Elektroda, p.kaczmarek2, post #20975378]
9. What network traffic does the stock firmware generate?
It opens outbound TCP 8899 to 139.162.135.94 and listens on TCP 5555. No HTTP headers appear; the protocol is proprietary [Elektroda, darknesspaladin, post #21315355]
10. Can I toggle the relay without flashing new firmware?
Yes, but you must reverse-engineer the TCP 8899 or 5555 protocol. Currently no public command set exists. Using a MITM proxy captured no HTTP calls [Elektroda, alexios_13, post #21243429]
11. What’s the power consumption of the LN882H?
Typical deep-sleep current is 5 µA; active TX peaks at 260 mA [LightningSemi DS].
12. What happens if flashing fails or power is lost?
The bootloader remains intact; the device stays in UART download mode on next power-up, but you lose relay control until a valid image is written — an edge case confirmed when a user accidentally dumped OpenBeken over stock firmware [Elektroda, Ogurezzz, post #21524782]