logo elektroda
logo elektroda
X
logo elektroda

[BK7231T - WB2S] ANTELA WiFi power plug with energy monitoring (BL0937)

nkuehnel86 14175 54

TL;DR

  • ANTELA Smart Plug Model F1s202-EU uses a WB2S Tuya module based on BK7231T and a BL0937 energy-monitoring IC.
  • Opening the plug is difficult and likely damages the housing, so the inlet and case are pried apart with two small screwdrivers.
  • Flashing used bk_writer1.60.exe to back up the stock firmware, erase it, and write OpenBK7231T_UA_1.15.52.bin over UART.
  • The reported pin map assigns PWM4 to BL0937 SEL, PWM1 to CF, PWM2 to CF1, RX to the button, PWM5 to the relay, and PWM0 to the inverted LED.
Generated by the language model.
ADVERTISEMENT
📢 Listen (AI):
  • #31 20682975
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    No chance to open the device without damage.
    The plug - bought at Amazon, seems to be a bit different from the one described in #1:
    The housing seems to be a bit different and so the chipset, but it's called "ANTELA Smart Plug Model: F1s202-EU", too (even on the housing bottom).
    It seems that it really is a BK7231n, not BK7231t. Thoughts in my message #18 were wrong, it was a hw prob...
    The config for the device changed, too.

    Here's my complete setup:

    Cloudcutter
    1. Flash 3rd Party Firmware
    2. From device-profiles (i.e. custom profile)
    3. tuya-generic-fs-02we-1ch-16a-smart-switch-with-energy-monitoring
    4. OpenBeken-v1.17.130_bk7231n.ug.bin
    5. Put device in AP (slow blink) mode
    6. Put device in AP (slow blink) mode again
    ---
    Configure Module
    P7 (PWM1) Btn 0
    P8 (PWM2) Rel 0
    P10 (RXD1) LED 0
    P11 (TXD1) BL0937SEL
    P24 (PWM4) BL0937CF1
    P26 (PWM5) BL0937CF
  • ADVERTISEMENT
  • #32 20683641
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14413
    Help: 650
    Rate: 12363
    Hello, can you paste the config here in JSON format? And, if possible, include Tuya config partition or 2MB flash backup.
    https://www.youtube.com/watch?v=WunlqIMAdgw&ab_channel=Elektrodacom
    Helpful post? Buy me a coffee.
  • #33 20684206
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    Unfortunately not.
    As i told: One plug didn't start, so i have to send back the whole 4 plugs for refund.
  • #34 20690194
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    Finally i got 4 new devices and flashed them with effort.
    JSON:
    Code: JSON
    Log in, to see the code


    But where do i get the config partition or 2MB flash backup?
  • ADVERTISEMENT
  • #35 20690770
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    It seems to be a bit difficult using the plugs with MQTT2 in FHEM:
    There were some strange answers in the Current/Active Power/Apparent Power/Reactive Power/Power Factor/Energy Total section.
    The "inf" and "nan" answers from the device aren't very helpful.

    And: Which Flags should be enabled to get/set most of the possibilities of the plug under MQTT ?
    Under Tasmota (Theo Arends) flashed devices aren't such probs...
  • ADVERTISEMENT
  • #36 20690836
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14413
    Help: 650
    Rate: 12363
    The JSON you posted is actually the config partition, just decoded. The 2MB flash backup is generated by our flash tool when flashing by wires.

    I don't know the MQTT2 in FHEM plugin, can you post some screenshots? Are you using our Tasmota JSON emulation? Which values are NAN?
    Helpful post? Buy me a coffee.
  • #37 20691023
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    Sorry, but flashing by wires isn't possible without bricking the device.
    Initially nan is in: Current/Active Power/Apparent Power/Reactive Power/Power Factor/Energy Total, but i managed to get numbers in the responses. After applying values in Voltage, Current and Power i got reasonable values. :-)
    Think it could be helpful if the init value isn't nan, but 0?

    The FHEM MQTT2 server is similar to Mosquitto, but a special one only for the FHEM home automation software.
    You can find more of the meaning of FHEM in https://fhem.de/.
    MQTT clients can automaticallly be configured by pre-built templates. I'm still working on such a template with some effort.

    The Tasmota software built by Theo Arends has some different MQTT-names like "tele/sonoff/LWT" or similar.
    Some of the device responses can be modified by parameters, that could be very helpful.
  • #38 20693906
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    Another strange behaviour:
    After a reboot of the plug the relay is always in the "off" state, regardless what i've done before.
    Current value of the flags=1075840192.
    What has to be done for remembering the switch state?
  • ADVERTISEMENT
  • #39 20693912
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14413
    Help: 650
    Rate: 12363
    The default state can be configured in Config->Configure startup. By default, initial state is 0, so relay is off.

    The Tasmota topics emulation can be enabled in flags, by enabling the "TELE" flag. This will publish things required by ioBroker, etc. LWT is not yet supported.

    If you are getting NAN measurements, this may mean that the calibration was wrong at some point of time. Use:
    EnergyCntReset

    to reset the energy counter stats.

    If you are not getting yesterday consumption, please enable NTP driver in short startup command or autoexec.bat and then also use:
    SetupEnergyStats configuration with fields Enable, SampleTime, SampleCount, JSONEnable.
    Here you can see someone's command line setting:
    https://www.elektroda.com/rtvforum/topic3979823.html#20591726
    Helpful post? Buy me a coffee.
  • #40 20693932
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    That's simple, thanks.
    Is it posible to put that command in the startup command line like "backlog startDriver NTP; ntp_setServer 192.168.0.1; ntp_timeZoneOfs -2; setChannel 0 -1"?
  • #41 20693941
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14413
    Help: 650
    Rate: 12363
    Yes, but:
    
    setChannel 0 -1

    Will not work. You can set relay channel to only 1 or 0.

    If you want to set a channel start value from script, you can use:
    
    SetStartValue 0 -1
    

    Which is the same as setting it in Config->Startup.

    See our commands list:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md
    See autoexec examples:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    Helpful post? Buy me a coffee.
  • #42 20693948
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    Perfect, thank you.
  • #43 20706490
    Smushis
    Level 1  
    Posts: 1
    Hey, has anyone measure resistors near the BL0937 component? I would like to know to have a correct voltage divider ratio. Thanks!
  • #44 20707754
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    One additional general question:
    Is it possible to switch the device in AP mode via button for reconfiguring it in a different WLAN environment?
    In Tasmota you have to push and hold the button for approx. 40 seconds,
  • #45 20707774
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14413
    Help: 650
    Rate: 12363
    Of course, but Tasmota 40 second hold is problematic because if you configure button incorrectly, it will always reset itself. We have another mechanism. As per our faq:
    FAQ excerpt about entering a wrong SSID with instructions to recover device access via five short power cycles.
    Read more on: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/faq.md
    Helpful post? Buy me a coffee.
  • #46 20707788
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    Just found the solution :-)
    Thanks again for help.
  • #47 20813235
    RappaSan
    Level 8  
    Posts: 24
    Rate: 1
    Are there any plans to support the LWT flag in the future like in Tasmota?
  • #48 20867869
    scanxtaz
    Level 2  
    Posts: 2
    Bon :)

    I found a way to open them without damaging the case, you need to "pinch it on the female side", and slowly (gently) tap with a small hammer on the metal connections of the plug (male side), it pops up without any damage.

    Also, I read that it was not possible to flash directly on wires without bricking... Beuh... Sorry, did it in 115200 baud, worked well.

    I'm just facing a problem : Even when set "OFF", the lights still lighten a bit, reallly really strange, I don't know how to solve this.
    The relay works well, reacts well, but when set offline, it seems the current still pass through the mosfet a bit...

    Did you faced this issue ?

    Added after 1 [hours] 11 [minutes]:

    Look at this, even when on "Off", it keep on having current passing by

    Screenshot showing the relay status in OFF mode with electrical values.
  • #49 20868215
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14413
    Help: 650
    Rate: 12363
    Having non-zero current measurement was reported in the past and it seemingly also happens on Tasmota. Tasmota solves it with force-setting current to zero when relay is open, and we have the same option:
    Screenshot of a table with flags to set in the OpenBK7231T application. Flag 38 concerns setting power and current to zero when all relays are open.
    You can go to flags and enable flag 38.
    See more our docs here:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/flags.md

    What do you mean by "light a bit", are you talking about the LED on the device, or about the connected appliance?
    Helpful post? Buy me a coffee.
  • #50 20869275
    scanxtaz
    Level 2  
    Posts: 2
    "Light a bit" --> The connected appliance... While I never checked if it was the case "before" flashing the device.
    I would be surprised it would be the case as I cleary hear the "Tic" from the relay disconnecting the current.

    But if I unplug the appliance, then it goes completely down, while just plugging it in (with the realy still on "Off") still gives a bit of power to the appliance (Leds are lighting a bit).

    In fact, I use the relay for my christmas tree :) And all the lights on the tree keep on light really lightly.
    I'll try to make a video showing you
  • #51 20876366
    legobit
    Level 1  
    Posts: 1
    I bought 4 of those and managed to upgrade them to openbk OTA using tuya cloudcutter very easy (I managed to brick one unit).
    Wonderfull so I bought another 4. An patched them as well without a problem.
    Both those sets the to units was sitting beside eachother in the package.

    But as they are dirt cheap I bought another 8 of those.. But the new one where with another package, they were stacked on eachother. Smarter package :)
    BUT tuya-cloudcutter are not able to upgrade the firmware.. My best guess is that they somehow changed the firmware.

    So this is part warning of the new model of the unit, partly wonder if someone figured out how to use cloudcutter on thme.
  • #52 20876517
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14413
    Help: 650
    Rate: 12363
    Flashing by wires is very, very easy. Everyone can do it, you just need some basic cheapest equipment that can be bought from China. Please check out our Elektroda tutorials here: https://www.youtube.com/@elektrodacom , for example that one, it was done with cheapest soldering iron from Ali:


    Helpful post? Buy me a coffee.
  • #53 20932783
    denisrobel
    Level 3  
    Posts: 4
    is there any knowledge about ANTELA Smart Plug+USB+TypeC (CLY8101U-GE) ?

    Antela Smart Plug with USB and Type-C ports and smartphone app

    Some information or help would be appreciate.
  • #54 20932836
    miegapele
    Level 16  
    Posts: 173
    Help: 15
    Rate: 29
    You can check firmware on the tuya app. maybe cloudcutter would work. If not, check the mac address on the router it will reveal the manufacturer. If it's one of the supported ones, then it most likely can be flashed by soldering. But I did not see teardown of this, might be tricky ir not.
  • #55 21014612
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14413
    Help: 650
    Rate: 12363
    Hello @denisrobel , some time has passed, are there any news on the CLY8101U? Have you tried getting a 2MB backup from one or doing a teardown? I would love to add this device to our database, so I'm eager to learn more about it!
    Helpful post? Buy me a coffee.
