Reboots due to heap memory - resolved

How do I go about troubleshooting this error?
2/06/23 10:06:28 Heap memory has degraded below safe minimum, restarting.

I read through a few other forum threads and wifi issues seemed to be a common cause, but I doubt that’s the case here. I’ve got a pretty solid connection in a reasonably radio quiet basement.
2/06/23 10:05:55 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -54db

Reboots seem to be about every 1.5 minutes or so. I’ve got it connected to Home Assistant through the Iotawatt integration.

Please post the message log.

Message log output:

2/07/23 11:15:37 Laundry: Started
2/07/23 11:15:38 Laundry: Last log entry 07/23/22 13:10:40
2/07/23 11:15:40 Remainder: Started
2/07/23 11:15:41 Remainder: Last log entry 07/23/22 12:36:00
2/07/23 11:15:42 Server: Started
2/07/23 11:15:43 Server: Last log entry 07/23/22 12:41:20
2/07/23 11:15:44 Total: Started
2/07/23 11:15:45 Total: Last log entry 07/23/22 12:49:20
2/07/23 11:15:47 Heap memory has degraded below safe minimum, restarting.

** Restart **

SD initialized.
2/07/23 18:15:49z Real Time Clock is running. Unix time 1675793749 
2/07/23 18:15:49z Reset reason: Software/System restart
2/07/23 18:15:50z Trace:  18:3, 18:2, 18:3, 18:2, 18:3, 18:2, 18:3, 18:4, 18:5, 1:6[6], 1:3, 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[2], 1:6[2], 1:6[2], 1:6[2], 1:6[3], 1:5[21], 1:6[4], 21:0, 21:1, 21:10, 21:10
2/07/23 18:15:52z ESP8266 ID: 565280, RTC M41T81 (68)
2/07/23 18:15:53z IoTaWatt 5.0, Firmware version 02_07_05
2/07/23 18:15:53z SPIFFS mounted.
2/07/23 11:15:54 Local time zone: -7:00, using DST/BST when in effect.
2/07/23 11:15:55 device name: IotaWatt
2/07/23 11:15:55 HTTP server started
2/07/23 11:15:56 timeSync: service started.
2/07/23 11:15:56 statService: started.
2/07/23 11:15:57 dataLog: service started.
2/07/23 11:15:59 dataLog: Last log entry 02/07/23 11:15:45
2/07/23 11:16:01 Updater: service started. Auto-update class is MINOR
2/07/23 11:16:02 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -53db
2/07/23 11:16:03 MDNS responder started for hostname IotaWatt
2/07/23 11:16:03 LLMNR responder started for hostname IotaWatt
2/07/23 11:16:04 historyLog: service started.
2/07/23 11:16:06 historyLog: Last log entry 02/07/23 11:15:00
2/07/23 11:16:07 Bathroom_Heater: Started
2/07/23 11:16:08 Bathroom_Heater: Last log entry 07/23/22 13:09:20
2/07/23 11:16:09 Updater: Auto-update is current for class MINOR.
2/07/23 11:16:11 Darcy_Office: Started
2/07/23 11:16:12 Darcy_Office: Last log entry 07/23/22 13:20:00
2/07/23 11:16:13 Entertainment: Started
2/07/23 11:16:14 Entertainment: Last log entry 07/23/22 13:26:40
2/07/23 11:16:15 Extra_Fridge: Started
2/07/23 11:16:16 Extra_Fridge: Last log entry 07/23/22 13:30:40
2/07/23 11:16:17 Fridge: Started
2/07/23 11:16:18 Fridge: Last log entry 07/23/22 13:13:20
2/07/23 11:16:19 Furnace_and_Fans: Started
2/07/23 11:16:20 Furnace_and_Fans: Last log entry 07/23/22 13:17:20
2/07/23 11:16:21 Jeff_Office: Started
2/07/23 11:16:22 Jeff_Office: Last log entry 07/23/22 12:56:00
2/07/23 11:16:23 Kitchen: Started
2/07/23 11:16:24 Kitchen: Last log entry 07/23/22 13:01:20
2/07/23 11:16:24 Laundry: Started
2/07/23 11:16:25 Laundry: Last log entry 07/23/22 13:10:40
2/07/23 11:16:26 Remainder: Started
2/07/23 11:16:27 Remainder: Last log entry 07/23/22 12:36:00
2/07/23 11:16:28 Server: Started
2/07/23 11:16:29 Server: Last log entry 07/23/22 12:41:20
2/07/23 11:16:29 Total: Started
2/07/23 11:16:30 Total: Last log entry 07/23/22 12:49:20
2/07/23 11:16:33 Heap memory has degraded below safe minimum, restarting.

