logo elektroda
logo elektroda
X
logo elektroda

OpenBeken on Action SmartPlug 3202088: Power Monitoring Shows 0W After Calibration

guns57 2589 25
Best answers

Why does OpenBeken on my Action SmartPlug 3202088 show 0 W or NaN after calibration, and how can I fix the power monitoring?

Update to the latest OpenBK7231N firmware; in this thread, flashing OpenBK7231N_1.18.15 made the power monitoring work again [#21383107] The NaN/0 W problem was explained as a calibration-on-zero issue: if the plug is still reading 0 power, PowerSet/calibration divides by zero and produces NaN, so calibration cannot recover from that state [#21382918] The most likely cause is that the metering chip is not producing pulses because the BL0937/BL0942 or CF pin is wrong, disconnected, or otherwise misconfigured [#21371554][#21382918] Check that the template/pin mapping matches your exact board and that the correct meter GPIO is assigned, because the model may differ from the one in the device list [#21370967][#21376621]
Generated by the language model.
ADVERTISEMENT
  • #1 21368963
    guns57
    Level 2  
    Posts: 11
    Hi,
    I achieved to install OpenBeken on my Action SmartPlug with power monitoring (3202088). Tuya board CB2S.
    Everything works fine except the power that is always at 0 W.
    Calibration was done using a non-flashed plug and then I see "nanW" (see picture)

    Screenshot of OpenBK7231N control panel showing voltage, current, and power reading as nanW.

    Thanks
    Christophe.
    AI: Could you describe the steps you followed for calibrating the power monitoring on the SmartPlug?
    I use this topic to calibrate https://www.elektroda.com/rtvforum/topic4030107.html
    and I use a non-flashed plug.
    AI: Did you notice any error messages or logs from OpenBeken during or after the calibration process?
    No errors
  • ADVERTISEMENT
  • #3 21370269
    guns57
    Level 2  
    Posts: 11
    Hi,

    I flashed using web app (I hope it's like that ;-)) Screenshot of the OTA application interface with firmware update details for the BK7231N chipset.

    no changes :-(

    User interface of OpenBK7231N tool showing device status data.
  • #4 21370732
    divadiow
    Level 38  
    Posts: 4879
    Help: 427
    Rate: 868
    hmm. not entirely sure. stab in the dark- is this anything perhaps fixed with your PR https://github.com/openshwprojects/OpenBK7231T_App/pull/1483 @max4elektroda ?

    you could flash anyway @guns57 https://github.com/openshwprojects/OpenBK7231T_App/actions/runs/12538557165

    Added after 13 [minutes]:

    just remoted home to check my BL0937 plug. turns out I wasn't running ntp for stats anyway.

    Screenshot of a device control panel displaying voltage, current, and periodic statistics.

    updated to general release and started ntp

    Screenshot of the user interface for the Tuya plug showing energy statistics.

    Added after 7 [minutes]:

    cleared stats and still ok.

    Screenshot displaying energy statistics and voltage readings.

    i dont seem to be able to replicate. my startup command currently is backlog SetupEnergyStats 1 60 60; startdriver ntp

    Added after 1 [minutes]:

    What are your current pin assignments?
  • #5 21370876
    guns57
    Level 2  
    Posts: 11
    I tried with another plug (same model), still the same error :-(

    I removed the autoexec.bat -> not working

    I removed the startup command -> not working

    My pins settings

    Table with pin settings for an electronic device, with various assigned values.
  • ADVERTISEMENT
  • #6 21370967
    divadiow
    Level 38  
    Posts: 4879
    Help: 427
    Rate: 868
    I notice the original 3202088 in the device list has a WB2S which is BK7231T whereas you say yours is BK7231N?

    are the pin assignments definitely correct for yours?

    Added after 1 [minutes]:

    (although I don't think you'd see any measurements if wrong - all or nothing)
  • #7 21371009
    guns57
    Level 2  
    Posts: 11
    Yes mine are with CB2S and the flasher tool said that I have to use BK7231N.

    The pins config come from the flasher tool from the OBK file. I have no idea if it's right or not but all the features are working except the power.

    Screenshot showing device sensor and diagnostic information.

    I wish you a happy new year 2025 and I hope we'll find a solution ;-)
  • #8 21371451
    max4elektroda
    Level 24  
    Posts: 746
    Help: 48
    Rate: 184
    But @divadiow what kind of load is connected to your device?
    It always reports 0 W, but current is higher on your pictures

    Added after 13 [minutes]:

    Just updated my LN882H to latest release to check (I don't have metering Beken device):

    Screenshot of an app displaying electrical energy consumption data of a device.
  • #9 21371554
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    If you have only invalid power reading, then it is relatively likely that CF pin is either disconnected (you didn't solder back module correctly) or incorrectly selected (your device is using different GPIO as CF):
    Table describing the pin functions of the BL0937 chip, detailing the CF pin highlighted as having a high-frequency pulse output for active power.

    How did you flash your device?

    CB2S don't have much pins, you should be able to narrow down to few which you have left to test.

    Btw, I think we need a separate pin role PulseCounter that just counts pulses to given channel so we can check if anything happens on his CF pin currently. I don't think so. I think his CF receives no pulses at all.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #11 21371590
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    Did you do config extraction?


    Helpful post? Buy me a coffee.
  • #12 21371604
    guns57
    Level 2  
    Posts: 11
    I did it and still not working :-(
  • #13 21371606
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    So what was the extracted Tuya JSON? Can you attach Tuya Config Partition binary?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #14 21371613
    guns57
    Level 2  
    Posts: 11
    Code: JSON
    Log in, to see the code
    Attachments:
    • BK7231N_TuyaConfig_Prise_OpenBK_2.bin (72 KB) You must be logged in to download this attachment.
  • #15 21372124
    divadiow
    Level 38  
    Posts: 4879
    Help: 427
    Rate: 868
    >>21371451

    My device is ok. I was trying to see if I could replicate the OPs issue :)
  • #16 21373146
    guns57
    Level 2  
    Posts: 11
    Could I have damaged the chip by soldering to the UART?
  • #17 21376611
    johanvangoethe1
    Level 3  
    Posts: 5
    I can confirm that power monitoring does not work with this model. I measured voltage and current according to the manual and calculated power. I entered the values correctly, clicked apply and restarted the plug. I see that the live monitoring gives wrong values and go back to webtool and see that the old values are back.

    Perhaps relevant information: I also flashed the model LSC 3202088, assuming it was the Beken BK7231T, but that flashing failed (CRC mismatch). When I then flashed the plug with Beken BK7231N, everything worked.

    Hope someone can help. I bought six that I would like to flash, but if energy monitoring fails, then I have no use for it :-(
  • #18 21376621
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    It should work. Are you sure that you have correct template?

    Maybe you need to have Sel_n pin instead of Sel?

    Or you can ship one piece to me and I'll do the testing....

    PS:You may get incorrect readings if you short pins while soldering UART.
    Helpful post? Buy me a coffee.
  • #19 21376868
    johanvangoethe1
    Level 3  
    Posts: 5
    I followed this guide: https://www.elektroda.com/rtvforum/topic4038087.html.

    I did this step:

    # Step Six
    Configure the power plug by inserting the JSON obtained in Step Four. Go to **launch web app** and into **import**, paste the JSON, and click **clear OBK and apply new script**.

    Should I have used a different template?
  • #20 21376952
    guns57
    Level 2  
    Posts: 11
    >>21376621

    Maybe you need to have Sel_n pin instead of Sel?
    I don't have a "Sel" in my pins. Could you check?

    Below a picture of my solder

    Close-up of a circuit board with a port labeled WiFi and a pin header.

    Looks ok for me, no bridge.

    I only have 2 of those plugs and I use them. SO I can't send you one. Maybe johanvangoethe1 could send you one of his 6.
  • #21 21376997
    johanvangoethe1
    Level 3  
    Posts: 5
    It is definitely a software problem. I just yesterday flashed a model of the old version the LSC 3202087 with BK7231N and it works perfectly. Should it fail, with flashing I will return the others.

    edit: It worked! I flashed the plug with the json from the LSC 3202087 and the energy monitoring is perfect.
  • #22 21380980
    divadiow
    Level 38  
    Posts: 4879
    Help: 427
    Rate: 868
    I've just replicated it I think- see the end of my post here https://www.elektroda.com/rtvforum/topic4093142-120.html#21380578

    all the values were fine until I changed the power from 60 to 60.8, to match my power measurement device

    Screenshot of calibration form with power input field.

    I've now done the same on the plug above to which I was posting about days ago:

    Screenshot showing measurement data for voltage, current, power, and energy.

    what did you change your values to?

    Added after 2 [minutes]:

    changing the value back to 60 does not clear the issue
  • #23 21381532
    guns57
    Level 2  
    Posts: 11
    You’re right!

    As you, I changed the value. Before I had 0W and after I had NaN.

    Seems to be a software problem.
  • #25 21382918
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14440
    Help: 650
    Rate: 12411
    I pushed a PowerSet /calibration self test and it just works:
    https://github.com/openshwprojects/OpenBK7231...mmit/5f53e20cd5640da9e4aaa23d0cde4e8dfca4ff59
    It also works with non-integers:
    Code: C / C++
    Log in, to see the code

    I think that you are rather getting errors because of 0 power that is read when you do calibration.
    When BL0942 (or BL0937) reports 0 pulses (uncalibrated), you get dividing by zero here:
    Code: C / C++
    Log in, to see the code

    The best I can do for you is to add warning here:
    https://github.com/openshwprojects/OpenBK7231...mmit/f20b5e22592a0bc1826d83331b3a0ea097102536

    You can't get it fixed because calibration will never work with 0 value reported by the BL0942 or anything you have. So if you don't have BL0942 connected, or your BL0942 is broken and reports 0 (uncalibrated), then you get divide by 0 on each PowerSet call, so you can't "undo" it.

    The problem is not software, the problem is that you have wrong BL0937 (or BL0942 if possible? Maybe BL0942SPI is used instead of BL0942 on UART?) pins, and you get power value 0, and then you break calibration futher so you get NaN instead of 0.

    And I don't think it's integer or not issue, it's just by accident, if you did those operations in the reverse order, then integer would break... @divadiow
    Helpful post? Buy me a coffee.
  • #26 21383107
    guns57
    Level 2  
    Posts: 11
    Today i installed the latest firmware OpenBK7231N_1.18.15 and it works now!

    For me it was definitely a software problem.


    User interface with current electrical measurements for the OpenBK7231N system.


    thank you for your job!

Topic summary

✨ The discussion revolves around the installation of OpenBeken firmware on the Action SmartPlug model 3202088, which features power monitoring capabilities. The main issue reported is that the power monitoring consistently shows 0W after calibration, despite following the calibration steps outlined in a referenced forum post. Users suggest potential causes, including incorrect pin assignments, issues with the CF pin, and the need for a correct template for the device. Several users report similar problems, indicating that the issue may be software-related. A solution is eventually found with the installation of a new firmware version, which resolves the power monitoring issue. Users also discuss the importance of using the correct JSON configuration for the device.
Generated by the language model.

FAQ

TL;DR: If your Action SmartPlug 3202088 shows 0 W or nanW after calibration, the fix is usually firmware or template related, not bad math. One expert summary was: "it works now" after updating to OpenBK7231N 1.18.15. This FAQ is for CB2S/BK7231N owners who need working power monitoring after flashing OpenBeken. [#21383107]

Why it matters: Correct power monitoring is the whole point of flashing this 3202088 plug; if active power stays at 0 W, voltage and current data are not enough for real energy tracking.

Alternative Result on 3202088 in the thread Practical takeaway
Original/incorrect 3202088 setup Relay works, power stays at 0 W Basic control works, metering does not
Calibrating after 0 W reading Can turn 0 W into nanW Calibration cannot rescue a dead power input
JSON from older LSC 3202087 Energy monitoring worked perfectly Template mismatch can be the root cause
OpenBK7231N 1.18.15 Power monitoring started working Firmware update resolved the issue for at least one confirmed case

Key insight: On this plug, calibration is not the first fix. First make sure the device uses the correct CB2S/BK7231N firmware and a working pin/template setup, because PowerSet on a raw 0 W input can produce NaN instead of a valid correction.

Quick Facts

  • The affected plug model is Action/LSC 3202088, and at least two owners reproduced the same symptom: relay control worked, but active power stayed at 0 W or became nanW after calibration. [#21381532]
  • One extracted Tuya JSON for the CB2S version reported module: CB2S, ele_pin: 26, vi_pin: 24, sel_pin_pin: 11, rl1_pin: 8, led1_pin: 6, bt1_pin: 7, and netled1_pin: 10. [#21371613]
  • A reproduced failure appeared when a user changed power calibration from 60 to 60.8 W; changing it back to 60 did not immediately clear the issue. [#21380980]
  • The thread includes a direct firmware fix: after installing OpenBK7231N_1.18.15 on 2025-01-08, one owner confirmed that power monitoring started working. [#21383107]
  • Another owner said the newer 3202088 worked only after importing the JSON from the older LSC 3202087; with that template, energy monitoring became "perfect." [#21376997]

Why does OpenBeken on the Action SmartPlug 3202088 show 0 W all the time even after power calibration?

Because the plug is usually not receiving a valid power pulse signal before calibration starts. In this thread, the device could switch loads normally, but active power stayed at 0 W until the user updated to OpenBK7231N 1.18.15. Another expert explanation was that calibration on a raw 0 W input can divide by zero, so it cannot create a valid reading from missing metering data. [#21382918]

How do I properly calibrate power monitoring on an Action SmartPlug 3202088 with a CB2S/BK7231N module in OpenBeken?

Calibrate only after the plug already reports a non-zero live power value. 1. Flash the BK7231N build for the CB2S module and import the extracted Tuya JSON. 2. Confirm voltage, current, and especially power react to a real load before touching calibration. 3. Then apply VoltageSet, CurrentSet, and PowerSet using measured values such as 230 V, 0.26 A, and 60 W. If live power is 0 W first, calibration can fail. [#21382918]

What causes OpenBeken to display nanW after running PowerSet calibration on a smart plug?

nanW appears when PowerSet is applied while the raw power reading is still 0 W. The thread explains that this leads to a divide-by-zero condition inside calibration, so the plug moves from a visible 0 W fault to an invalid NaN result. Users reproduced this after calibration attempts on the 3202088, especially when the metering path was not working first. [#21382918]

Which GPIO pins should be assigned for BL0937 or BL0942 power monitoring on the LSC/Action 3202088 smart plug?

For the CB2S example in this thread, the extracted Tuya configuration mapped ele_pin 26, vi_pin 24, and sel_pin_pin 11 for metering-related functions. That JSON also used rl1_pin 8, led1_pin 6, bt1_pin 7, and netled1_pin 10. The thread also warns that the exact template may still differ on 3202088 variants, so those values are the starting point, not a universal guarantee. [#21371613]

What is the CF pin in a BL0937 or BL0942 energy metering circuit, and why does it matter when power always reads 0 W?

"CF pin" is a metering signal output that sends pulses representing active power, letting the firmware convert pulse activity into watt readings. If that signal is disconnected, wrongly mapped, or never reaches the MCU, the plug can still show voltage or current while active power remains stuck at 0 W. In the thread, the expert specifically pointed to a disconnected or wrongly selected CF pin as a likely cause. [#21371554]

What is a Tuya config extraction JSON in the OpenBeken web app, and how is it used when flashing a CB2S smart plug?

"Tuya config extraction JSON" is a device configuration file that lists the module type and pin assignments, letting OpenBeken recreate the original hardware mapping after flashing. On this CB2S plug, the extracted JSON included pins for relay, LED, button, network LED, and metering signals. The flashing guide step quoted in the thread says to paste that JSON into the web app Import section and use “clear OBK and apply new script.” [#21376868]

How can I tell whether my Action SmartPlug 3202088 uses BK7231T, BK7231N, WB2S, or CB2S before flashing OpenBeken?

Check the actual module marking and confirm it with config extraction or the flasher result before choosing firmware. In this thread, the user first saw that the 3202088 device list mentioned WB2S/BK7231T, but their real hardware was CB2S and the flasher tool said to use BK7231N. Another owner also reported BK7231T flashing failed with a CRC mismatch, while BK7231N worked. [#21376611]

BK7231T vs BK7231N for the LSC/Action 3202088 plug — which firmware and template should be used for reliable power monitoring?

Use the firmware that matches the actual module on your board, and do not trust the model number alone. In this thread, CB2S-based 3202088 plugs needed the BK7231N build, while a BK7231T attempt failed with CRC mismatch. Reliable power monitoring also depended on the right template: one owner fixed metering only after using the older LSC 3202087 JSON on the newer 3202088 hardware. [#21376997]

Why would calibration values in the OpenBeken web tool revert to the old numbers after apply and restart on this plug?

They can appear to revert because the metering path is still invalid, so the new calibration never produces a stable working state. One owner said the live readings stayed wrong, and after reopening the web tool the old values were back. In the same thread, another confirmed the deeper issue was not simple calibration entry, but that the plug first needed the right firmware/template combination for valid power data. [#21376611]

What happens if I enter a non-integer power calibration value like 60.8 in OpenBeken, and why can that lead to NaN readings?

A non-integer like 60.8 is not inherently the problem. One developer reproduced the failure after changing power from 60 to 60.8 W, but another expert later showed calibration self-tests also worked with non-integers such as 60.5. The real failure happens when you apply PowerSet while raw measured power is 0 W, because that broken input can turn the result into NaN regardless of integer or decimal format. [#21382918]

How do I import the correct JSON template into the OpenBeken web app for the Action SmartPlug 3202088 after flashing?

Use the JSON extracted from the plug, then import it directly in the OpenBeken web app. 1. Run config extraction during or after flashing. 2. Open the web app Import section. 3. Paste the JSON and click “clear OBK and apply new script.” One owner who followed that process on 3202088 still had bad metering, which later pointed to template or firmware mismatch rather than an import mistake. [#21376868]

What should I check first if voltage and current appear but active power stays at 0 W on an OpenBeken smart plug?

Check the metering pin mapping first, especially the CF-related power pulse path. In this thread, the expert said that if only power is invalid while other readings appear, the CF pin is relatively likely to be disconnected, wrongly selected, or assigned to the wrong GPIO. That makes power stay at 0 W even though the rest of the plug still works and calibration commands seem available. [#21371554]

How can soldering to the UART pads damage or affect the metering chip or pin signals on a Tuya CB2S smart plug?

Bad UART soldering can short nearby pins and disturb metering signals, even if the module still flashes and the relay still works. The thread explicitly warns that incorrect readings can happen if pins are shorted while soldering UART. That matters on compact CB2S boards because only a few pins remain free, so a small bridge or damaged trace can break the energy-monitoring path without killing the whole plug. [#21376621]

Why did using the JSON from the older LSC 3202087 make energy monitoring work on the newer 3202088 plug?

Because the 3202088 unit in the thread likely shared a working pin layout with the older 3202087 template, while the original 3202088 mapping did not match the actual hardware. The owner said the 3202088 had failed energy monitoring before, then “It worked!” after flashing with the 3202087 JSON. That is strong evidence of a template mismatch, not a dead metering chip. [#21376997]

Which OpenBeken firmware version fixed the 0 W or NaN power monitoring problem on the Action SmartPlug 3202088?

OpenBK7231N 1.18.15 was the version that fixed it in the thread’s confirmed success report. On 2025-01-08, the owner installed OpenBK7231N_1.18.15 and immediately reported that power monitoring worked again on the Action SmartPlug 3202088. That is the clearest version-specific fix mentioned in the discussion. [#21383107]
Generated by the language model.
ADVERTISEMENT