Exception after edit uploader, now Heap memory has degraded reset loop

Hello,
Looking for help on how to solve this issue:

I changed the influxdb2 uploader:

  • it was running fine uploading 10 inputs,
  • added 10 integrations (all inputs to Wh),
  • added the 10 integrations as measurements to uploader (total 20) (possible problem: one of the new measurements had the same name as a previous one, it appeared to overwrite the previous one).
  • looks like new measurements were uploaded twice (two timestamps, but all Wh values are 0)
  • then iotawatt became unresponsive.

I had to pull the SD card to get at the logs. Looks like an exception occurred after adding the new measurements:

SD initialized.
Real Time Clock not running.
Reset reason: External System
Trace:  239:4[73], 201:158[8], 35:150[254], 141:79[78], 72:255[92], 127:245[38], 171:34[70], 146:196, 202:55[37], 2:2[115], 207:79[227], 222:221[75], 10:223[91], 144:228[87], 86:62[252], 65:231[187], 49:162[110], 58:250[245], 229:39[76], 238:80[193], 14:184[99], 215:111[203], 222:18[162], 102:244[153], 80:243[1], 46:67[143], 154:76[82], 50:182[181], 19:224[209], 220:224[237], 9:233[24], 11:72[191]
ESP8266 ID: 15918360, RTC PCF8523 (68)
IoTaWatt 5.0, Firmware version 02_07_05
SPIFFS mounted.
Local time zone: +0:00
device name: IotaWatt
Connecting with WiFiManager.
HTTP server started
WiFi connected. SSID=<<SSID>>, IP=192.168.50.137, channel=10, RSSI -72db
MDNS responder started for hostname IotaWatt
LLMNR responder started for hostname IotaWatt
timeSync: service started.
statService: started.
Updater: service started. Auto-update class is MINOR
Updater: Invalid response from server. HTTPcode: -4
7/09/22 01:23:55 timeSync: RTC initalized to NTP time
7/09/22 01:23:58 Updater: Auto-update is current for class MINOR.
7/09/22 01:23:58 Updater: update tables from 0.0.4 to 0.0.5
7/09/22 01:23:58 dataLog: service started.
7/09/22 01:23:58 dataLog: New current log created.
7/09/22 01:25:04 historyLog: service started.
7/09/22 01:25:04 historyLog: first entry 07/09/22 01:24:00
7/09/22 01:45:52 influxDB_v2: Starting, interval:10, url:http://192.168.50.2:8086
7/09/22 01:45:52 influxDB_v2: Start posting 07/09/22 01:24:10
7/09/22 02:20:46 influxDB_v2: stopped, Last post 07/09/22 02:20:30
7/09/22 02:25:09 influxDB_v2: Start posting 07/09/22 01:24:10
7/09/22 23:24:45 DHW_wh: Started
7/09/22 23:24:45 DHW_wh: New log starting 07/09/22 01:24:00
7/09/22 23:25:13 dryer_wh: Started
7/09/22 23:25:13 dryer_wh: New log starting 07/09/22 01:24:00
7/09/22 23:25:33 fridge_wh: Started
7/09/22 23:25:33 fridge_wh: New log starting 07/09/22 01:24:00
7/09/22 23:26:22 stove_wh: Started
7/09/22 23:26:22 stove_wh: New log starting 07/09/22 01:24:00
7/09/22 23:26:53 heat_livingrm_wh: Started
7/09/22 23:26:53 heat_livingrm_wh: New log starting 07/09/22 01:24:00
7/09/22 23:27:20 heat_LFL2_wh: Started
7/09/22 23:27:20 heat_LFL2_wh: New log starting 07/09/22 01:24:00
7/09/22 23:27:46 heat_RFRBL2_wh: Started
7/09/22 23:27:46 heat_RFRBL2_wh: New log starting 07/09/22 01:24:00
7/09/22 23:28:04 heat_garage_wh: Started
7/09/22 23:28:04 heat_garage_wh: New log starting 07/09/22 01:24:00
7/09/22 23:28:28 heat_basement_wh: Started
7/09/22 23:28:28 heat_basement_wh: New log starting 07/09/22 01:24:00

** Restart **