** Restart **

SD initialized.
2/07/23 18:16:36z Real Time Clock is running. Unix time 1675793796 
2/07/23 18:16:36z Reset reason: Software/System restart
2/07/23 18:16:37z Trace:  18:3, 18:2, 18:3, 18:2, 18:3, 18:2, 18:3, 18:4, 18:5, 1:6[6], 1:3, 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[2], 1:6[2], 1:6[2], 1:6[2], 1:6[3], 1:5[21], 1:6[4], 21:0, 21:1, 21:10, 21:10
2/07/23 18:16:39z ESP8266 ID: 565280, RTC M41T81 (68)
2/07/23 18:16:40z IoTaWatt 5.0, Firmware version 02_07_05
2/07/23 18:16:40z SPIFFS mounted.
2/07/23 11:16:41 Local time zone: -7:00, using DST/BST when in effect.
2/07/23 11:16:42 device name: IotaWatt
2/07/23 11:16:42 HTTP server started
2/07/23 11:16:43 timeSync: service started.
2/07/23 11:16:43 statService: started.
2/07/23 11:16:44 dataLog: service started.
2/07/23 11:16:46 dataLog: Last log entry 02/07/23 11:16:30
2/07/23 11:16:48 Updater: service started. Auto-update class is MINOR
2/07/23 11:16:49 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -54db
2/07/23 11:16:50 MDNS responder started for hostname IotaWatt
2/07/23 11:16:50 LLMNR responder started for hostname IotaWatt
2/07/23 11:16:51 historyLog: service started.
2/07/23 11:16:53 historyLog: Last log entry 02/07/23 11:16:00
2/07/23 11:16:54 Bathroom_Heater: Started
2/07/23 11:16:55 Bathroom_Heater: Last log entry 07/23/22 13:09:20
2/07/23 11:16:56 Updater: Auto-update is current for class MINOR.
2/07/23 11:16:57 Darcy_Office: Started
2/07/23 11:16:58 Darcy_Office: Last log entry 07/23/22 13:20:00
2/07/23 11:16:59 Entertainment: Started
2/07/23 11:17:00 Entertainment: Last log entry 07/23/22 13:26:40
2/07/23 11:17:01 Extra_Fridge: Started
2/07/23 11:17:02 Extra_Fridge: Last log entry 07/23/22 13:30:40
2/07/23 11:17:03 Fridge: Started
2/07/23 11:17:04 Fridge: Last log entry 07/23/22 13:13:20
2/07/23 11:17:05 Furnace_and_Fans: Started
2/07/23 11:17:06 Furnace_and_Fans: Last log entry 07/23/22 13:17:20
2/07/23 11:17:07 Jeff_Office: Started
2/07/23 11:17:08 Jeff_Office: Last log entry 07/23/22 12:56:00
2/07/23 11:17:09 Kitchen: Started
2/07/23 11:17:10 Kitchen: Last log entry 07/23/22 13:01:20
2/07/23 11:17:10 Laundry: Started
2/07/23 11:17:11 Laundry: Last log entry 07/23/22 13:10:40
2/07/23 11:17:13 Remainder: Started
2/07/23 11:17:14 Remainder: Last log entry 07/23/22 12:36:00
2/07/23 11:17:15 Server: Started
2/07/23 11:17:16 Server: Last log entry 07/23/22 12:41:20
2/07/23 11:17:16 Total: Started
2/07/23 11:17:17 Total: Last log entry 07/23/22 12:49:20
2/07/23 11:17:20 Heap memory has degraded below safe minimum, restarting.

