logo elektroda
logo elektroda
X
logo elektroda

[BK7231N on board] Flashing Anko Sunset Lamp (I004055) RGB LED lamp controller

lyonzy  10 3090 Cool? (+3)
📢 Listen (AI voice):

TL;DR

  • The Anko Sunset Lamp (I004055) RGB LED lamp controller uses a BK7231N and runs from USB-powered 5V.
  • Most pins are exposed and labelled on the underside, with P20 for the button and P6/P7/P8 for RGB PWM outputs.
  • Flashing used LTChipTool over TX1 and RX1, with CEN tied to GND when starting.
  • Reading the chip and uploading the binary eventually worked, though LTChipTool sometimes froze at 0% or low progress.
AI summary based on the discussion. May contain errors.
Anko WiFi RGB Sunset Lamp with packaging and product features.
This is a lamp sold by Kmart in Australia. Seems to be made by Mirabella but exclusively for the Kmart Anko brand. It went a bit nuts on TikTok late last year.
User manual:
User manual for the ANKO Smart Wi-Fi Sunset Lamp. Mirabella Genio app setup screen for pairing Sunset Lamp with Wi-Fi network. Screenshots of the pairing process for the Kmart Anko lamp with the Mirabella Genio app. Wi-Fi RGB lamp connection instruction.

Good news is (1) it's a 5v device (powered by USB) and (2) it's running a BK7231N inside. Doesn't seem to be a SoC/ESP type chip, just the BK7231N directly on a circuit board. Even more good news is that most of the pins are exposed and labelled on the underside of the board.

Photos:
View of an RGB LED lamp circuit board with attached wires. Printed circuit board with wires and electronics on a white background. Electronic circuit board with visible connections and a button.
Pin roles:
- P20 - button
- P6 - PWM (red)
- P7 - PWM (green)
- P8 - PWM (blue)

I was able to flash using LTChipTool (remembering to connect CEN to GND when it starts) using TX1 and RX1. Was a bit hit and miss, sometimes it would freeze at 0 or low %, but I eventually read the data from the chip and uploaded binary.

The LED bulbs are all exposed as a single RGB PWM output from the controller (R=6 G=7 B=8). The button on the controller is pin 20, inverted, with pullup active.

OBK Config:
Code: YAML
Log in, to see the code

ESPHome config (snippet, add your own Wifi etc):

binary_sensor:
  - platform: gpio
    name: Button
    pin:
      number: P20
      mode:
        input: true
        pullup: true
      inverted: true


output:
- platform: ledc
  id: output_red
  pin: P6
- platform: ledc
  id: output_green
  pin: P7
- platform: ledc
  id: output_blue
  pin: P8

light:
- platform: rgb
  id: light_rgb
  name: Light
  red: output_red
  green: output_green
  blue: output_blue

About Author
lyonzy wrote 3 posts with rating 4 . Been with us since 2023 year.

Comments

sillychip 21 Jul 2024 08:00

Thanks for posting this! I've got two separate Anko sunset lights flashed now and they're working perfectly! Out of the two I flashed, one was an older revision with a WB3S inside (BK7231T) instead... [Read more]

piotrszulc1 21 Jul 2024 13:28

Hi, could you post the firmware dump here or by creating an issue on tuyacloudcutter repo - then it may be possible to flash this lamp via OTA in the future. [Read more]

sillychip 21 Jul 2024 13:38

Sure thing, is it fine if I hex edit out my WiFi credentials from the dump before uploading? I opened it up in HxD and confirmed I could see my credentials in there. [Read more]

piotrszulc1 21 Jul 2024 16:03

Not sure about this, as it might change the checksums and then the tools for creating cloudcutter profile might fail. But that's only my guess, go ahead and post it without the credentials and we'll see... [Read more]

sillychip 21 Jul 2024 16:15

Here's the file, hoping just replacing the SSID and password chars with bogus data should be fine. If it doesn't work let me know and I'll try get a fresh copy by flashing the original firmware back to... [Read more]

divadiow 21 Jul 2024 17:38

flashed fine for me to a WB3S. V:BK7231S_1.0.5 CPSR:000000D3 R0:1F6FFE41 R1:2223F356 R2:F9ABF3BE R3:7B3DEA2C R4:7F5E3AB8 R13:EFAE59FF R14(LR):07E73BEF ST:14968466 J 0x10000 prvHeapInit-start... [Read more]

sillychip 22 Jul 2024 04:18

