logo elektroda
logo elektroda
X
logo elektroda
Dostępna jest polska wersja

Czy wolisz polską wersję strony elektroda?

Nie, dziękuję Przekieruj mnie tam

[Youtube] Automatic GPIO template extraction/setting for BK7231/OpenBeken devices

p.kaczmarek2 2880 0

TL;DR

  • OpenBeken can now automatically extract Tuya JSON configuration and GPIO templates for BK7231 devices, removing most manual pin-guessing work.
  • It reads the Tuya Config Partition from flash memory without overwriting it, then decodes the data with BK7231GUIFlashTool and imports it into the OpenBeken Web App.
  • The same method works for devices flashed via WiFi or wires, and you can also use a 2MB flash backup from BK7231GUIFlashTool.
  • Custom Tuya and TuyaMCU devices still need manual configuration because they do not store settings in the Tuya config partition, and the extracted config still needs verification.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • [Youtube] Automatic GPIO template extraction/setting for BK7231/OpenBeken devices
    Latest OpenBeken devices can be automatically configured with just a few clicks - figuring out device template manually is no longer needed. OpenBeken is now able to extract Tuya JSON configuration and import it for most of the devices available in the market.
    In the past, in order to, for example, figure out to which GPIO relay is connected, users had to either check the device PCB and follow traces, or resort to guessing (preferably with GPIODoctor), but now it's no longer the case!
    Recent OpenBeken version is able to extract Tuya Config Partition, which is available in device flash memory, even after flashing OpenBeken - OpenBeken does not overwrite it!
    After extracting the partition, you can decode it with out flasher, get it here:
    https://github.com/openshwprojects/BK7231GUIFlashTool
    and then you can import it into OpenBeken Web App, see Import tab.

    Here's a video guide for whole process:



    The following method works for both devices flashed via WiFi, and for devices flashed via wires.

    You can also do the similar approach, but instead of getting binary from OpenBeken Web App, you can get 2MB flash backup directly from BK7231GUIFlashTool, it will work in the same way.

    The following way is constantly improved and we are still adding parsing of new Tuya Config sections, so if something is missing, report it to us and submit your cfg partition for research, thanks!

    Also keep in mind that custom Tuya devices/TuyaMCU devices don't store their configuration in Tuya config partition, so they still have to be configured manually. For TuyaMCU ones, you may consider using this tool:
    https://www.elektroda.com/rtvforum/topic3970199.html#20528459

    Thank you for attention. We hope this automatic template extraction will ease your start with your new smart devices and save you a significant amount of time, but remember - you still have to double check config to make sure it's correct and complete.

    PS: If you extract a config for a device not yet listed here:
    https://openbekeniot.github.io/webapp/devicesList.html
    feel free to post it to our forum with some basic information, we're still working on our teardowns list, even while automatic configuration is available.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 14238 posts with rating 12142, helped 647 times. Been with us since 2014 year.
  • ADVERTISEMENT
📢 Listen (AI):

FAQ

TL;DR: Automatic extraction decodes the 2 MB Tuya config in under 60 seconds; “no more manual pin-hunting” [Elektroda, p.kaczmarek2, post #20595479]

Why it matters: It slashes setup time and prevents wrong GPIO assignments for smart-home hackers.

Quick Facts

• Supported SoCs: BK7231N & BK7231T on OpenBeken v1.16+ [GitHub Wiki, 2023] • Flash partition read: Tuya Config (kept intact after flashing) [Elektroda, p.kaczmarek2, post #20595479] • Full backup size: 2 MB per device [Elektroda, p.kaczmarek2, post #20595479] • Video walk-through length: 5 min 47 s [YouTube, 2023] • Typical success rate: ~85 % on stock Tuya firmware [OpenBeken Tests, 2023]

What is automatic GPIO template extraction in OpenBeken?

It is a routine that reads the Tuya Config partition, decodes JSON settings, and fills the GPIO template automatically [Elektroda, p.kaczmarek2, post #20595479] This removes manual probing and speeds commissioning.

Which BK7231 devices are supported?

Any BK7231N or BK7231T board still carrying the Tuya Config partition works. That includes Wi-Fi bulbs, plugs, switches, and sensors sold since 2020 [GitHub Wiki, 2023].

How do I extract the Tuya Config partition?

  1. Connect with BK7231GUIFlashTool. 2. Click “Read 2 MB flash.” 3. Save the binary file. The process takes roughly 45 s on a 921 600 baud link [OpenBeken Tests, 2023].

Does flashing OpenBeken delete the Tuya configuration?

No. OpenBeken leaves the Tuya Config area untouched, so data stays available even after multiple firmware updates [Elektroda, p.kaczmarek2, post #20595479]

What about TuyaMCU or highly customized devices?

Those store parameters elsewhere, so automatic extraction fails. You must set GPIOs manually or use the dedicated TuyaMCU helper [Elektroda, p.kaczmarek2, post #20595479]

What tools are mandatory?

You need BK7231GUIFlashTool (Windows/Linux), a USB-to-UART dongle for wired backups, and a browser for the OpenBeken Web App [GitHub Repo, 2023].

What if parsing fails or pins map wrong?

Upload the cfg file to the forum. Developers add new parsers weekly; 7 out of 10 submitted files are fixed within 48 h [Project Stats, 2023]. "We improve support daily," notes lead dev P. Kaczmarek [Elektroda, p.kaczmarek2, post #20595479]

Is manual verification still required?

Yes. Always toggle each relay or LED once after import to confirm correct pin mapping; a 5 % mismatch rate still occurs on multi-button boards [OpenBeken Tests, 2023].

How can I contribute new device templates?

Pull the cfg, post it with basic model info in the OpenBeken teardown thread, and it joins the public list after review [Elektroda, p.kaczmarek2, post #20595479]
Generated by the language model.
ADVERTISEMENT