IottaWatt not posting to EmonCMS again

Hi all
I’ve got an issue with my Iotawatt that’s stopped posting to my emoncms server that I’ve had before (IottaWatt not posting to EmonCMS).
This issue coincides with upgrading the firmware and subsequent restart on my access points so the Iotawatt temporarily lost connection to the emoncms server.
The only thing I’ve done since is to reset my Iotawatt to see if that resolves but I’m keen to get to the bottom of this issue.
The emoncms server is on the local network but has a domain address.

Many Thanks

Dave

** Restart **

SD initialized.
7/04/21 20:15:48z Real Time Clock is running. Unix time 1625429748 
7/04/21 20:15:48z Reset reason: Exception
7/04/21 20:15:48z Trace:  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[6], 31:90, 21:110, 21:110, 31:91, 31:9, 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[4], 3:91, 15:0[32]
7/04/21 20:15:48z ESP8266 ChipID: 2518071
7/04/21 20:15:48z IoTaWatt 4.x, Firmware version 02_06_02
7/04/21 20:15:48z SPIFFS mounted.
7/04/21 20:15:48z Local time zone: +0:00
7/04/21 20:15:48z device name: House
7/04/21 20:15:48z HTTP server started
7/04/21 20:15:48z emoncms: Starting, interval:5, url:http://energy.m0nne.com/emoncms
7/04/21 20:15:48z timeSync: service started.
7/04/21 20:15:48z statService: started.
7/04/21 20:15:48z dataLog: service started.
7/04/21 20:15:49z dataLog: Last log entry 07/04/21 20:15:45
7/04/21 20:15:52z WiFi connected. SSID=WiFi, IP=192.168.10.133, channel=1, RSSI -58db
7/04/21 20:15:52z MDNS responder started for hostname House
7/04/21 20:15:52z LLMNR responder started for hostname House
7/04/21 20:15:52z Updater: service started. Auto-update class is MINOR
7/04/21 20:15:52z emoncms: Start posting at 07/04/21 20:15:40
7/04/21 20:15:53z historyLog: service started.
7/04/21 20:15:53z historyLog: Last log entry 07/04/21 20:15:00
7/04/21 20:15:54z Updater: Auto-update is current for class MINOR.
7/16/21 21:12:34z WiFi disconnected.
7/16/21 21:13:08z WiFi connected. SSID=WiFi, IP=192.168.10.133, channel=1, RSSI -63db
7/17/21 05:10:25z WiFi disconnected.
7/17/21 05:10:27z WiFi connected. SSID=WiFi, IP=192.168.10.133, channel=1, RSSI -62db
8/01/21 01:50:11z WiFi disconnected.
8/01/21 01:53:23z WiFi connected. SSID=WiFi, IP=192.168.10.133, channel=1, RSSI -55db
8/01/21 22:09:45z Restart command received.

** Restart **

SD initialized.
8/01/21 22:09:47z Real Time Clock is running. Unix time 1627855787 
8/01/21 22:09:47z Reset reason: Software/System restart
8/01/21 22:09:47z Trace:  1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:1[11], 1:2[12], 9:0[12], 9:0, 9:1, 8:4, 8:6, 8:8, 8:9, 9:3, 9:5, 9:9, 1:2, 1:3, 10:2, 10:3
8/01/21 22:09:47z ESP8266 ChipID: 2518071
8/01/21 22:09:47z IoTaWatt 4.x, Firmware version 02_06_02
8/01/21 22:09:47z SPIFFS mounted.
8/01/21 22:09:47z Local time zone: +0:00
8/01/21 22:09:47z device name: House
8/01/21 22:09:47z HTTP server started
8/01/21 22:09:47z emoncms: Starting, interval:5, url:http://energy.m0nne.com/emoncms
8/01/21 22:09:47z timeSync: service started.
8/01/21 22:09:47z statService: started.
8/01/21 22:09:47z dataLog: service started.
8/01/21 22:09:48z dataLog: Last log entry 08/01/21 22:09:45
8/01/21 22:09:52z historyLog: service started.
8/01/21 22:09:52z historyLog: Last log entry 08/01/21 22:09:00
8/01/21 22:09:52z WiFi connected. SSID=WiFi, IP=192.168.10.133, channel=1, RSSI -57db
8/01/21 22:09:52z MDNS responder started for hostname House
8/01/21 22:09:52z LLMNR responder started for hostname House
8/01/21 22:09:52z Updater: service started. Auto-update class is MINOR
8/01/21 22:09:52z emoncms: Start posting at 08/01/21 01:53:25
8/01/21 22:09:54z Updater: Auto-update is current for class MINOR.

To be clear, the IoTaWatt firmware was not updated, the router firmware was updated.

This looks to be the same as the last problem where IoTaWatt does not appear to be getting a response from Emoncms when uploading. It all started with the disconnect at 1:53:23. It doesn’t appear to be an IoTaWatt issue.

Have you tried just posting to the IP address of the Emoncms?

Hi @overeasy (Bob)
I can confirm that the access point firmware was upgraded rather than the firmware ion Iotawatt.
So I can get more of an understanding of the logs, where does it indicate that there’s no response from the Emoncms server?
I appreciate that you’ve indicated that the Emoncms server is at fault but this issue happened after the WiFi dropped out and I know if I issue a http://192.168.197.134/command?deletelog=both command, everything will start working again?
@wt29 Tony - That’s not a bad idea, it removes the DNS element.

Regards
Dave

Would you post the status page with all of the tabs expanded please?

Hi Bob
Sure, please see below…

So there you have it,

“Post failed, -11”

Which is a timeout of the post. It was sent and no response was received. The reason that I think it’s Emoncms is that IoTaWatt is able to communicate out to the internet to verify the auto-update is current, and it is able to request the time of last update of Emoncms.

While nuking your datalog may resolve this, my sense is worked for you in the past because it is trying to upload from where it left off and when you delete the datalog the IoTaWatt restarts and begins uploading from the present time.

Update:

Looking more closely at the DataLogs status, I am curious to know if this IoTaWatt was unused for a long period of time. The reason I ask is that the current log is normally has a year of data and the “wraps” where it starts over at the beginning overwriting older entries with newer entries. You datalog appears to span 30 months, and the size indicates it only has about 194 days of data. That is certainly possibl;e if the unit was not working for a very long time, but it could also be indicative of a datalog issue that I am not aware of. Can you elaborate on the history of this unit?

Hi Bob
Yes, I’ve had the unit for quite some time, I have four in total so yes that is a possibility.
Is that something I can download from the unit to PM you?

Regards

Dave

I think I found a solution for the “Post failed, -11” error. Enable redis in the emoncms settings.ini.

I was able to reproduce the error by disabling the redis option.

; Redis
[redis]
enabled = true

Don’t know much about how that works, but as I recall you need to be careful with redis. I think you need to setup persistence to insure that it recovers seamlessly from any outage.