** Restart **

SD initialized.
2/07/23 18:17:23z Real Time Clock is running. Unix time 1675793843 
2/07/23 18:17:23z Reset reason: Software/System restart
2/07/23 18:17:24z Trace:  1:6[2], 1:6[2], 1:6[2], 1:6[3], 1:5[5], 1:6[4], 5:0, 5:2, 1:6[6], 1:3, 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[2], 1:6[2], 1:6[2], 1:6[2], 1:6[2], 1:6[3], 1:5[21], 1:6[4], 21:0, 21:1, 21:10, 21:10
2/07/23 18:17:26z ESP8266 ID: 565280, RTC M41T81 (68)
2/07/23 18:17:27z IoTaWatt 5.0, Firmware version 02_07_05
2/07/23 18:17:27z SPIFFS mounted.
2/07/23 11:17:28 Local time zone: -7:00, using DST/BST when in effect.
2/07/23 11:17:29 device name: IotaWatt
2/07/23 11:17:29 HTTP server started
2/07/23 11:17:30 timeSync: service started.
2/07/23 11:17:30 statService: started.
2/07/23 11:17:31 dataLog: service started.
2/07/23 11:17:33 dataLog: Last log entry 02/07/23 11:17:20
2/07/23 11:17:35 Updater: service started. Auto-update class is MINOR
2/07/23 11:17:36 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -53db
2/07/23 11:17:37 MDNS responder started for hostname IotaWatt
2/07/23 11:17:38 LLMNR responder started for hostname IotaWatt
2/07/23 11:17:38 historyLog: service started.
2/07/23 11:17:40 historyLog: Last log entry 02/07/23 11:17:00
2/07/23 11:17:41 Bathroom_Heater: Started
2/07/23 11:17:42 Bathroom_Heater: Last log entry 07/23/22 13:09:20
2/07/23 11:17:44 Updater: Auto-update is current for class MINOR.
2/07/23 11:17:45 Darcy_Office: Started
2/07/23 11:17:46 Darcy_Office: Last log entry 07/23/22 13:20:00
2/07/23 11:17:47 Entertainment: Started
2/07/23 11:17:48 Entertainment: Last log entry 07/23/22 13:26:40
2/07/23 11:17:49 Extra_Fridge: Started
2/07/23 11:17:50 Extra_Fridge: Last log entry 07/23/22 13:30:40
2/07/23 11:17:51 Fridge: Started
2/07/23 11:17:52 Fridge: Last log entry 07/23/22 13:13:20
2/07/23 11:17:53 Furnace_and_Fans: Started
2/07/23 11:17:54 Furnace_and_Fans: Last log entry 07/23/22 13:17:20
2/07/23 11:17:55 Jeff_Office: Started
2/07/23 11:17:56 Jeff_Office: Last log entry 07/23/22 12:56:00
2/07/23 11:17:57 Kitchen: Started
2/07/23 11:17:58 Kitchen: Last log entry 07/23/22 13:01:20
2/07/23 11:17:58 Laundry: Started
2/07/23 11:17:59 Laundry: Last log entry 07/23/22 13:10:40
2/07/23 11:18:00 Remainder: Started
2/07/23 11:18:01 Remainder: Last log entry 07/23/22 12:36:00
2/07/23 11:18:02 Server: Started
2/07/23 11:18:03 Server: Last log entry 07/23/22 12:41:20
2/07/23 11:18:03 Total: Started
2/07/23 11:18:04 Total: Last log entry 07/23/22 12:49:20
2/07/23 11:18:07 Heap memory has degraded below safe minimum, restarting.

** Restart **