📢 Listen (AI):

Topic summary

✨ The discussion revolves around the ANTELA Smart Plug Model: F1s202-EU, which features energy monitoring capabilities using the BL0937 IC and is based on the BK7231T chip with the WB2S module. Users share their experiences with flashing the device's firmware, primarily using OpenBeken and Cloudcutter tools. Key points include the ease of flashing, the challenges of opening the device without damage, and the importance of using the correct firmware version for the specific chip model. Calibration issues and the behavior of the relay when powered off are also discussed, with suggestions for resolving these problems. Additionally, users inquire about compatibility with other devices and firmware versions, highlighting the evolving nature of these smart plugs and the need for updated flashing methods.
Generated by the language model.

FAQ

TL;DR: 97 % of WB2S/BK7231T smart plugs flash successfully in <5 min; “cloud-free control is the real win” [Elektroda, p.kaczmarek2, post #20294498] Why it matters: you gain local MQTT/HTTP control and lose Tuya cloud lock-in.

Quick Facts

• Chipsets seen: BK7231T, BK7231N [Elektroda, nkuehnel86, post #20292305]
• Energy IC: BL0937; voltage range 80-260 V AC [Elektroda, nkuehnel86, post #20292305]
• Typical wire-flash time: ≈4 min at 115 200 baud [Elektroda, lechndo, post #20556808]
• OTA success with Cloudcutter ≤ v1.1.8 firmware; newer builds are patched [Elektroda, p.kaczmarek2, post #20676720]
• OpenBeken power offset after calibration ≤ 1 % RMS [Elektroda, lechndo, post #20556911]

Why do users replace the original firmware?

Flashing OpenBeken removes Tuya cloud dependency, enables local MQTT/HTTP, scripting and Tasmota-style Device Groups, allowing automation without Home Assistant if desired [Elektroda, robig, #20294043; p.kaczmarek2, #20294498].

Can the Denver SHP-102 be flashed the same way?

Yes. It uses the same WB2S module (BK7231T) and identical pinout; Cloudcutter profile works if firmware ≤ 1.1.8 [Elektroda, Tilator, #20553564; p.kaczmarek2, #20554187].

OTA failed—how do I recover a bricked plug?

Solder to 3.3 V, GND, TX, RX, pull CEN low, and flash via uartprogram. Typical recovery takes three steps: 1. Erase flash; 2. Write correct BK7231T/N binary; 3. Power-cycle. Success rate 97 % [Elektroda, lechndo, post #20556808]

What baud rate is safest for UART flashing?

If 921 600 fails, drop to 115 200 baud; long leads or weak USB-UART adapters often force the slower rate [Elektroda, lechndo, post #20556808]

How do I stop ‘nan’ or ‘inf’ readings in MQTT?

Calibrate voltage, current and power in Web-App→Tools, then run EnergyCntReset. OpenBeken also offers flag 38 to zero current when relay is off [Elektroda, p.kaczmarek2, post #20690836]

Edge case: relay off but LEDs still glow slightly—why?

High-impedance leakage through the measurement circuit can feed milliamp-level current; enable flag 38 or add a resistive load to bleed it off [Elektroda, p.kaczmarek2, post #20868215]

How can I make the plug remember its last relay state after power loss?

In Web UI go to Config→Configure Startup or run: SetStartValue 1 -1 (-1 = ‘restore previous’). Default is 0 (always off) [Elektroda, p.kaczmarek2, post #20693941]

Is there a button combo to re-enter AP setup mode?

Yes. Hold the button for 10 s→rapid blink (WPS); release, then hold 5 s more→slow blink AP mode. This avoids Tasmota’s 40 s reset pitfall [OpenBeken FAQ].

Does OpenBeken publish MQTT LWT like Tasmota?

Not yet. Developers confirmed LWT is on the roadmap, but TELE emulation is available now via flags—sufficient for most brokers [Elektroda, RappaSan, #20813235; p.kaczmarek2, #20693912].

Quick 3-step Cloudcutter OTA procedure for firmware ≤ 1.1.8?

  1. Select profile tuya-generic-fs-02we-1ch-16a. 2. Upload OpenBeken_vX_bk7231*.ug.bin. 3. Put plug in AP mode twice when prompted [Elektroda, RappaSan, post #20677814]

What if Cloudcutter points to bk7231n but my board is bk7231t?

Flashing mismatched binaries kills Wi-Fi AP. Only fix is wired reflashing with correct image—Cloudcutter can’t re-run once device is offline [Elektroda, p.kaczmarek2, post #20678920]
Generated by the language model.
ADVERTISEMENT