Wifi dropping when Emoncms upload enabled

Hi team. About a year ago my Emoncms instance fried itself, I didn’t really care much about it as my primary datasource was InfluxDB.

Just recently I setup a new instance and enabled the Emoncms uploader again and got it to upload all the history it had, it appears to have been working fine for a few days but then this morning I noticed no data transferring to Influx. It appeared as if there was a wifi issue:

I reset the wifi, connected it to a different AP, no difference. The LED sequence also looks a bit odd:

I tried a different 5vdc PSU, no difference, and then managed to stop the EmonCMS uploader and it appears to have come right.

Looking at theiotamsgs.txt (978.8 KB), it’s actually full of restarts and the fact that Influx was uploading was probably a coincidence:

** Restart **

SD initialized.
1/24/23 04:19:34z Real Time Clock is running. Unix time 1674533974 
1/24/23 04:19:34z Reset reason: Exception
1/24/23 04:19:34z Trace:  9:9, 1:2, 1:3, 1:3, 1:6[1], 1:6[2], 1:6[3], 1:5[31], 1:6[4], 31:0, 31:1, 31:2[5], 31:120, 21:100[31], 31:1, 1:6[6], 1:3, 1:3, 1:6[1], 1:6[3], 1:5[31], 1:6[4], 31:0, 31:1, 31:2[3], 3:60, 3:60, 3:60, 3:62, 3:62, 3:64, 3:65
1/24/23 04:19:34z ESP8266 ID: 2516990, RTC PCF8523 (68)
1/24/23 04:19:34z IoTaWatt 4.x, Firmware version 02_07_05
1/24/23 04:19:34z SPIFFS mounted.
1/24/23 17:19:36 Local time zone: +12:00, using DST/BST when in effect.
1/24/23 17:19:36 device name: IotaWatt
1/24/23 17:19:36 HTTP server started
1/24/23 17:19:36 emoncms: Starting, interval:5, url:http://10.111.113.44
1/24/23 17:19:36 influxDB_v1: Starting, interval:10, url:http://10.111.113.34:8086
1/24/23 17:19:37 timeSync: service started.
1/24/23 17:19:37 statService: started.
1/24/23 17:19:37 dataLog: service started.
1/24/23 17:19:38 dataLog: Last log entry 01/24/23 17:19:30
1/24/23 17:19:41 WiFi connected. SSID=PrivateIOT, IP=10.111.113.80, channel=1, RSSI -64db
1/24/23 17:19:41 MDNS responder started for hostname IotaWatt
1/24/23 17:19:41 LLMNR responder started for hostname IotaWatt
1/24/23 17:19:41 Updater: service started. Auto-update class is MINOR
1/24/23 17:19:41 emoncms: Start posting at 07/03/22 20:37:00
1/24/23 17:19:42 historyLog: service started.
1/24/23 17:19:43 historyLog: Last log entry 01/24/23 17:19:00

** Restart **

SD initialized.
1/24/23 04:19:44z Real Time Clock is running. Unix time 1674533984 
1/24/23 04:19:44z Reset reason: Exception
1/24/23 04:19:44z Trace:  8:9, 1:2, 1:3, 1:3, 1:6[1], 1:6[2], 1:6[3], 1:5[31], 1:6[4], 31:0, 31:1, 31:2[5], 31:120, 21:100[31], 31:1, 1:6[6], 1:3, 1:3, 1:6[1], 1:6[3], 1:5[31], 1:6[4], 31:0, 31:1, 31:2[3], 3:60, 3:60, 3:60, 3:62, 3:62, 3:64, 3:65
1/24/23 04:19:44z ESP8266 ID: 2516990, RTC PCF8523 (68)
1/24/23 04:19:44z IoTaWatt 4.x, Firmware version 02_07_05
1/24/23 04:19:44z SPIFFS mounted.
1/24/23 17:19:46 Local time zone: +12:00, using DST/BST when in effect.
1/24/23 17:19:46 device name: IotaWatt
1/24/23 17:19:46 HTTP server started
1/24/23 17:19:46 emoncms: Starting, interval:5, url:http://10.111.113.44
1/24/23 17:19:46 influxDB_v1: Starting, interval:10, url:http://10.111.113.34:8086
1/24/23 17:19:47 timeSync: service started.
1/24/23 17:19:47 statService: started.
1/24/23 17:19:47 dataLog: service started.
1/24/23 17:19:48 dataLog: Last log entry 01/24/23 17:19:40
1/24/23 17:19:52 historyLog: service started.
1/24/23 17:19:53 historyLog: Last log entry 01/24/23 17:19:00
1/24/23 17:19:56 WiFi connected. SSID=PrivateIOT, IP=10.111.113.80, channel=1, RSSI -65db
1/24/23 17:19:56 MDNS responder started for hostname IotaWatt
1/24/23 17:19:56 LLMNR responder started for hostname IotaWatt
1/24/23 17:19:56 Updater: service started. Auto-update class is MINOR
1/24/23 17:19:56 emoncms: Start posting at 07/03/22 20:37:00
1/24/23 17:19:57 Updater: Auto-update is current for class MINOR.