SD initialized.
2/07/23 18:18:09z Real Time Clock is running. Unix time 1675793889 
2/07/23 18:18:09z Reset reason: Software/System restart
2/07/23 18:18:10z Trace:  9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 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[2], 1:6[2], 1:6[2], 1:6[2], 1:6[3], 1:5[21], 1:6[4], 21:0, 21:1, 21:10, 21:10
2/07/23 18:18:12z ESP8266 ID: 565280, RTC M41T81 (68)
2/07/23 18:18:13z IoTaWatt 5.0, Firmware version 02_07_05
2/07/23 18:18:13z SPIFFS mounted.
2/07/23 11:18:14 Local time zone: -7:00, using DST/BST when in effect.
2/07/23 11:18:15 device name: IotaWatt
2/07/23 11:18:15 HTTP server started
2/07/23 11:18:16 timeSync: service started.
2/07/23 11:18:16 statService: started.
2/07/23 11:18:17 dataLog: service started.
2/07/23 11:18:19 dataLog: Last log entry 02/07/23 11:18:05
2/07/23 11:18:21 Updater: service started. Auto-update class is MINOR
2/07/23 11:18:22 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -52db
2/07/23 11:18:23 MDNS responder started for hostname IotaWatt
2/07/23 11:18:24 LLMNR responder started for hostname IotaWatt
2/07/23 11:18:25 historyLog: service started.
2/07/23 11:18:26 historyLog: Last log entry 02/07/23 11:18:00
2/07/23 11:18:27 Bathroom_Heater: Started
2/07/23 11:18:28 Bathroom_Heater: Last log entry 07/23/22 13:09:20
2/07/23 11:18:30 Updater: Auto-update is current for class MINOR.
2/07/23 11:18:32 Darcy_Office: Started
2/07/23 11:18:33 Darcy_Office: Last log entry 07/23/22 13:20:00```

It appears that you have at least 11 integrators configured. I believe that is what is causing heap to be depleted. Each integrator requires an open file with associated buffers.

I think you may have a misunderstanding about purpose of integrators. I think it’s unlikely that you are getting any useful result from most of them.

Integrators are used to separately accumulate the negative and positive components of an input series such as a mains input when there is a PV system that can cause energy to be exported.

For an input like a Fridge that only consumes energy, there is only a positive component and the Wh total is a monotonically increasing series. There will be no negative component and the integrated positive component will be exactly the same as what is maintained in the standard datalog.

1 Like

OK, I deleted most of my integrators and there is certainly some improvement. I am no longer seeing the heap memory warning. It is still rebooting more frequently than I would expect, but now it’s every few hours instead of every minute. Updated logs are below. Are these reboots expected, or is there another problem to figure out here?

Based on your previous message I can probably delete all of my integrators except for the Total and Remainder ones. Is that correct, or is there a better way to monitor those also? My PV system is monitored in my main disconnect box by a different system, all circuits that the Iotawatt monitors should always be positive in my setup.

2/07/23 12:06:35 device name: IotaWatt
2/07/23 12:06:35 HTTP server started
2/07/23 12:06:36 timeSync: service started.
2/07/23 12:06:36 statService: started.
2/07/23 12:06:37 dataLog: service started.
2/07/23 12:06:39 dataLog: Last log entry 02/07/23 12:06:25
2/07/23 12:06:45 Updater: service started. Auto-update class is MINOR
2/07/23 12:06:46 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -53db
2/07/23 12:06:47 MDNS responder started for hostname IotaWatt
2/07/23 12:06:48 LLMNR responder started for hostname IotaWatt
2/07/23 12:06:49 Entertainment: ended. Last entry 02/05/06 23:28:16

** Restart **

SD initialized.
2/07/23 19:06:51z Real Time Clock is running. Unix time 1675796811 
2/07/23 19:06:51z Reset reason: Exception
2/07/23 19:06:52z Trace:  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[2], 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[2], 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[2]
2/07/23 19:06:54z ESP8266 ID: 565280, RTC M41T81 (68)
2/07/23 19:06:55z IoTaWatt 5.0, Firmware version 02_07_05
2/07/23 19:06:55z SPIFFS mounted.
2/07/23 12:06:56 Local time zone: -7:00, using DST/BST when in effect.
2/07/23 12:06:57 device name: IotaWatt
2/07/23 12:06:57 HTTP server started
2/07/23 12:06:58 timeSync: service started.
2/07/23 12:06:58 statService: started.
2/07/23 12:06:59 dataLog: service started.
2/07/23 12:07:01 dataLog: Last log entry 02/07/23 12:06:45
2/07/23 12:07:03 Updater: service started. Auto-update class is MINOR
2/07/23 12:07:04 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -52db
2/07/23 12:07:05 MDNS responder started for hostname IotaWatt
2/07/23 12:07:06 LLMNR responder started for hostname IotaWatt
2/07/23 12:07:07 Jeff_Office: Started
2/07/23 12:07:08 Jeff_Office: Last log entry 07/23/22 12:56:00
2/07/23 12:07:09 Kitchen: Started
2/07/23 12:07:10 Kitchen: Last log entry 07/23/22 13:01:20
2/07/23 12:07:11 Remainder: Started
2/07/23 12:07:12 Remainder: Last log entry 07/23/22 12:36:00
2/07/23 12:07:13 Server: Started
2/07/23 12:07:14 Server: Last log entry 07/23/22 12:41:20
2/07/23 12:07:14 Total: Started
2/07/23 12:07:15 Total: Last log entry 07/23/22 12:49:20
2/07/23 12:07:17 historyLog: service started.
2/07/23 12:07:19 historyLog: Last log entry 02/07/23 12:06:00
2/07/23 12:07:20 Furnace_and_Fans: ended. Last entry 02/05/06 23:28:16

** Restart **

SD initialized.
2/07/23 19:07:23z Real Time Clock is running. Unix time 1675796843 
2/07/23 19:07:23z Reset reason: Exception
2/07/23 19:07:24z Trace:  1:6[2], 1:6[2], 1:6[2], 1:6[2], 1:6[2], 1:6[2], 1:6[3], 1:5[5], 1:6[4], 5:0, 5:4, 1:6[6], 1:3, 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[2], 1:6[2], 1:6[2], 1:6[3], 1:5[33], 1:6[4], 33:0, 33:1, 33:2[2]
2/07/23 19:07:26z ESP8266 ID: 565280, RTC M41T81 (68)
2/07/23 19:07:27z IoTaWatt 5.0, Firmware version 02_07_05
2/07/23 19:07:27z SPIFFS mounted.
2/07/23 12:07:28 Local time zone: -7:00, using DST/BST when in effect.
2/07/23 12:07:29 device name: IotaWatt
2/07/23 12:07:29 HTTP server started
2/07/23 12:07:30 timeSync: service started.
2/07/23 12:07:30 statService: started.
2/07/23 12:07:31 dataLog: service started.
2/07/23 12:07:33 dataLog: Last log entry 02/07/23 12:07:20
2/07/23 12:07:35 Updater: service started. Auto-update class is MINOR
2/07/23 12:07:36 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -52db
2/07/23 12:07:37 MDNS responder started for hostname IotaWatt
2/07/23 12:07:38 LLMNR responder started for hostname IotaWatt
2/07/23 12:07:38 historyLog: service started.
2/07/23 12:07:40 historyLog: Last log entry 02/07/23 12:07:00
2/07/23 12:07:41 Jeff_Office: Started
2/07/23 12:07:42 Jeff_Office: Last log entry 07/23/22 12:56:00
2/07/23 12:07:43 Updater: Auto-update is current for class MINOR.
2/07/23 12:07:44 Kitchen: Started
2/07/23 12:07:45 Kitchen: Last log entry 07/23/22 13:01:20
2/07/23 12:07:46 Remainder: Started
2/07/23 12:07:47 Remainder: Last log entry 07/23/22 12:36:00
2/07/23 12:07:50 Server: Started
2/07/23 12:07:51 Server: Last log entry 07/23/22 12:41:20
2/07/23 12:07:51 Total: Started
2/07/23 12:07:52 Total: Last log entry 07/23/22 12:49:20
2/07/23 12:08:41 dataLog: datalog WDT - restarting

** Restart **

SD initialized.
2/07/23 19:08:43z Real Time Clock is running. Unix time 1675796923 
2/07/23 19:08:44z Reset reason: Software/System restart
2/07/23 19:08:44z Trace:  1:6[3], 1:5[19], 1:6[4], 1:6[6], 1:3, 1:3, 1:6[1], 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[6], 1:2[7], 9:0[7], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2
2/07/23 19:08:48z ESP8266 ID: 565280, RTC M41T81 (68)
2/07/23 19:08:48z IoTaWatt 5.0, Firmware version 02_07_05
2/07/23 19:08:49z SPIFFS mounted.
2/07/23 12:08:50 Local time zone: -7:00, using DST/BST when in effect.
2/07/23 12:08:51 device name: IotaWatt
2/07/23 12:08:52 HTTP server started
2/07/23 12:08:52 timeSync: service started.
2/07/23 12:08:53 statService: started.
2/07/23 12:08:54 dataLog: service started.
2/07/23 12:08:57 dataLog: Last log entry 02/07/23 12:09:35
2/07/23 12:08:57 Updater: service started. Auto-update class is MINOR
2/07/23 12:08:59 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -51db
2/07/23 12:09:00 MDNS responder started for hostname IotaWatt
2/07/23 12:09:01 LLMNR responder started for hostname IotaWatt
2/07/23 12:09:03 historyLog: service started.
2/07/23 12:09:05 historyLog: Last log entry 02/07/23 12:09:00
2/07/23 12:09:06 Jeff_Office: Started
2/07/23 12:09:08 Jeff_Office: Last log entry 07/23/22 13:50:40
2/07/23 12:09:09 Updater: Auto-update is current for class MINOR.
2/07/23 12:09:10 Kitchen: Started
2/07/23 12:09:12 Kitchen: Last log entry 07/23/22 13:54:40
2/07/23 12:09:12 Remainder: Started
2/07/23 12:09:14 Remainder: Last log entry 07/23/22 13:29:20
2/07/23 12:09:15 Server: Started
2/07/23 12:09:16 Server: Last log entry 07/23/22 13:34:40
2/07/23 12:09:17 Total: Started
2/07/23 12:09:19 Total: Last log entry 07/23/22 13:44:00
2/07/23 13:25:15 dataLog: datalog WDT - restarting

** Restart **

SD initialized.
2/07/23 20:25:18z Real Time Clock is running. Unix time 1675801518 
2/07/23 20:25:18z Reset reason: Software/System restart
2/07/23 20:25:19z Trace:  1:6[4], 33:0, 33:1, 33:2[1], 33:1, 1:6[6], 1:1[7], 1:2[8], 9:0[8], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 1:3, 1:6[1], 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]
2/07/23 20:25:21z ESP8266 ID: 565280, RTC M41T81 (68)
2/07/23 20:25:21z IoTaWatt 5.0, Firmware version 02_07_05
2/07/23 20:25:22z SPIFFS mounted.
2/07/23 13:25:22 Local time zone: -7:00, using DST/BST when in effect.
2/07/23 13:25:23 device name: IotaWatt
2/07/23 13:25:24 HTTP server started
2/07/23 13:25:24 timeSync: service started.
2/07/23 13:25:25 statService: started.
2/07/23 13:25:26 dataLog: service started.
2/07/23 13:25:28 dataLog: Last log entry 02/07/23 13:20:15
2/07/23 13:25:30 Updater: service started. Auto-update class is MINOR
2/07/23 13:25:31 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -53db
2/07/23 13:25:32 MDNS responder started for hostname IotaWatt
2/07/23 13:25:33 LLMNR responder started for hostname IotaWatt
2/07/23 13:25:34 historyLog: service started.
2/07/23 13:25:36 historyLog: Last log entry 02/07/23 13:20:00
2/07/23 13:25:37 Jeff_Office: Started
2/07/23 13:25:38 Jeff_Office: Last log entry 07/24/22 00:10:40
2/07/23 13:25:39 Updater: Auto-update is current for class MINOR.
2/07/23 13:25:40 Kitchen: Started
2/07/23 13:25:41 Kitchen: Last log entry 07/24/22 00:18:40
2/07/23 13:25:42 Remainder: Started
2/07/23 13:25:43 Remainder: Last log entry 08/06/22 23:06:40
2/07/23 13:25:45 Server: Started
2/07/23 13:25:46 Server: Last log entry 07/23/22 23:53:20
2/07/23 13:25:46 Total: Started
2/07/23 13:25:47 Total: Last log entry 07/24/22 00:02:40

** Restart **

SD initialized.
2/07/23 22:53:27z Real Time Clock is running. Unix time 1675810407 
2/07/23 22:53:27z Reset reason: Software/System restart
2/07/23 22:53:28z Trace:  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[14], 1:2, 9:0, 9:0, 8:4, 8:6, 8:8, 8:9, 1:2, 1:3, 1:3, 1:6[1], 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]
2/07/23 22:53:30z ESP8266 ID: 565280, RTC M41T81 (68)
2/07/23 22:53:31z IoTaWatt 5.0, Firmware version 02_07_05
2/07/23 22:53:31z SPIFFS mounted.
2/07/23 15:53:32 Local time zone: -7:00, using DST/BST when in effect.
2/07/23 15:53:33 device name: IotaWatt
2/07/23 15:53:33 HTTP server started
2/07/23 15:53:34 timeSync: service started.
2/07/23 15:53:34 statService: started.
2/07/23 15:53:35 dataLog: service started.
2/07/23 15:53:37 dataLog: Last log entry 02/07/23 15:48:25
2/07/23 15:53:40 Updater: service started. Auto-update class is MINOR
2/07/23 15:53:41 WiFi connected. SSID=Basement, IP=192.168.1.10, channel=2, RSSI -54db
2/07/23 15:53:42 MDNS responder started for hostname IotaWatt
2/07/23 15:53:44 LLMNR responder started for hostname IotaWatt
2/07/23 15:53:45 historyLog: service started.
2/07/23 15:53:49 historyLog: Last log entry 02/07/23 15:48:00
2/07/23 15:53:52 Jeff_Office: Started
2/07/23 15:53:54 Jeff_Office: Last log entry 07/24/22 20:12:00
2/07/23 15:53:55 Updater: Auto-update is current for class MINOR.
2/07/23 15:53:56 Kitchen: Started
2/07/23 15:53:58 Kitchen: Last log entry 07/24/22 20:22:40
2/07/23 15:53:58 Remainder: Started
2/07/23 15:54:00 Remainder: Last log entry 08/07/22 19:05:20
2/07/23 15:54:01 Server: Started
2/07/23 15:54:02 Server: Last log entry 08/09/22 10:33:20
2/07/23 15:54:05 Total: Started
2/07/23 15:54:07 Total: Last log entry 07/24/22 20:01:20```

They are expected given the situation but definitely not normal. I did not notice that the integrator logs had very old dates on them. Some of these restarts seem to have been caused by the act of deleting an integrator. You still have at least five of them. They are not current or “synchronized” so that eats up even more resources. You should probably delete them all, see if the unit stabilizes, then add back only the integrator that is necessary.

Barring WiFi issues or power failure, the unit should only restart every six weeks.

OK, at the moment I’ve deleted all but two of the integrators. The two remaining are:
Remainder Wh = A01 + A02 - (A03 + A04 + A05 + A06 + A07 + A08 + A09 + A10 + A11 + A12 + A13 + A13 + A14)
Total Wh = A01 + A02

Maybe the guidance I was following is obsolete now. Is there a way to reproduce this functionality without an integrator?

Hard to say without knowing what these inputs are. You say that your solar is connected upstream of your mains in the main disconnect box. So, your mains should always be positive. If that is the case, you would not need integrators. The scripts that you are using for the integrators could be outputs.

I’m assuming that you are getting the solar exported to HA and are computing your import/export there.

I deleted all of the integrations and run time is currently up to 22 hours, so it looks like this has fixed it. I was also able to use outputs instead of integrators to get the information I need into home assistant. Thanks for the help.

1 Like