Skip to content

Memory problem #1899

@Renber78

Description

@Renber78

Describe the bug
After a few minutes of operation I get a memory error message and the device reboots.

Firmware:

  • Version 1.18.226
  • Device: LSC Smart Power Plug + Energy counter (3202088)
  • Chip/model: BK7231T
  • Device config:
{
  "vendor": "Tuya",
  "bDetailed": "0",
  "name": "Full Device Name Here",
  "model": "enter short model name here",
  "chip": "BK7231T",
  "board": "TODO",
  "flags": "1073742848",
  "keywords": [
    "TODO",
    "TODO",
    "TODO"
  ],
  "pins": {
    "6": "Rel;1",
    "7": "Btn;1",
    "8": "WifiLED_n;1",
    "10": "LED;1",
    "11": "BL0937SEL;0",
    "24": "BL0937CF1;0",
    "26": "BL0937CF;0"
  },
  "command": "",
  "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
  "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
} 

To Reproduce

  1. Enable the [MQTT] stat/tele flag
  2. View the logs

Logs

Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/power_apparent/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/voltage/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/current/get
s, free 93896, MQTT 1(743), bWifi 1, secondsWithNoPing -1, socks 2/38 
Info:MQTT:MQTT will reconnect soon to fix ERR_MEM errors
Info:MQTT:MQTT has pending reconnect in 4
Info:MQTT:Publishing val (328 bytes) to tele/obkD8010678/SENSOR retain=0
Error:MQTT:Publish err: ERR_MEM aka -1
Info:MQTT:Publishing val (279 bytes) to tele/obkD8010678/STATE retain=0
Error:MQTT:Publish err: ERR_MEM aka -1
Info:MAIN:Time 124657, idle 205834/s, free 93896, MQTT 1(743), bWifi 1, secondsWithNoPing -1, socks 2/38 
Info:MQTT:MQTT has pending reconnect in 3
Info:MQTT:Publishing val 1663.80 to obkD8010678/power_apparent/get retain=0
Error:MQTT:Publish err: ERR_MEM aka -1
Info:MAIN:Time 124658, idle 226331/s, free 93896, MQTT 1(743), bWifi 1, secondsWithNoPing -1, socks 2/38 
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/obkD8010678/SENSOR
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/power/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/energycounter/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/energycounter_today/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/obkD8010678/SENSOR
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/power_apparent/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/current/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/obkD8010678/SENSOR
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/voltage/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/power/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/energycounter/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkD8010678/energycounter_today/get
Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/obkD8010678/SENSOR
Info:MQTT:mqtt_connection_cb: Disconnected, reason: 256(Disconnected)
Info:MQTT:MQTT has pending reconnect in 2
Info:MAIN:Time 124659, idle 209601/s, free 93984, MQTT 0(743), bWifi 1, secondsWithNoPing -1, socks 2/38 
Info:MQTT:MQTT has pending reconnect in 1
Info:MAIN:Time 124660, idle 215413/s, free 93984, MQTT 0(743), bWifi 1, secondsWithNoPing -1, socks 2/38 
Info:GEN:dhcp=0 ip=192.168.1.208 gate=192.168.1.1 mask=255.255.255.0 mac=84:e3:42:9c:b0:ca
Info:GEN:sta: 1, softap: 0, b/g/n
Info:GEN:sta:rssi=-75,ssid=DBU,bssid=14:b7:f8:71:6f:6c,channel=11,cipher_type:MIXED
Info:MQTT:MQTT has pending reconnect in 0
Info:MAIN:Time 124661, idle 220529/s, free 93984, MQTT 0(743), bWifi 1, secondsWithNoPing -1, socks 2/38 
Info:MAIN:Time 124662, idle 236487/s, free 93984, MQTT 0(743), bWifi 1, secondsWithNoPing -1, socks 2/38 
Info:MAIN:Time 124663, idle 208085/s, free 93984, MQTT 0(743), bWifi 1, secondsWithNoPing -1, socks 2/38

Additional information

  1. I also tried with a BK7231N and it's the same problem.

  2. I saw that there was already a buffer size increase in early 2024 for this issue, which doesn't seem to be completely resolved.
    Issue 1060 link

  3. Setting certain Flags parameters causes the module to crash when sending them; I have to unplug and replug it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions