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

nkuehnel86 4959 45
  • #31
    Level 6  
    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:

    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
  • #32
    Moderator Smart Home
    Hello, can you paste the config here in JSON format? And, if possible, include Tuya config partition or 2MB flash backup.
  • #33
    Level 6  
    Unfortunately not.
    As i told: One plug didn't start, so i have to send back the whole 4 plugs for refund.
  • #34
    Level 6  
    Finally i got 4 new devices and flashed them with effort.
    Code: json
    Log in, to see the code

    But where do i get the config partition or 2MB flash backup?
  • #35
    Level 6  
    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...
  • #36
    Moderator Smart Home
    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?
  • #37
    Level 6  
    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
    Level 6  
    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?
  • #39
    Moderator Smart Home
    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:

    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:
    [BK7231T - WB2S] ANTELA WiFi power plug with energy monitoring (BL0937)
    Here you can see someone's command line setting:
  • #40
    Level 6  
    That's simple, thanks.
    Is it posible to put that command in the startup command line like "backlog startDriver NTP; ntp_setServer; ntp_timeZoneOfs -2; setChannel 0 -1"?
  • #41
    Moderator Smart Home
    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:
    See autoexec examples:
  • #43
    Level 1  
    Hey, has anyone measure resistors near the BL0937 component? I would like to know to have a correct voltage divider ratio. Thanks!
  • #44
    Level 6  
    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
    Moderator Smart Home
    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:
    [BK7231T - WB2S] ANTELA WiFi power plug with energy monitoring (BL0937)
    Read more on: https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/faq.md
  • #46
    Level 6  
    Just found the solution :-)
    Thanks again for help.