My IotaWatt has been working great for years, then I touch things and things start going wrong - Opps.
Anyway I think this time it’s bad timing, but I of course can’t rule out user error.
So as I say, my IotaWatt has been running great for years. Recently (About 6 months ago) we moved to a property with solar so I set everything up again and it continued to work well. I use the local graphs a lot and I also export to InfluxDB.
I recently re-did some of my collected metrics (Added Power Factor and Mains Current) so I cleared down InfluxDB and set off the exporter again - This has taken a few days to re-process and is still in progress as we speak but seems to be going fine.
I then remembered that I still have some EmonCMS credits from when I first purchased my IotaWatt so I thought I’d set that up again now that I can take advantage of their solar dashboard. When I did this it seemed to take a very long time before it started to export historical data, then suddenly out of nowhere the whole IotaWatt UI stopped responding. A restart didn’t help, but in the end I blocked emoncms.org in my DNS server and restarted the IotaWatt which forced the EmonCMS upload to fail and therefore allowed the UI to work again.
Upon checking the logs, I noticed the following: (The first is when it restarted with access to emoncms.org, the second is after emoncms.org was blocked)
** Restart **
SD initialized.
6/04/23 08:33:50z Real Time Clock is running. Unix time 1685867630
6/04/23 08:33:50z Reset Reason: Power-fail restart.
6/04/23 08:33:50z ESP8266 ID: 6910659, RTC PCF8523 (68)
6/04/23 08:33:50z IoTaWatt 4.x, Firmware version 02_07_05
6/04/23 08:33:50z SPIFFS mounted.
6/04/23 08:33:50z Local time zone: +0:00
6/04/23 08:33:50z device name: IotaWatt
6/04/23 08:33:53z Connecting with WiFiManager.
6/04/23 08:33:57z HTTP server started
6/04/23 08:33:57z emoncms: Starting, interval:10, url:http://emoncms.org
6/04/23 08:33:57z influxDB_v2: Starting, interval:5, url:http://192.168.1.187:8086
6/04/23 08:33:57z WiFi connected. SSID=yngndrw, IP=192.168.1.130, channel=11, RSSI -61db
6/04/23 08:33:57z MDNS responder started for hostname IotaWatt
6/04/23 08:33:57z LLMNR responder started for hostname IotaWatt
6/04/23 08:33:57z timeSync: service started.
6/04/23 08:33:57z statService: started.
6/04/23 08:33:57z Updater: service started. Auto-update class is MAJOR
6/04/23 08:33:57z dataLog: service started.
6/04/23 08:33:59z dataLog: Last log entry 06/03/23 22:08:10
6/04/23 08:33:59z historyLog: service started.
6/04/23 08:33:59z IotaLog: file damaged /iotawatt/histlog.log
6/04/23 08:33:59z IotaLog: Creating diagnostic file.
** Restart **
SD initialized.
6/04/23 08:39:02z Real Time Clock is running. Unix time 1685867942
6/04/23 08:39:02z Reset Reason: Power-fail restart.
6/04/23 08:39:02z ESP8266 ID: 6910659, RTC PCF8523 (68)
6/04/23 08:39:02z IoTaWatt 4.x, Firmware version 02_07_05
6/04/23 08:39:02z SPIFFS mounted.
6/04/23 08:39:02z Local time zone: +0:00
6/04/23 08:39:02z device name: IotaWatt
6/04/23 08:39:05z Connecting with WiFiManager.
6/04/23 08:39:08z HTTP server started
6/04/23 08:39:08z emoncms: Starting, interval:10, url:http://emoncms.org
6/04/23 08:39:08z influxDB_v2: Starting, interval:5, url:http://192.168.1.187:8086
6/04/23 08:39:08z WiFi connected. SSID=yngndrw, IP=192.168.1.130, channel=11, RSSI -62db
6/04/23 08:39:08z MDNS responder started for hostname IotaWatt
6/04/23 08:39:08z LLMNR responder started for hostname IotaWatt
6/04/23 08:39:08z timeSync: service started.
6/04/23 08:39:08z statService: started.
6/04/23 08:39:08z Updater: service started. Auto-update class is MAJOR
6/04/23 08:39:08z dataLog: service started.
6/04/23 08:39:10z dataLog: Last log entry 06/03/23 22:08:10
6/04/23 08:39:10z historyLog: service started.
6/04/23 08:39:10z historyLog: Last log entry 06/03/23 22:08:00
6/04/23 08:39:13z Annexe_And_Outbuildings: Started
6/04/23 08:39:13z Annexe_And_Outbuildings: Last log entry 06/03/23 22:08:10
6/04/23 08:39:13z Mains: Started
6/04/23 08:39:13z Mains: Last log entry 06/03/23 22:08:10
6/04/23 08:39:30z emoncms: Query failed -4
6/04/23 08:39:31z influxDB_v2: Resume posting 04/24/23 12:24:10
6/04/23 08:39:32z Updater: Auto-update is current for class MAJOR.
6/04/23 08:39:35z emoncms: stopped, Last post 01/01/70 00:00:00
(Notice the line: IotaLog: file damaged /iotawatt/histlog.log
)
Here’s the logdiag.txt:
1534537140,0,1534621680,1409
1534779180,4034,1534779180,4034
1534621800,1411,1534840680,5059
-1,-1,-1,-1
-1,-1,-1,-1
1534840860,5062,1534840920,5063
-1,-1,-1,-1
1534841040,5065,1534841160,5067
-1,-1,-1,-1
-1,-1,-1,-1
-1,-1,-1,-1
1534841400,5071,1534841640,5075
-1,-1,-1,-1
1534841760,5077,1534841880,5079
-1,-1,-1,-1
1534842000,5081,1534842360,5087
-1,-1,-1,-1
-1,-1,-1,-1
1534842540,5090,1534842840,5095
-1,-1,-1,-1
-1,-1,-1,-1
-1,-1,-1,-1
1534843080,5099,1534947960,6847
1534947960,6847,1534947960,6847
1534947960,6847,1534947960,6847
1534948140,6850,1534948440,6855
1534948440,6855,1534948440,6855
1534948560,6857,1534948560,6857
1534948560,6857,1534948560,6857
1534948560,6857,1534948560,6857
1534948740,6860,1534948740,6860
1534948740,6860,1534948740,6860
1534948740,6860,1534948740,6860
1534948740,6860,1534948740,6860
1534948740,6860,1534948740,6860
1534948740,6860,1534948740,6860
1534949100,6866,1534949160,6867
1534949160,6867,1534949160,6867
1534949160,6867,1534949160,6867
1534949340,6870,1534949340,6870
1534949340,6870,1534949340,6870
1534949460,6872,1535063160,8767
1675562567,2101521413,1675562567,2101521413
-419619746,485709326,-419619746,485709326
939126646,-635383972,939126646,-635383972
1674953954,-1053202714,1674953954,-1053202714
2023554401,-1408503608,2023554401,-1408503608
978931501,412967780,978931501,412967780
-2000364006,-826998137,-2000364006,-826998137
-1466239020,-2066662334,-1466239020,-2066662334
-1992038488,-413979274,-1992038488,-413979274
1535132880,9929,1535136120,9983
I’m presuming that the reason the EmonCMS upload failed was because the history file is now corrupt and that I have a bad (Or failing) SD card.
Interestingly, there’s now another issue that has cropped up in regular use.
The way I have it setup is that I have a Mains
and Annexe_And_Outbuildings
input (Amongst others) - The Mains
input is measured at the meter and the Annexe_And_Outbuildings
input includes both the annexe usage as well as the solar inverter.
I have an integrator for both Mains
and Annexe_And_Outbuildings
as both of these can go negative, and I have the following output:
Generated Watts = Annexe_And_Outbuildings.neg x -1
If I look at the status page, the Generated
value looks correct, however now when I look at the built-in graphs Generated
is always 0 for both Watts and WattHours. Annexe_And_Outbuildings
is correct for both Watts and WattHours on the graph.
Generated used to work just fine, but I’m wondering if the SD card has started to fail and is now affecting the integrators.
I should add that the plain inputs themselves are still recording without issue.
If this is likely to be the SD card and I need to purchase a replacement, please can you advise on a particular model. I don’t care about how much it costs, I’d rather get something which was more reliable even if it means a higher cost of replacement. Maybe a Sandisk Max Endurance 32GB
?