SD initialized.
7/10/22 02:29:01z Real Time Clock is running. Unix time 1657420141 
7/10/22 02:29:01z Reset reason: Exception
7/10/22 02:29:01z Trace:  1:3, 1:6[1], 1:6[2], 1:6[2], 1:6[2], 1:6[2], 1:6[2], 1:6[2], 1:6[2], 1:6[2], 1:6[3], 1:5[33], 1:6[4], 33:0, 33:1, 33:2[1], 33:1, 1:6[6], 1:1[13], 1:2[14], 9:0[14], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3
7/10/22 02:29:01z ESP8266 ID: 15918360, RTC PCF8523 (68)
7/10/22 02:29:01z IoTaWatt 5.0, Firmware version 02_07_05
7/10/22 02:29:01z SPIFFS mounted.
7/09/22 23:29:01 Local time zone: -4:00, using DST/BST when in effect.
7/09/22 23:29:01 device name: IotaWatt
7/09/22 23:29:01 HTTP server started
7/09/22 23:29:01 influxDB_v2: Starting, interval:10, url:http://192.168.50.2:8086
7/09/22 23:29:01 timeSync: service started.
7/09/22 23:29:01 statService: started.
7/09/22 23:29:01 dataLog: service started.
7/09/22 23:29:01 dataLog: Last log entry 07/09/22 23:28:55
7/09/22 23:29:06 historyLog: service started.
7/09/22 23:29:06 historyLog: Last log entry 07/09/22 23:28:00
7/09/22 23:29:06 DHW_wh: Started
7/09/22 23:29:06 DHW_wh: Last log entry 07/09/22 05:33:20
7/09/22 23:29:06 dryer_wh: Started
7/09/22 23:29:06 dryer_wh: Last log entry 07/09/22 03:54:40
7/09/22 23:29:06 fridge_wh: Started
7/09/22 23:29:06 fridge_wh: Last log entry 07/09/22 03:25:20
7/09/22 23:29:06 heat_basement_wh: Started
7/09/22 23:29:06 heat_basement_wh: Last log entry 07/09/22 01:34:40
7/09/22 23:29:06 heat_garage_wh: Started
7/09/22 23:29:06 heat_garage_wh: Last log entry 07/09/22 01:42:40
7/09/22 23:29:06 heat_LFL2_wh: Started
7/09/22 23:29:06 heat_LFL2_wh: Last log entry 07/09/22 02:02:40
7/09/22 23:29:06 heat_livingrm_wh: Started
7/09/22 23:29:06 heat_livingrm_wh: Last log entry 07/09/22 02:17:20
7/09/22 23:29:06 heat_RFRBL2_wh: Started
7/09/22 23:29:06 heat_RFRBL2_wh: Last log entry 07/09/22 01:49:20
7/09/22 23:29:06 stove_wh: Started
7/09/22 23:29:06 stove_wh: Last log entry 07/09/22 02:40:00
7/09/22 23:33:12 WiFi connected. SSID=<<SSID>>, IP=169.254.25.229, channel=10, RSSI -69db
7/09/22 23:33:12 MDNS responder started for hostname IotaWatt
7/09/22 23:33:12 LLMNR responder started for hostname IotaWatt
7/09/22 23:33:12 Updater: service started. Auto-update class is MINOR
7/09/22 23:34:31 influxDB_v2: Resume posting 07/09/22 23:28:50
7/09/22 23:34:38 Heap memory has degraded below safe minimum, restarting.

full log:
iotamsgs.txt (606.5 KB)

config.txt:
iotawatt_config.txt (5.4 KB)

EDIT:
The iotawatt had been running for about 22hr since initial setup. The resets don’t fix the heap issue. LED status: green then a really jittery dim red that can’t be counted.

Take a look at the integrator documentation. They are only needed for tracking bidirectional energy flow, like energy import and export from/to the grid when there is PV generation.

There is significant overhead in maintaining each integrator. You should remove those unneeded integrators and simply upload the kW for those measurements.

I need to edit the config manually: for a valid config, do I remove the “integrators” key, or leave it there with an empty array?

Also, I’d like to reset/delete all existing data/history: while I have the sdcard out, is there a file I can delete to do this safely?

Thanks!

Either way.

/iotawatt/iotalog.log
/iotawatt/histlog.log