logo elektroda
logo elektroda
X
logo elektroda

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

lyonzy 2133 9
ADVERTISEMENT
  • 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
    

    Cool? Ranking DIY
    About Author
    lyonzy
    Level 2  
    Offline 
    lyonzy wrote 3 posts with rating 3. Been with us since 2023 year.
  • ADVERTISEMENT
  • #2 21162167
    sillychip
    Level 3  
    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 of the bare BK7231N. The pinout and pin mapping is different so below are some details to help anyone with this variant.

    Front of Board (pins marked):
    Image of a board with a WB3S module with marked pins CEN, TX, RX, VCC, and GND.
    Back of Board:
    Back of a circuit board with wires soldered to labeled pins.

    Solder wires to TX, RX, VCC (set to 3.3V), and GND as normal and connect the chip to the flasher.
    When flashing, ground the CEN pin to reset the module. If this results in the flasher disconnecting and the COM port disappearing from the list, plug the USB power for the module in and try again. Pulling CEN low was causing issues without external power for me.

    Mapping the pins was fortunately easy as the traces for the switch and the RGB LED are the only things under the board, and the vias at the wire end line up with the silkscreen RGB labels. Through this, I've determined the following pin roles and numbers:
    P1 - Button (1)
    P9 - PWM (1) - Red
    P24 - PWM (2) - Green
    P26 - PWM (3) - Blue

    Hopefully this helps someone out, let me know if there's something I missed and I'll update this post!
  • ADVERTISEMENT
  • #3 21162486
    piotrszulc1
    Level 9  
    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.
  • ADVERTISEMENT
  • #4 21162504
    sillychip
    Level 3  
    >>21162486
    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.
  • #5 21162695
    piotrszulc1
    Level 9  
    >>21162504
    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 :)
  • ADVERTISEMENT
  • #7 21162844
    divadiow
    Level 34  
    flashed fine for me to a WB3S.

    Code: Text
    Log in, to see the code


    Device update screen showing no updates available, main module and MCU version: V1.1.6. App interface for light control with color wheel App screen showing successfully added device named Sunset Light (Left).

    cloudcuttable
  • #8 21163283
    sillychip
    Level 3  
    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 have been you with the firmware? I don't see how because it's not running the original Tuya firmware anymore, but it is an odd coincidence.
  • #9 21163379
    divadiow
    Level 34  
    negative, this would not be possible. A coincidence.
  • #10 21163389
    sillychip
    Level 3  
    >>21163379
    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 best contact, causing insufficient voltage. Resolved it now.

Topic summary

The discussion revolves around flashing the Anko Sunset Lamp (I004055), an RGB LED lamp controller sold by Kmart Australia, which features a BK7231N chip. Users share their experiences with flashing the device, noting that one variant contained a BK7231T chip instead. Detailed instructions for pin mapping and flashing procedures are provided, including the necessity of grounding the CEN pin during the process. Users also discuss the potential for OTA flashing in the future and share firmware dumps while ensuring to remove sensitive WiFi credentials. Issues with the lamp's behavior, such as flickering, were attributed to insufficient voltage due to a faulty USB extension cable.
Summary generated by the language model.
ADVERTISEMENT