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]
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)
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
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):
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.
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
# 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**.
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.
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:
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
✨ 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.
TL;DR: Updating to OpenBeken firmware 1.18.15 restored correct wattage for 100 % of the users (3 out of 3) in this thread; “It works now!” [Elektroda, guns57, post #21383107]
Why it matters: Accurate power data enables reliable automation, energy tracking, and overload protection.
Why does my Action SmartPlug show 0 W or NaN after flashing OpenBeken?
BL0937 returns 0 pulses when CF is mis-wired or unconfigured; issuing PowerSet then divides by zero and stores NaN, so every later reading collapses to 0 W or NaN [Elektroda, p.kaczmarek2, post #21382918]
Which firmware version fixes the 0 W bug?
OpenBK7231N_1.18.15 and newer include calibration-range checks and correct math; all reporters regained live wattage after upgrading [Elektroda, guns57, post #21383107]
What causes NaN after changing PowerSet to a decimal like 60.8?
Old builds stored the decimal as float but re-parsed it as int, corrupting EEPROM and yielding NaN; commit 5f53e20c added proper float handling [Elektroda, p.kaczmarek2, post #21382918]
Can soldering to UART pads damage energy measurement?
How do I extract the original Tuya JSON template before flashing?
Run Tuya-convert, click “Extract config,” save the BIN, then paste the JSON into WebApp → Import → Clear OBK & Apply [Elektroda, guns57, post #21371613]
My plug reports as WB2S in lists; should I flash T or N firmware?
Edge case: what if the factory used BL0942SPI instead of BL0937?
The UART template will yield 0 W. Switch driver to BL0942SPI in WebApp, map CS, CLK, and DO pins, then recalibrate; several community units needed this tweak ["OpenBK Issue #1502"].