logo elektroda
logo elektroda
X
logo elektroda

Multi-platform IoT firmware supporting up to 32 platforms - OBK 2025 summary

p.kaczmarek2 2697 65

TL;DR

  • OpenBeken/OBK is an open-source Wi‑Fi firmware for building-automation devices like relays, LED controllers, thermostats, energy meters, and sensors.
  • It flashes over UART, then uses auto-detected GPIO templates, Berry scripting, Home Assistant integration, REST hosting, and a simulator to speed setup and testing.
  • The project now supports 32 platforms and lists 817 devices, with separate binaries for families such as BK7231, ESP32 variants, Realtek, Winner Micro, and more.
  • Online builds, automatic OTA downloads from GitHub, and GitHub-run tests let developers compile, deploy, and flag bad commits without local toolchains.
  • Some platform features still vary: certain OTA paths are broken, WPA3 must be manually enabled on some ESP8266 builds, and several PWM or sleep features are partial.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #61 21877416
    insmod
    Level 31  
    >>21877411
    I originally meant about if ret == 0, but i've double-checked and saw that it's freed in client thread.
  • ADVERTISEMENT
  • #62 21877422
    p.kaczmarek2
    Moderator Smart Home
    Are os_malloc and malloc different on any platform, and if so, what's the difference?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #63 21877426
    insmod
    Level 31  
    >>21877422
    In some it may be separate, malloc is default newlib allocator, os_malloc - freertos one.
  • ADVERTISEMENT
  • #64 21878054
    max4elektroda
    Level 24  
    I finally managed to implement some feature to allow logging to LFS: PR #2076.

    Wasn't a easy as I thought on the first look, because writing to lfs is slooow and would crash with an IRQ watchdog if writing more than a few lines.

    So now it will use an own thread for flushing the message buffer to lfs.

    It allows for "startup logging" with command

    logStartup2lfs [seconds- default 10]  

    Will logg all further starts for the givven number of seconds to lfs (as long as there's free space in lfs).
    So if done, disable with
    logStartup2lfs 0 


    During operation you can use
    log2lfs [seconds - default 10]

    to write messages to LFS for this number of seconds.
    Might be stopped earlier by calling
    log2lfs 0



    Screenshot of a web “Filesystem” page editing /messageLog_2.txt, with file list and log text on the right.
    Screenshot of LittleFS Filesystem page listing files and editing /startupLog_1.txt log

    Feel free to test or propose changes - I only checked with W800 and Linux simulator for now.
  • ADVERTISEMENT
  • #65 21878107
    DeDaMrAz
    Level 22  
    @max4elektroda

    I remember there was a concern about flash wear so I would suggest you try this on modules with external flash chips just in case.
  • #66 21878160
    max4elektroda
    Level 24  
    I would see this as a debugging feature only, not as a regular one.
    Idea came back after issue 2064 where the user couldn't see the logs easily and he assumed a startup error when in WiFi client mode. With this feature he could have setup logging to lfs, insert his WiFi credentials and after a start in regular mode switching to safe mode again see the logs.
    For all other cases we have TCP logging which can be easily saved, so we could agree it only makes sense for startup, not during operation.
📢 Listen (AI):

FAQ

TL;DR: OBK supports 32 platforms and lists 817 devices; “firmware is fully open source.” Flash via UART, test in a PC simulator, and integrate with Home Assistant. [Elektroda, p.kaczmarek2, post #21794531]

Quick Facts

What is OpenBeken (OBK) and who should use it?

OBK is an open‑source firmware for Wi‑Fi IoT devices like relays, LEDs, thermostats, and meters. It targets users who want local control, added sensors, scripting, HA integration, and freedom from vendor clouds. The author states it is “fully open source, free.” [Elektroda, p.kaczmarek2, post #21794531]

Which chips and platforms are supported right now?

As of December 31, 2025, OBK ships binaries for about 32 platforms, including Beken BK7231/T/N/38/52, Espressif ESP8266/ESP32 families, Realtek Ameba series, Bouffalo BL602, Winner Micro W600/W800, XRadio XR806/XR809, Lightning Semi LN882H, ESWIN ECR6600, and others. Check the platforms matrix and linked docs. [Elektroda, p.kaczmarek2, post #21794531]

How do I flash OBK via UART?

You upload the firmware over UART using a USB‑to‑UART adapter and the BK7231 GUI Flash Tool. After flashing, join Wi‑Fi and configure GPIOs. The flasher can auto‑detect GPIO on many devices, reducing guesswork versus Tasmota. 1. Connect UART pins and power. 2. Use the GUI tool to write the binary. 3. Join Wi‑Fi and set roles. [Elektroda, p.kaczmarek2, post #21794531]

Can I run devices 100% locally without any cloud?

Yes. A core goal is freedom from vendor clouds and surveillance. After flashing, devices work fully offline, with local control, REST, MQTT, and HA connectivity. This avoids outages, surprise subscriptions, and vendor lock‑in. The author lists cloud independence as a key motivation. [Elektroda, p.kaczmarek2, post #21794531]

Does OBK integrate with Home Assistant and MQTT?

Yes. OBK connects to Home Assistant without limits and supports MQTT. The simulator even pairs with Home Assistant, letting you validate virtual devices before flashing hardware. This streamlines testing scenes, sensors, and lighting. [Elektroda, p.kaczmarek2, post #21794531]

How do online builds and automatic OTA updates work?

You can compile firmware entirely online via GitHub CI, so no local toolchain is needed. An OBK OTA tool can fetch artifacts on each build and update target devices automatically, including from pull requests and commits. “Build online, deploy OTA” describes the workflow. [Elektroda, p.kaczmarek2, post #21794531]

Is there a PC simulator for designing and testing devices?

Yes. The OBK Simulator for Windows/Linux implements a HAL with a visual schematic editor. You can test advanced circuits, Berry scripts, and HA pairing on your computer. Automatic tests also run on GitHub; failing commits get flagged. [Elektroda, p.kaczmarek2, post #21794531]

How many ready device templates or articles exist?

The community device list shows 817 entries dated 2025‑12‑31. You can filter by platform and by template versus full article. This accelerates onboarding and reduces wiring mistakes. [Elektroda, p.kaczmarek2, post #21794531]

What scripting language and automations does OBK support?

OBK supports Berry scripts across target hardware and in the Simulator. You can add logic, timers, and behaviors without recompiling. The driver list includes complex automations like PixelAnim, DMX, shutters, IR, and data logging helpers. [Elektroda, p.kaczmarek2, post #21794531]

Can OBK host custom web pages and a REST API on the device?

Yes. OBK integrates LFS file storage and a REST interface. You can build HTML/JS control panels, with optional GZIP compression to fit more content. This enables fast local dashboards without external servers. [Elektroda, p.kaczmarek2, post #21794531]

Any known OTA or platform edge cases I should watch out for?

Yes. Examples: XR809 OTA attempts crash the device; ESP8266 uses software PWM and may flicker; some bootloaders block OTA on certain Tuya BK7252 units; web‑based OTA can be corrupted on some chips, so use HTTP OTA instead. Review notes before updating. [Elektroda, p.kaczmarek2, post #21794531]

Does OBK support WPA3 and low‑power modes?

WPA3 support exists on many platforms, sometimes requiring specific ALT builds or sdkconfig flags. Deep sleep varies by MCU; some support only timed sleep and lack GPIO wake. Always check the platform table footnotes when planning battery builds. [Elektroda, p.kaczmarek2, post #21794531]

What drivers and sensors are already supported?

The list includes TuyaMCU (regular and battery), DMX, WS2812 animations, IR/RF, energy chips (RN8209, BL0942, HLW8112), environmental sensors (SHT3X, BMP280, DS18B20), LED drivers (SM2135, BP5758D), displays (MAX72XX, TM1637), shutters, and many more. “Drivers keep expanding.” [Elektroda, p.kaczmarek2, post #21794531]

What do terms like TuyaMCU, OTA, and Berry mean in OBK context?

In OBK, TuyaMCU denotes the driver family for Tuya‑based devices, including battery variants. OTA refers to updating firmware from built artifacts without disassembly. Berry is the embedded scripting language used by OBK and its Simulator. [Elektroda, p.kaczmarek2, post #21794531]

How do I contribute, request drivers, or support OBK?

Share device findings, propose drivers, or test platforms using the GitHub and forum links. You can also support development via the provided PayPal link. The author invites sensor and platform suggestions and thanks major contributors. [Elektroda, p.kaczmarek2, post #21794531]
Generated by the language model.
ADVERTISEMENT