logo elektroda
logo elektroda
X
logo elektroda

Energy Total Showing nan on LSC Smart Plug 3202088 with OpenBeken 1.18.21

johanvangoethe1 249 2
ADVERTISEMENT
  • #1 21405225
    johanvangoethe1
    Level 3  
    Hello,

    I'm having an issue with the "Energy Total" value on an LSC smart plug flashed with OpenBeken. It always shows "nan" while other energy values like "Energy Today", "Energy Yesterday" etc. are working correctly.

    Device: LSC Smart Plug 3202088
    Chip: BK7231N
    OpenBeken Version: 1.18.21

    Problem

    The "Energy Total" value, as seen in both the OpenBeken web interface and through MQTT in Home Assistant, always displays "nan" (Not a Number). The other energy counters (e.g., `energycounter_today`, `energycounter_yesterday`, `energycounter_last_hour`) are showing correct values (I think). In MQTT Explorer, I can see that the topic `lsc_powerplug_1/energycounter` (and similar for other plugs) is publishing "nan". Here's a screenshot of the OpenBeken web interface, showing the "nan" value for "Energy Total":

    OpenBeken interface on LSC plug with Energy Total showing nan.

    Here is also a screenshot of MQTT Explorer showing the topics:

    Screenshot from MQTT Explorer showing data for LSC Smart Plug.

    My question is: why is "Energy Total" always showing "nan"? Is this a known issue, a configuration problem, or something that needs to be fixed in the firmware? Is there any way to get a correct cumulative energy reading?

    I have already tried restarting the device and Home Assistant, but the problem persists.

    Any help or insights would be greatly appreciated!
    AI: Could you provide details on the current configuration settings in OpenBeken that might affect the Energy Total calculation?
    This is the template used:

    {
    "vendor": "Tuya",
    "bDetailed": "0",
    "name": "Full Device Name Here",
    "model": "enter short model name here",
    "chip": "BK7231N",
    "board": "TODO",
    "flags": "1024",
    "keywords": [
    "TODO",
    "TODO",
    "TODO"
    ],
    "pins": {
    "6": "Rel;1",
    "7": "Btn;1",
    "8": "LED;1",
    "10": "WifiLED_n;0",
    "11": "BL0937SEL;0",
    "24": "BL0937CF1;0",
    "26": "BL0937CF;0"
    },
    "command": "SetupEnergyStats",
    "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
    "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }
    AI: Have you recently updated the firmware, or are there any known issues with the OpenBeken version 1.18.21 that could be causing this problem?
    Not that I am aware of
  • ADVERTISEMENT
  • #2 21405314
    divadiow
    Level 34  
    from here, and before, for context: https://www.elektroda.com/rtvforum/topic4096322.html#21380980

    also see: https://github.com/openshwprojects/OpenBK7231T_App/pull/1513 which fixes stopping it from breaking by entering non-integer, but doesn't resolve if already happened.

    the plug I deliberately broke was this a few minutes ago (and this was after energy reset, enable/disable counters and reboot + OTA to version 1.18.23):
    OpenBK_BK7231N plugin user interface displaying energy consumption data.

    then this immediately after fac reset
    Screen of electrical energy parameters with values for voltage, current, and power.

    then finally all OK again after one last "reset the total energy counter"

    Display showing data on voltage, current, and energy consumption.
  • #3 21408223
    johanvangoethe1
    Level 3  
    >>21405314 Apologies for the late response! Work has been quite busy, and I haven’t had the chance to test it yet. I’m planning to give it a try this weekend.

    Thank you again for your detailed explanation and patience. I really appreciate it!
ADVERTISEMENT