logo elektroda
logo elektroda
X
logo elektroda

OpenBK7231N_1.17.740: SENSOR NOT found Error on Smart Plugs After Upgrade

jkwim 303 6
ADVERTISEMENT
  • #1 21261214
    jkwim
    Level 12  
    I have upgraded two smart plugs recently to OpenBK7231N_1.17.740.

    Since then I see this error in both devices.

    Error:CMD:cmd SENSOR NOT found (args {"Time":"2024-10-13T15:45:51","ENERGY":{"Power": 101.300003,"ApparentPower": 120.878250,"ReactivePower": 65.953475,"Factor":0.838033,"Voltage":237.071319,"Current":0.509881,"ConsumptionTotal":77.828666,"Yesterday": 0.000836,"ConsumptionLastHour":0.000000}})
    Error:CMD:cmd SENSOR NOT found (args {"Time":"2024-10-13T15:45:54","ENERGY":{"Power": 101.300003,"ApparentPower": 120.001869,"ReactivePower": 64.333175,"Factor":0.844153,"Voltage":235.352523,"Current":0.509881,"ConsumptionTotal":77.912750,"Yesterday": 0.000836,"ConsumptionLastHour":0.000000}})
    Error:CMD:cmd SENSOR NOT found (args {"Time":"2024-10-13T15:45:57","ENERGY":{"Power": 101.300003,"ApparentPower": 120.878250,"ReactivePower": 65.953475,"Factor":0.838033,"Voltage":237.071319,"Current":0.509881,"ConsumptionTotal":77.996841,"Yesterday": 0.000836,"ConsumptionLastHour":0.000000}})
    


    I have following flags enabled:

    Flag 2 - [MQTT] Broadcast self state every N (def: 60) seconds (delay configurable by 'mqtt_broadcastInterval' and 'mqtt_broadcastItemsPerSec' commands)
    Flag 10 - [MQTT] Broadcast self state on MQTT connect
    Flag 21 - [MQTT] Retain power channels (Relay channels, etc)
    Flag 30 - [MQTT] Enable Tasmota TELE etc publishes (for ioBroker etc)

    What could be the reason?
  • ADVERTISEMENT
  • #2 21262265
    divadiow
    Level 34  
    -what make/model of plugs exactly?
    -what sensor is it expecting?
    -what version did you upgrade from?
    -is the sensor driver running?
  • ADVERTISEMENT
  • #3 21262298
    jkwim
    Level 12  
    Plugs are CB2S BK7231N WHDZ03 (CB2S + BL0937).
    Upgraded from 1.17.243.

    Drivers are running:
    3 drivers active (Charts,NTP,BL0937), total 37

    Currently running a custom binary with Chart Driver enabled (newer than OpenBK7231N_1.17.740). However I saw the error message as soon as I upgraded to OpenBK7231N_1.17.740.

    Device is working fine otherwise.

    It sends out the following MQTT 'tele' message also.
    tele/(topic)/SENSOR

    This looks like a spurious error message

    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/openbk7231N/SENSOR
    
    Error:CMD:cmd SENSOR NOT found (args {"Time":"2024-10-14T11:28:36","ENERGY":{"Power": 1.205952,"ApparentPower": 36.733840,"ReactivePower": 36.714038,"Factor":0.032829,"Voltage":238.299041,"Current":0.154150,"ConsumptionTotal":818.029174,"Yesterday": 423.476654,"ConsumptionLastHour":0.000000}})
  • #4 21262301
    divadiow
    Level 34  
    interesting. that's quite the version jump (Sep 9, 2023). did you happen to have an autoexec.bat file present with any config and is it still there?
  • ADVERTISEMENT
  • #5 21262358
    jkwim
    Level 12  
    >>21262301

    Yes, I have an autoexec.bat file:

    alias mode_wifi setPinRole 8 WifiLED_n
    alias mode_relay setPinRole 8 LED_n
    // at reboot, set WiFiLEd
    mode_wifi
    // then, setup handlers
    addChangeHandler WiFiState == 4 mode_relay 
    addChangeHandler WiFiState != 4 mode_wifi 
    
    startDriver BL0937
    startDriver NTP
    waitFor NTPState 1
    ntp_setServer 192.168.1.235
    ntp_timeZoneOfs +05:30
    
    startDriver charts
    // chart with max 48 samples, 2 variables and 2 vertical axes
    chart_create 48 2 2
    // set variables along with their axes
    chart_setVar 0 "Voltage" "axv"
    chart_setVar 1 "Power" "axp"
    // setup axes
    // axis_index, name, flags, label
    chart_setAxis 0 "axv" 0 "Voltage (V)"
    chart_setAxis 1 "axp" 1 "Power (W)"
    addRepeatingEvent 5 -1 chart_addNow $voltage $power


    Added after 34 [minutes]:

    Saw this article:
    https://www.emqx.com/en/blog/mqtt-over-lwip
    "mqtt_incoming_publish_cb is the callback function triggered upon receiving publish messages to handle the topic, and mqtt_incoming_data_cb for handling the data."

    Wonder whether there is an attempt to read the published message back by the code.

    
    Info:MQTT:Publishing val (256 bytes) to tele/openbk7231N/SENSOR retain=0
    
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/openbk7231N/SENSOR
    
    Error:CMD:cmd SENSOR NOT found (args {"Time":"2024-10-14T12:36:51","ENERGY":{"Power": 0.000000,"ApparentPower": 39.396476,"ReactivePower": 39.396476,"Factor":0.000000,"Voltage":237.316864,"Current":0.166007,"ConsumptionTotal":818.177917,"Yesterday": 423.476654,"ConsumptionLastHour":0.000000}})
    
  • #6 21265211
    jkwim
    Level 12  
    @p.kaczmarek2
    How can I get some help here?
    Do I need to open a query in Github?
  • ADVERTISEMENT

Topic summary

After upgrading two smart plugs to OpenBK7231N_1.17.740, the user encountered an error message indicating "CMD: cmd SENSOR NOT found." The plugs in question are CB2S BK7231N WHDZ03, upgraded from version 1.17.243. The user confirmed that the necessary drivers (Charts, NTP, BL0937) are active, and the device functions correctly otherwise. The error appears to be spurious, as the device sends MQTT telemetry messages without issues. The discussion also touches on the presence of an autoexec.bat file with specific configurations, and the user seeks further assistance, suggesting the possibility of opening a query on GitHub for more support.
Summary generated by the language model.
ADVERTISEMENT