My EmonCMS appears fine, anything I can scope / check / change before trying again?

My iotamsgs.txt log is 23mb now… Managed to download the whole thing. Log is pretty normal, not much of anything except sections ending in 12/27/22 09:52:20 timeSync: Six week routine restart. at one point there was a lot spam related to update tables.

Can see the start and then subsequent failures here. 10.111.111.39 was the old server, 10.111.113.44 is the new. I’m 99% sure I wasn’t doing the change at 05:53:51, I think I kicked it off here: 1/22/23 20:32:33 emoncms: Start posting at 05/27/22 15:54:55

SD initialized.
1/22/23 01:57:05z Real Time Clock is running. Unix time 1674352625 
1/22/23 01:57:05z Reset Reason: Power-fail restart.
1/22/23 01:57:05z ESP8266 ID: 2516990, RTC PCF8523 (68)
1/22/23 01:57:05z IoTaWatt 4.x, Firmware version 02_07_05
1/22/23 01:57:05z SPIFFS mounted.
1/22/23 14:57:05 Local time zone: +12:00, using DST/BST when in effect.
1/22/23 14:57:05 device name: IotaWatt
1/22/23 14:57:08 Connecting with WiFiManager.
1/22/23 15:01:28 HTTP server started
1/22/23 15:01:28 emoncms: Starting, interval:5, url:http://10.111.111.39
1/22/23 15:01:28 influxDB_v1: Starting, interval:10, url:http://10.111.111.35:8086
1/22/23 15:01:28 WiFi connected. SSID=PrivateIOT, IP=10.111.113.249, channel=1, RSSI -65db
1/22/23 15:01:28 MDNS responder started for hostname IotaWatt
1/22/23 15:01:28 LLMNR responder started for hostname IotaWatt
1/22/23 15:01:28 timeSync: service started.
1/22/23 15:01:28 statService: started.
1/22/23 15:01:28 Updater: service started. Auto-update class is MINOR
1/22/23 15:01:29 dataLog: service started.
1/22/23 15:01:29 dataLog: Last log entry 01/22/23 14:56:40
1/22/23 15:01:33 historyLog: service started.
1/22/23 15:01:34 historyLog: Last log entry 01/22/23 14:56:00
1/22/23 15:01:49 emoncms: Query failed -4
1/22/23 15:01:49 emoncms: stopped, Last post 01/01/70 13:00:00
1/22/23 15:02:10 influxDB_v1: Start posting at 01/22/23 14:52:10
1/22/23 15:02:12 Updater: Auto-update is current for class MINOR.

** Restart **

SD initialized.
1/22/23 02:02:46z Real Time Clock is running. Unix time 1674352966 
1/22/23 02:02:46z Reset Reason: Power-fail restart.
1/22/23 02:02:46z ESP8266 ID: 2516990, RTC PCF8523 (68)
1/22/23 02:02:46z IoTaWatt 4.x, Firmware version 02_07_05
1/22/23 02:02:46z SPIFFS mounted.
1/22/23 15:02:46 Local time zone: +12:00, using DST/BST when in effect.
1/22/23 15:02:46 device name: IotaWatt
1/22/23 15:02:49 Connecting with WiFiManager.
1/22/23 15:02:52 HTTP server started
1/22/23 15:02:52 emoncms: Starting, interval:5, url:http://10.111.111.39
1/22/23 15:02:52 influxDB_v1: Starting, interval:10, url:http://10.111.111.35:8086
1/22/23 15:02:52 WiFi connected. SSID=PrivateIOT, IP=10.111.113.80, channel=1, RSSI -65db
1/22/23 15:02:52 MDNS responder started for hostname IotaWatt
1/22/23 15:02:52 LLMNR responder started for hostname IotaWatt
1/22/23 15:02:52 timeSync: service started.
1/22/23 15:02:52 statService: started.
1/22/23 15:02:52 Updater: service started. Auto-update class is MINOR
1/22/23 15:02:52 dataLog: service started.
1/22/23 15:02:53 dataLog: Last log entry 01/22/23 15:02:40
1/22/23 15:02:57 historyLog: service started.
1/22/23 15:02:57 historyLog: Last log entry 01/22/23 15:02:00
1/22/23 15:03:12 emoncms: Query failed -4
1/22/23 15:03:12 emoncms: stopped, Last post 01/01/70 13:00:00
1/22/23 15:03:15 Updater: Auto-update is current for class MINOR.
1/22/23 15:03:15 influxDB_v1: Start posting at 01/22/23 15:02:30
1/22/23 20:32:33 emoncms: No existing inputs found for node IotaWatt_2.
1/22/23 20:32:33 emoncms: Start posting at 05/27/22 15:54:55

