Hi
I had a corrupted iotalog file (after 2 years of use) on an SD card so I have formatted a new one, 8GB FAT32 using the SD Card Formatter (labelled IOTADATA) and then copied the SD card files from github (unchanged). But I still end up with red-red-red
For some reason the iotawatt/iotalog file is not being created as I have read on various posts here that it should be in this situation. I have tried many of the things that are suggested in posts but to no avail. Actually I have tried this with 2 SD cards and a few more tests but all with the same result.
On very first boot, here is the serial capture (thanks to PuTTY)…
SPI started.
** Restart **
SD initialized.
3/16/20 03:36:47z Real Time Clock is running. Unix time 1584329807
3/16/20 03:36:47z Reset reason: External System
3/16/20 03:36:47z Trace: 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 11:0, 11:4, 11:5, 11:5, 11:6, 11:7, 11:8, 11:9, 16:0, 11:10, 11:11, 11:12
3/16/20 03:36:47z ESP8266 ChipID: 6991551
3/16/20 03:36:47z IoTaWatt 4.x, Firmware version 02_05_04
3/16/20 03:36:47z SPIFFS mounted.
3/16/20 03:36:47z Local time zone: +0:00
3/16/20 03:36:47z device name: IotaWatt
3/16/20 03:36:47z LLMNR responder started for hostname IotaWatt
3/16/20 03:36:47z HTTP server started
3/16/20 03:36:47z timeSync: service started.
3/16/20 03:36:47z statService: started.
3/16/20 03:36:47z dataLog: service started.
mkdir failed: iotawatt
3/16/20 03:36:47z dataLog: Log file open failed. 2
3/16/20 03:36:47z Program halted.
Once I take the SD card and place it back into my Laptop, I can see that the iotawatt directory has been created but not the log file…
D:\>tree /F /A
Folder PATH listing for volume IOTA-DATA
Volume serial number is 6F73-96A8
D:.
| cnfstyle.css
| config.txt
| edit.htm
| graph.htm
| graph.js
| graph2.htm
| graph2.js
| index.htm
| tables.txt
|
\---iotawatt
iotamsgs.txt
Here is the content of the iotamsgs.txt file.
** Restart **
SD initialized.
3/16/20 03:36:45z Real Time Clock is running. Unix time 1584329805
3/16/20 03:36:45z Power failure detected.
3/16/20 03:36:45z Reset reason: External System
3/16/20 03:36:45z ESP8266 ChipID: 6991551
3/16/20 03:36:45z IoTaWatt 4.x, Firmware version 02_05_04
3/16/20 03:36:45z SPIFFS mounted.
3/16/20 03:36:45z Local time zone: +0:00
3/16/20 03:36:45z device name: IotaWatt
** Restart **
SD initialized.
3/16/20 03:36:47z Real Time Clock is running. Unix time 1584329807
3/16/20 03:36:47z Reset reason: External System
3/16/20 03:36:47z Trace: 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 0:0, 11:0, 11:4, 11:5, 11:5, 11:6, 11:7, 11:8, 11:9, 16:0, 11:10, 11:11, 11:12
3/16/20 03:36:47z ESP8266 ChipID: 6991551
3/16/20 03:36:47z IoTaWatt 4.x, Firmware version 02_05_04
3/16/20 03:36:47z SPIFFS mounted.
3/16/20 03:36:47z Local time zone: +0:00
3/16/20 03:36:47z device name: IotaWatt
3/16/20 03:36:47z LLMNR responder started for hostname IotaWatt
3/16/20 03:36:47z HTTP server started
3/16/20 03:36:47z timeSync: service started.
3/16/20 03:36:47z statService: started.
3/16/20 03:36:47z dataLog: service started.
3/16/20 03:36:47z dataLog: Log file open failed. 2
3/16/20 03:36:47z Program halted.
Now that I know that the iotawatt directory has actually been created - I tried to boot the device again…
Here is the Serial Output for attempt number 2
SPI started.
** Restart **
SD initialized.
3/16/20 07:30:47z Real Time Clock is running. Unix time 1584343847
3/16/20 07:30:47z Reset reason: External System
3/16/20 07:30:47z Trace: 8:2, 8:2, 1:2, 1:3, 1:4, 1:5[18], 18:0, 18:1, 1:6, 1:1 , 1:2, 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:4, 1:5[5], 5:0, 5:1, 1:6, 1:1, 1:2, 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:4, 1:5[19]
3/16/20 07:30:47z ESP8266 ChipID: 6991551
3/16/20 07:30:47z IoTaWatt 4.x, Firmware version 02_05_04
3/16/20 07:30:47z SPIFFS mounted.
3/16/20 07:30:47z Local time zone: +0:00
3/16/20 07:30:47z device name: IotaWatt
3/16/20 07:30:47z HTTP server started
3/16/20 07:30:47z timeSync: service started.
3/16/20 07:30:47z statService: started.
3/16/20 07:30:47z dataLog: service started.
mkdir failed: iotawatt
3/16/20 07:30:47z dataLog: Log file open failed. 2
3/16/20 07:30:47z Program halted.
The following has been appended to the iotamsg log (with the above content at the head of the file). This time the Wifi connects but ultimately it fails as it cannot find the
** Restart **
SD initialized.
3/16/20 07:30:38z Real Time Clock is running. Unix time 1584343838
3/16/20 07:30:38z Power failure detected.
3/16/20 07:30:38z Reset reason: External System
3/16/20 07:30:38z ESP8266 ChipID: 6991551
3/16/20 07:30:38z IoTaWatt 4.x, Firmware version 02_05_04
3/16/20 07:30:38z SPIFFS mounted.
3/16/20 07:30:38z Local time zone: +0:00
3/16/20 07:30:38z device name: IotaWatt
3/16/20 07:30:41z MDNS responder started for hostname IotaWatt
3/16/20 07:30:41z LLMNR responder started for hostname IotaWatt
3/16/20 07:30:41z HTTP server started
3/16/20 07:30:41z WiFi connected. SSID=NFC, IP=192.168.0.103, channel=5, RSSI -58db
3/16/20 07:30:41z timeSync: service started.
3/16/20 07:30:42z statService: started.
3/16/20 07:30:42z Updater: service started. Auto-update class is MINOR
3/16/20 07:30:42z dataLog: service started.
3/16/20 07:30:42z dataLog: Log file open failed. 2
3/16/20 07:30:42z Program halted.
** Restart **
SD initialized.
3/16/20 07:30:47z Real Time Clock is running. Unix time 1584343847
3/16/20 07:30:47z Reset reason: External System
3/16/20 07:30:47z Trace: 8:2, 8:2, 1:2, 1:3, 1:4, 1:5[18], 18:0, 18:1, 1:6, 1:1, 1:2, 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:4, 1:5[5], 5:0, 5:1, 1:6, 1:1, 1:2, 9:0, 9:0, 8:2, 8:2, 1:2, 1:3, 1:4, 1:5[19]
3/16/20 07:30:47z ESP8266 ChipID: 6991551
3/16/20 07:30:47z IoTaWatt 4.x, Firmware version 02_05_04
3/16/20 07:30:47z SPIFFS mounted.
3/16/20 07:30:47z Local time zone: +0:00
3/16/20 07:30:47z device name: IotaWatt
3/16/20 07:30:47z HTTP server started
3/16/20 07:30:47z timeSync: service started.
3/16/20 07:30:47z statService: started.
3/16/20 07:30:47z dataLog: service started.
3/16/20 07:30:47z dataLog: Log file open failed. 2
3/16/20 07:30:47z Program halted.
So I am at a bit of road block as to how the log file gets created in this situation.