logo elektroda
logo elektroda
X
logo elektroda

[BK7231N] 12V Smart Switch Teardown

OxygenDesk 1488 15
ADVERTISEMENT
  • #1 21043447
    OxygenDesk
    Level 2  

    I got this 12V barrel smart switch from AliExpress. Mine arrived in a yellow envelope without any packaging or branding.

    It's easy to open. Just need to pry using the small flathead next to the wire strain relief. It's held by 4 clips.

    It's a BK7231N. Use TP5 for RX and TP4 for TX. I had to use an external power supply while flashing. Ended up using a 12V plugged into the barrel connector.

    The device doesn't seem to have the button configured or OpenBeken didn't pick it up but it was connected to P14. The boards has space for 3 more light channels but I didn't check if they were actually connected because I didn't need them.

    Texts on PCB: DLX-RGBCW BK7231N-B 5-24V

    Device configuration, as extracted from Tuya: 
    - LED Cool (Channel 4) on P8
    Device seems to be using CB3S module, which is using BK7231N.
    And the Tuya section starts, as usual, at 2023424
    


    Code: JSON
    Log in, to see the code


    [BK7231N] 12V Smart Switch Teardown [BK7231N] 12V Smart Switch Teardown [BK7231N] 12V Smart Switch Teardown [BK7231N] 12V Smart Switch Teardown [BK7231N] 12V Smart Switch Teardown
  • ADVERTISEMENT
  • #2 21043514
    p.kaczmarek2
    Moderator Smart Home
    That's interesting, I would need to check why the button was not detected. Can you also attach Tuya config binary so I can investigate?


    Helpful post? Buy me a coffee.
  • #4 21044166
    divadiow
    Level 34  
    that's an interesting one. if you get the 72kb config file too, as seen in the video, is the gpio extraction the same? please post that file.
  • #5 21044231
    p.kaczmarek2
    Moderator Smart Home
    The 2MB backup file already contains that 72KB file so I am certain it would be the same.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #6 21044270
    divadiow
    Level 34  
    Yes, sure. It's just the key in what is extractable seems to be something to do with an LSC Moodlight. I just didn't believe it and wanted another extraction.
  • ADVERTISEMENT
  • #7 21044337
    OxygenDesk
    Level 2  

    Sorry, I've flashed ESPHome on it since. The 2 MB binary backup is the only copy I have of the original firmware.
  • #8 21044539
    divadiow
    Level 34  
    Oh!

    Interesting. All works ok?
  • #9 21045133
    OxygenDesk
    Level 2  
    Yep, the button works and the light dims.
  • #10 21163777
    kovachpeter
    Level 2  
    >>21045133 Hi! I have the same device and would like to reflash with esphome. Could you share the yaml file?
  • #12 21165205
    divadiow
    Level 34  
    >>21165202

    don't forget to take a backup @OxygenDesk :)
  • #13 21165550
    OxygenDesk
    Level 2  
    >>21165205
    I think you mean @kovachpeter
    I shared my backup and already reflashed 🙂
  • ADVERTISEMENT
  • #15 21166020
    kovachpeter
    Level 2  
    Thanks for the files! I wont forget the backup :)
  • #16 21177108
    p.kaczmarek2
    Moderator Smart Home
    BK7231GUIFlashTool, which is the best option for flashing this device, makes sure that you have a backup by giving an automatic "Do backup and flash new" procedure. The "no backup" option is not recommended:
    Screenshot of BK7231 Easy UART Flasher tool with Do backup and flash new option highlighted.
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the teardown and flashing of a 12V smart switch utilizing the BK7231N chip, purchased from AliExpress. The device arrived unbranded and was easily opened by prying it apart. Users shared insights on flashing the device, with one individual successfully using an external power supply and ESPHome firmware. The original firmware configuration was discussed, including GPIO extraction and the presence of additional light channels on the PCB. Participants exchanged files, including Tuya configuration binaries and YAML files for ESPHome, emphasizing the importance of backing up the original firmware before flashing. The BK7231GUIFlashTool was recommended for flashing, which includes an automatic backup feature.
Summary generated by the language model.
ADVERTISEMENT