logo elektroda
logo elektroda
X
logo elektroda

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

guns57 969 25
ADVERTISEMENT
  • #1 21368963
    guns57
    Level 2  
    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  
    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 34  
    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?
  • ADVERTISEMENT
  • #5 21370876
    guns57
    Level 2  
    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.
  • #6 21370967
    divadiow
    Level 34  
    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  
    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 20  
    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
    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.
  • #12 21371604
    guns57
    Level 2  
    I did it and still not working :-(
  • ADVERTISEMENT
  • #13 21371606
    p.kaczmarek2
    Moderator Smart Home
    So what was the extracted Tuya JSON? Can you attach Tuya Config Partition binary?
    Helpful post? Buy me a coffee.
  • #15 21372124
    divadiow
    Level 34  
    >>21371451

    My device is ok. I was trying to see if I could replicate the OPs issue :)
  • #16 21373146
    guns57
    Level 2  
    Could I have damaged the chip by soldering to the UART?
  • ADVERTISEMENT
  • #17 21376611
    johanvangoethe1
    Level 3  
    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
    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  
    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  
    >>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  
    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 34  
    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  
    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
    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  
    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.
Summary generated by the language model.
ADVERTISEMENT