Dear all,
First of all, I want to mention that I’m a very enthousiastic owner of an IotaWatt energy monitor, which I use to monitor my electricity consumption and solar production at home (Belgium). It’s a first step in my commitment to reduce my carbon footprint and contribute to a sustainable world.
Recently I came upon an issue which can’t seem to solve on my own, and which has not yet been covered in the IotaWatt/Emoncms community.
During the night, my Wifi network is scheduled to shut down automatically and reappear in the morning. By consequence, Iotawatt cannot post data to Emoncms during the night. This is not a problem, as IotaWatt can upload the captured data during the day.
However, as soon as the IotaWatt reconnects to the Wifi network in the morning, it starts re-uploading the whole logging history (in my case, since August 2018).
As I understand from the IotaWatt firmware code on Github, IotaWatt should start posting from the last timeframe which was posted to EmonCMS before (HTTP response from EmonCMS contains the timestamp of the last posted datapoint). But this doesn’t happen.
As a temporary measure, to avoid re-uploading the whole history every day, I specified in the “webserver” settings of IotaWatt that history should be uploaded from 01-01-2019, but this doesn’t fundamentally solve the issue.
Extract from IotaWatt log:
** Restart **
SD initialized.
1/25/19 05:30:33z Real Time Clock is running. Unix time 1548394233
1/25/19 05:30:33z Version 02_03_20
1/25/19 05:30:33z Reset reason: Software/System restart
1/25/19 05:30:33z Trace: 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:3, 1:4, 1:1[5], 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:4, 1:5[21]
1/25/19 05:30:33z ESP8266 ChipID: 6910673
1/25/19 05:30:33z SPIFFS mounted.
1/25/19 06:30:34 Local time zone: +1:00
1/25/19 06:30:34 device name: IotaWatt
1/25/19 06:30:34 MDNS responder started for hostname IotaWatt
1/25/19 06:30:34 LLMNR responder started for hostname IotaWatt
1/25/19 06:30:35 HTTP server started
1/25/19 06:30:35 timeSync: service started.
1/25/19 06:30:35 statService: started.
1/25/19 06:30:35 dataLog: service started.
1/25/19 06:30:36 dataLog: Last log entry 01/25/19 06:30:30
1/25/19 06:30:36 historyLog: service started.
1/25/19 06:30:37 historyLog: Last log entry 01/25/19 06:30:00
1/25/19 06:30:40 EmonService: started. url=(URL to my emoncms server), node=IotaWatt, interval=10
1/25/19 07:00:21 WiFi connected. SSID=(Wifi network SSID), IP=192.168.84.115, channel=6, RSSI -62db
1/25/19 07:00:21 Updater: service started. Auto-update class is MAJOR
1/25/19 07:00:22 Updater: Invalid response from server. HTTPcode: 200
1/25/19 07:00:24 EmonService: Start posting at 01/01/19 00:00:10`
Can someone look into the problem together with me, as I don’t find the answer?
Thank you very much in advance.