OpenBK7231T adds a cross-platform C HTTP mini-server, web pin configurator, and MQTT integration for BK7231T-based WB2S/WB3S modules with Home Assistant control.
The design splits Windows-specific networking from reusable HTTP and pin code, so the same configurator and packet parser can run on Windows and on the BK7231T firmware.
The server listens on port 80, uses one int as a channel bitmask, and therefore supports up to 32 channels on a 32-bit platform.
MQTT callbacks propagate relay/button changes to Home Assistant and accept commands back, and a 4-relay setup uses wildcard topics like wb2s/1/get through wb2s/4/set.
The current pin configurator does not save settings to Flash yet, so configuration is still coded and compiled into the firmware.
AI summary based on the discussion. May contain errors.
I found a great deal on smart sockets with current measurement and 20A relay for $2.99 with free shipping in 11 days:
US$2.99 82%OFF | Tuya 16A 20A EU Smart Socket WiFi Smart Plug With Power Monitoring Timing Function Voice Control Alexa Google Assistant
https://a.aliexpress.com/_EuI37V5
It didn't work for me on any of the accounts (mine or family members), I had to try it on a clean browser. It's weird. After all, I recently ordered a smart socket from aliexpress 2 years ago. Bought for PLN 20, thank you for the link, it will be useful for making another video for the Elektrody channel: https://www.youtube.com/@elektrodacom
I found a great deal on smart sockets with current measurement and 20A relay for $2.99 with free shipping in 11 days: US$2.99 82%OFF | Tuya 16A 20A EU Smart Socket WiFi Smart Plug With Power Monitoring Timing Function Voice Control Alexa Google Assistant https://a.aliexpress.com/_EuI37V5
The socket has arrived. I tried to upload the soft via Cloudcutter but it turned out that there is soft v1.1.12 in the socket for which there is no exploit I uploaded the series.
I configured for HA through Discovery, but I have a question: How to change the precision of the sent sensor data? e.g. the electricity meter is sent in Wh with 6 decimal places and I would like it to send in kWh with 2 decimal places. It is possible?
I found this project by accident and got hooked up fast Got to talk to the admin and we figured I can contribute the the community. We already did one project (GN6932 driver) almost from scratch, details in this post - https://www.elektroda.com/rtvforum/topic3971252.html
I will continue to support this project by sharing as much information as possible here and on GitHub.
Here are some of the upcoming devices that will be implemented and worked on so OBK will be more powerful and documented in the best way possible.
TM1638 - 7 segmend display driver
some of the devices for future support
And some other toys to play with, like new modules, BMP280 pressure sensor, SSD1306 OLED LCD....
I have plenty of other devices to play with as well so thank you @p.kaczmarek2 for you unselfish support and looking forward to new developments.
Important update.
BK7231GUIFlashTool, this project:
https://github.com/openshwprojects/BK7231GUIFlashTool will soon get update that allows:
- to extract Tuya config from tuya device binary (so it means you get ready gpio config)
- to modify obk config via flash tool
Here's a short preview:
Good evening, this is my first post, so I hope I'm not asking in the wrong place (I searched around and this seems like the best place to ask this question).
I recently bough a WSM16-4 Tuya device (its a 4 gang/switch with a CBU), flashed OpenBeken and it works perfectly with HomeAssistant.
Amazing job on everything done so far.
My question is if its possible to access the internal BK7231N temperature sensor and send that data over MQTT.
Hi @p.kaczmarek2 One of my wall switch (N device) stopped responding after latest ota
I removed the pcb and use serial method to flash it but I keep getting crc error
Anyway to fix this?
Hi, just wondering is there an espnow equivalent for beken chips?
Started using tasmesh (based on espnow) on tasmota and I like how it still works by communicating directly to another esp broker even when wifi is down.
Добрый день всем участникам! Скажите пожалуйста есть ли возможность изменить прошивку для умной розетки с энергомонитором BL0937, которую купил. а в ней оказался контроллер rtl8710bn, добавили уже поддержку этого чипа?... Или стоит заказывать чип ESP?
I have two devices so i decided to open up one off them. I also remove the wbr2 chip and as far ass i can tell only 3v3, ground and the tx/rx are connected so i think its tuyamcu. See also this picture.
Sure, I can print the log to UDP for you. Can you provide any more details how it should work, which port, etc? UDP is not really reliable and may lose packets. Can you point me towards that "Loxone syslog" documentation?
In Tasmota i have this settings and it works perfectly for my integration with Loxone, i use virtual read and it reads state of relay and give it to Loxone.
✨ Discussion about developing and testing open firmware for BK7231T-based Tuya devices, including a cross-platform mini HTTP server, web configurator for GPIO/pin mapping, MQTT integration, and Home Assistant control. The thread covers flashing procedures with Beken Writer and a Python UART downloader, backup of original firmware, UART wiring, CEN reset method, power-supply precautions, and troubleshooting of flashing failures, erase limits, baud-rate issues, and boot problems. As development progresses, PWM dimmer support is added, MQTT startup bugs are fixed, Wi‑Fi AP/client mode behavior is improved, network scanning is implemented, and support is extended toward BK7231N and related SDKs. Participants also identify device internals such as BL0937 power metering, AMS1117 regulators, TuyaMCU/UART peripherals, and various smart plugs, switches, bulbs, and dimmers that may be compatible with the firmware. AI summary based on the discussion. May contain errors.
TL;DR: 100 % flash-success reported on BK7231 T/N modules [Elektroda, p.kaczmarek2, post #19906676]; “OpenBK7231T now boots on three chip families” [Elektroda, p.kaczmarek2, post #19883071] Use QIO image for BK7231N, UA for BK7231T; erase only 0×11000-0×1EF000. Why it matters: a single workflow now replaces vendor firmware on 60 + low-cost IoT boards.
The chip is protected. For BK7231N add --unprotect when using uartprogram, or choose BK7231N mode in BKWriter; baud 921 600 often succeeds after 115 200 fails [Elektroda, boozeman, post #19857804]
4. Relay clicks during flashing – safe fix?
A pull-up on RX1 ties the push-button to 3 V3, driving the relay. Remove jumper R33 on Nedis WIFIPO120FWT, flash, then solder it back [Elektroda, boozeman, post #19882233]
Disable FAST_CONNECT (RL_SUPPORT_FAST_CONNECT) or use latest OpenBK build ≥ f6c3c8f6 that stores config outside NET_PARAM table [Elektroda, p.kaczmarek2, post #19893493]
7. Does OTA work and how do I host updates?
Yes. Serve *.rbl over HTTP (http-here --host 0.0.0.0 8000). In WebApp → OTA tab → enter http://<IP>:8000/firmware.rbl; device backs up filesystem, flashes, restores settings [Elektroda, btsimonh, post #19880525]
Clone SDK OpenBK7231T, then OpenBK7231T_App into /apps. Build: ./build_app.sh apps/OpenBK7231T_App OpenBK7231T_App git (Linux) or Cygwin on Windows; ensure build-essential and gcc-arm-none-eabi installed [Elektroda, boozeman, post #19885620]
11. Is there a no-solder exploit?
Yes. CloudCutter abuses 2019 Tuya SDK bug to OTA-flash BK7231 lights wirelessly; code published February 2022 [khalednassar/tuya-cloudcutter]. "It works on every test bulb so far" [Tom Clement, #19890768].