** Restart **

SD initialized.
1/22/23 16:53:46z Real Time Clock is running. Unix time 1674406426 
1/22/23 16:53:46z Reset reason: Exception
1/22/23 16:53:46z Trace:  3:63, 31:1, 1:6[6], 1:1, 1:2[1], 9:0[1], 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[3], 1:5[31], 1:6[4], 31:0, 31:1, 31:2[3], 3:60, 3:60, 3:60, 3:62, 3:62, 3:64, 3:65
1/22/23 16:53:46z ESP8266 ID: 2516990, RTC PCF8523 (68)
1/22/23 16:53:46z IoTaWatt 4.x, Firmware version 02_07_05
1/22/23 16:53:46z SPIFFS mounted.
1/23/23 05:53:46 Local time zone: +12:00, using DST/BST when in effect.
1/23/23 05:53:46 device name: IotaWatt
1/23/23 05:53:46 HTTP server started
1/23/23 05:53:46 emoncms: Starting, interval:5, url:http://10.111.113.44
1/23/23 05:53:46 influxDB_v1: Starting, interval:10, url:http://10.111.113.34:8086
1/23/23 05:53:46 timeSync: service started.
1/23/23 05:53:46 statService: started.
1/23/23 05:53:46 dataLog: service started.
1/23/23 05:53:47 dataLog: Last log entry 01/23/23 05:53:40
1/23/23 05:53:50 WiFi connected. SSID=PrivateIOT, IP=10.111.113.80, channel=1, RSSI -64db
1/23/23 05:53:50 MDNS responder started for hostname IotaWatt
1/23/23 05:53:50 LLMNR responder started for hostname IotaWatt
1/23/23 05:53:50 Updater: service started. Auto-update class is MINOR
1/23/23 05:53:50 emoncms: Start posting at 07/03/22 20:37:00

** Restart **

SD initialized.
1/22/23 16:53:51z Real Time Clock is running. Unix time 1674406431 
1/22/23 16:53:51z Reset reason: Exception
1/22/23 16:53:51z Trace:  1:3, 1:6[1], 1:6[2], 1:6[3], 1:5[31], 1:6[4], 31:0, 31:1, 31:2[1], 32:20, 32:20, 32:20, 32:20, 31:1, 1:6[6], 1:3, 1:3, 1:6[1], 1:6[2], 1:6[3], 1:5[31], 1:6[4], 31:0, 31:1, 31:2[3], 3:60, 3:60, 3:60, 3:62, 3:62, 3:64, 3:65
1/22/23 16:53:51z ESP8266 ID: 2516990, RTC PCF8523 (68)
1/22/23 16:53:51z IoTaWatt 4.x, Firmware version 02_07_05
1/22/23 16:53:51z SPIFFS mounted.
1/23/23 05:53:51 Local time zone: +12:00, using DST/BST when in effect.
1/23/23 05:53:51 device name: IotaWatt
1/23/23 05:53:51 HTTP server started
1/23/23 05:53:51 emoncms: Starting, interval:5, url:http://10.111.113.44
1/23/23 05:53:51 influxDB_v1: Starting, interval:10, url:http://10.111.113.34:8086
1/23/23 05:53:51 timeSync: service started.
1/23/23 05:53:51 statService: started.
1/23/23 05:53:52 dataLog: service started.
1/23/23 05:53:52 dataLog: Last log entry 01/23/23 05:53:50
1/23/23 05:53:55 WiFi connected. SSID=PrivateIOT, IP=10.111.113.80, channel=1, RSSI -63db
1/23/23 05:53:55 MDNS responder started for hostname IotaWatt
1/23/23 05:53:55 LLMNR responder started for hostname IotaWatt
1/23/23 05:53:55 Updater: service started. Auto-update class is MINOR
1/23/23 05:53:55 emoncms: Start posting at 07/03/22 20:37:00

Can I see a screenshot of your status display with all the tabs expanded and a screenshot of your Emoncms setup? Also, what version of Emoncms are you using?

Latest version of EmonCMS as of last weekend. Used their install script on fresh Ubuntu 22 (dedicated vm). Have done zero configuration on EmonCMS outside of enable a remote mqtt broker, wanted to get the data load finished.

Looking for the Emoncms uploaders setup in IoTaWatt. Also, please post your (IoTaWatt) message log.

Apologies:

My iotamsgs file is 22mb, I can’t upload it (4mb limit), hence attaching the snippet above. Will email the full log.

The upload is stuck on 7/3/22 20:36:55. It may be bad data in the datalog but the trace doesn’t indicate that. Can you try the upload history from date in your Emoncms setup to 7/4/22 and see if it runs after skipping over a few hours.

Another thing you may want to try is removing the Emoncms userid from your setup. That causes the data to be encrypted, but this is a local instance now and probably not needed.

1 Like

Skipping that day so far looks to be working - thanks.