Nice, thanks for checking that out! Although I just realised something: that light was behaving very oddly last night after I uploaded the dump, doing stuff like flickering and turning off. Could that... [Read more]

divadiow 22 Jul 2024 08:38

negative, this would not be possible. A coincidence. [Read more]

sillychip 22 Jul 2024 08:55

Thanks for confirming, I thought as much, but I just wanted to make sure. Edit: found the reason it was misbehaving, it was only because the USB extension cable it was plugged into wasn't making the... [Read more]

ingoratsdorf 19 Jul 2025 00:04

Mine worked via OTA with cloudcutter: Selected Device Slug: tuya-generic-ih001-led-controller-single-color Selected Profile: oem-bk7231n-strip-ty-2.0.0-sdk-2.3.1-40.00 Selected Firmware: OpenBeken-v1.17.262_bk7231n.ug.bin I... [Read more]

FAQ

TL;DR: This FAQ helps modders flash a 5V Anko Sunset Lamp I004055 with OpenBeken or ESPHome. "Most pins are exposed and labelled," making the BK7231N version unusually easy to map, flash, and recover when LTChipTool stalls or CEN reset timing gets tricky. [#20711166]

Why it matters: It turns a cheap Tuya RGB lamp into a locally controlled light with known pin maps for two hardware revisions.

Revision Main chip/module Button pin RGB pins Flashing note
Bare board BK7231N P20 R=P6, G=P7, B=P8 Ground CEN when flashing starts
Older revision WB3S (BK7231T) P1 R=P9, G=P24, B=P26 External USB power may prevent COM dropouts

Key insight: The lamp exists in at least two internal revisions, and the correct pin map depends on whether you have the bare BK7231N board or the older WB3S BK7231T module. Using the wrong map makes button and RGB control fail even if flashing succeeds.

Quick Facts

  • The lamp controller is a 5V USB-powered RGB device, and one confirmed revision uses a BK7231N directly on the PCB instead of an ESP-style daughterboard. [#20711166]
  • Confirmed BK7231N mapping: P20 button, P6 red PWM, P7 green PWM, P8 blue PWM; the button is inverted and uses an active pull-up. [#20711166]
  • Confirmed older revision mapping on WB3S / BK7231T: P1 button, P9 red, P24 green, P26 blue. [#21162167]
  • One successful OTA case used Tuya Cloudcutter with firmware OpenBeken-v1.17.262_bk7231n.ug.bin and profile oem-bk7231n-strip-ty-2.0.0-sdk-2.3.1-40.00. [#21610703]

How do you flash the Anko Sunset Lamp I004055 with OpenBeken using LTChipTool on a BK7231N board?

You can flash it over serial with LTChipTool using TX1 and RX1 on the BK7231N board. 1. Connect TX1, RX1, 5V USB power, and ground. 2. Start LTChipTool, then pull CEN to GND so the chip resets into the flash sequence. 3. Read the original dump first, then upload the OpenBeken binary. One report said flashing was hit-and-miss and could freeze at 0% or a low percentage before succeeding. [#20711166]

What are the pin mappings for the BK7231N version of the Anko Sunset Lamp I004055, including the button and RGB PWM outputs?

The BK7231N version uses P20 for the button and P6, P7, and P8 for RGB PWM. Specifically, P6 is red, P7 is green, and P8 is blue. The button on P20 is inverted and uses an enabled pull-up, so logic reads pressed as active-low. That mapping was confirmed both from board labels and a working OpenBeken template. [#20711166]

Which pins are used on the WB3S (BK7231T) revision of the Anko Sunset Lamp for the button, red, green, and blue channels?

The WB3S revision uses P1 for the button, P9 for red, P24 for green, and P26 for blue. This older board revision keeps the same lamp function but changes the internal mapping from the bare BK7231N version. If you reuse the BK7231N pinout on this module, the button and colors will not align correctly. [#21162167]

Why does grounding CEN sometimes make LTChipTool freeze at 0% or cause the COM port to disappear when flashing these Tuya lamps?

Grounding CEN resets the chip, so the USB-serial link can briefly drop and make LTChipTool stall at 0% or lose the COM port. On the WB3S revision, one user fixed this by powering the module externally over USB while still using the flasher connections at 3.3V logic. That kept the port alive during reset. [#21162167]

What is CEN on a BK7231N or WB3S module, and how is it used during flashing?

"CEN" is a chip-enable reset pin that controls whether the BK7231N or WB3S module stays running, and pulling it low forces a hardware reset used to enter a reliable flashing sequence. In this lamp, users grounded CEN at flash start to reset the board so LTChipTool could communicate. [#20711166]

What is Tuya Cloudcutter, and how does it help with OTA flashing on devices like the Anko Sunset Lamp?

"Tuya Cloudcutter" is an OTA flashing tool that targets compatible Tuya devices, identifies a working profile, and installs replacement firmware without opening the device for serial wiring. In this thread, it was used successfully on the Anko Sunset Lamp, which means at least one revision is flashable over the air instead of only through TX/RX pads. [#21610703]

How do you configure this Anko RGB sunset lamp in ESPHome with a GPIO button and three PWM outputs?

Use one GPIO binary sensor for the button and three PWM outputs for RGB. Set P20 as an input with pull-up and inverted logic, then assign P6, P7, and P8 as red, green, and blue LEDC outputs. Finally, combine those three outputs into one RGB light entity. That exact structure was posted as a working ESPHome snippet for the BK7231N lamp. [#20711166]

What is the difference between the bare BK7231N board and the WB3S BK7231T module in the Anko Sunset Lamp revisions?

The main difference is the hardware revision and its pin mapping. One revision uses a bare BK7231N on the PCB with exposed labelled pads, while an older revision uses a WB3S module built around BK7231T. Both control the same RGB lamp, but their button and PWM pins differ, so templates are not interchangeable. [#21162167]

How does OpenBeken compare with ESPHome for controlling the Anko Sunset Lamp I004055 after flashing?

Both worked in this thread, but they serve different setups. OpenBeken had a complete device template with vendor, model, and pin assignments for the I004055, while ESPHome was shown as a YAML snippet that exposed one button and one RGB light using P20, P6, P7, and P8. Choose OpenBeken for a ready template or ESPHome if you want YAML-based integration. [#20711166]

What steps help identify the correct RGB and button pins on an unknown Tuya lamp board from traces, vias, and silkscreen labels?

Follow the traces and match the vias to the board markings. 1. Find the switch trace to identify the button pin. 2. Trace the RGB LED outputs and line them up with silkscreen labels such as R, G, and B. 3. Verify the map by testing PWM control after flashing. On the WB3S revision, this method revealed P1, P9, P24, and P26. [#21162167]

Why might an Anko sunset lamp start flickering or turning off after flashing, even when the firmware setup looks correct?

A bad power connection can cause flicker and shutoffs even when the firmware is fine. In one case, the lamp misbehaved after flashing because a USB extension cable made poor contact and delivered insufficient voltage. Replacing or reseating the cable resolved the problem without changing firmware. [#21163389]

How should you handle a firmware dump that contains Wi-Fi credentials before uploading it for Tuya Cloudcutter profile creation?

Remove or overwrite the credentials before sharing, but expect a possible trade-off. One user confirmed their SSID and password were visible in the dump and replaced those characters with bogus data before uploading. Another poster warned that hex editing could alter checksums and break profile-generation tools, so a clean fresh dump may still be needed. [#21162695]

Which Tuya Cloudcutter device slug and profile worked for OTA flashing the Anko Sunset Lamp, and why might the official profile differ by firmware version?

A working OTA combination used device slug tuya-generic-ih001-led-controller-single-color with profile oem-bk7231n-strip-ty-2.0.0-sdk-2.3.1-40.00 and firmware OpenBeken-v1.17.262_bk7231n.ug.bin. The official profile may differ because the lamp appears in multiple firmware revisions, and the poster noted that the newer public profile referenced version 1.1.6 instead. [#21610703]

What does 'cloudcuttable' mean in the context of Tuya-based BK7231N or BK7231T light controllers?

It means the device can be flashed over the air with Tuya Cloudcutter instead of only through wired serial access. In this thread, that label was used after a successful test on a WB3S-based lamp dump and later reinforced by a confirmed OTA flash report. In practical terms, it marks the lamp as OTA-modifiable on at least one compatible firmware path. [#21162844]

What troubleshooting steps are worth trying if USB-powered 5V RGB lamps behave erratically after modding, especially with extension cables or low voltage?

Start with power integrity checks before blaming firmware. 1. Remove USB extension cables and plug the 5V lamp directly into a stable source. 2. Reseat every connector and verify the board gets clean power during color changes. 3. If serial flashing is unstable, add external USB power while using 3.3V logic on TX/RX. One faulty extension cable caused flicker and shutoffs until replaced. [#21163389]
AI summary based on the discussion. May contain errors.
%}