Setting Up Raspberry Pi

Got a Raspberry Pi for Christmas and am in the process of setting it up with InfluxDB. I got Influx up and running and created a database called PiIotaWatt. I’m having a similar problem to the one here. When I start the uploader in IotaWatt, instead of using the “upload history from” date (09/27/2020) on the uploader configuration page, it jumps to 1/3/2021. I dropped the database and tried again with the same results. What am I missing?

Can you post the message log and the status page with the statistics tab expended?

Status Page:

Message Log:

10/13/21 15:35:47 influxDB_v1: Start posting at 10/12/21 23:00:20
10/13/21 22:43:40 influxDB_v1: stopped, Last post 10/13/21 22:43:20
10/14/21 17:04:09 influxDB_v1: Start posting at 10/13/21 22:43:30
10/14/21 23:10:00 influxDB_v1: stopped, Last post 10/14/21 23:09:00
10/15/21 15:57:50 influxDB_v1: Start posting at 10/14/21 23:09:10
10/16/21 00:59:53 influxDB_v1: stopped, Last post 10/16/21 00:59:10
10/16/21 13:34:45 influxDB_v1: Start posting at 10/16/21 00:59:20
10/16/21 23:18:29 influxDB_v1: stopped, Last post 10/16/21 23:17:50

** Restart **

SD initialized.
10/17/21 19:35:50z Real Time Clock is running. Unix time 1634499350
10/17/21 19:35:50z Power failure detected.
10/17/21 19:35:50z Reset reason: External System
10/17/21 19:35:50z ESP8266 ChipID: 6195317
10/17/21 19:35:50z IoTaWatt 5.0, Firmware version 02_06_05
10/17/21 19:35:50z SPIFFS mounted.
10/17/21 15:35:50 Local time zone: -5:00
10/17/21 15:35:50 Using Daylight Saving Time (BST) when in effect.
10/17/21 15:35:50 device name: IotaWatt
10/17/21 15:35:53 Connecting with WiFiManager.
10/17/21 15:35:56 HTTP server started
10/17/21 15:35:56 influxDB_v1: Starting, interval:10, url:http://192.168.1.64:8086
10/17/21 15:35:56 WiFi connected. SSID=ATT6AbiV3A, IP=192.168.1.100, channel=6, RSSI -64db
10/17/21 15:35:56 MDNS responder started for hostname IotaWatt
10/17/21 15:35:56 LLMNR responder started for hostname IotaWatt
10/17/21 15:35:56 timeSync: service started.
10/17/21 15:35:56 statService: started.
10/17/21 15:35:56 Updater: service started. Auto-update class is MINOR
10/17/21 15:35:56 dataLog: service started.
10/17/21 15:35:58 dataLog: Last log entry 10/17/21 15:35:45
10/17/21 15:36:01 historyLog: service started.
10/17/21 15:36:01 historyLog: Last log entry 10/17/21 15:35:00
10/17/21 15:36:27 influxDB_v1: stopped, Last post 02/06/06 01:28:16
10/17/21 15:36:29 Updater: Auto-update is current for class MINOR.
10/17/21 16:46:11 influxDB_v1: Start posting at 10/16/21 23:18:00
10/17/21 23:07:36 influxDB_v1: stopped, Last post 10/17/21 23:07:10
10/18/21 10:14:58 influxDB_v1: Start posting at 10/17/21 23:07:20
10/19/21 00:59:30 influxDB_v1: stopped, Last post 10/19/21 00:58:20
10/19/21 19:30:07 influxDB_v1: Start posting at 10/19/21 00:58:30
10/20/21 23:13:08 influxDB_v1: stopped, Last post 10/20/21 23:12:00
10/21/21 16:32:45 influxDB_v1: Start posting at 10/20/21 23:12:10
10/21/21 23:32:03 influxDB_v1: stopped, Last post 10/21/21 23:31:30
10/22/21 14:10:26 influxDB_v1: Start posting at 10/21/21 23:31:40
10/22/21 23:54:56 influxDB_v1: stopped, Last post 10/22/21 23:54:30
10/23/21 13:30:19 influxDB_v1: Start posting at 10/22/21 23:54:40
10/24/21 00:10:42 influxDB_v1: stopped, Last post 10/24/21 00:10:30
10/24/21 15:25:55 influxDB_v1: Start posting at 10/24/21 00:10:40
10/25/21 00:25:45 influxDB_v1: stopped, Last post 10/25/21 00:24:50
10/25/21 12:25:41 influxDB_v1: Start posting at 10/25/21 00:25:00
10/25/21 15:59:22 influxDB_v1: stopped, Last post 10/25/21 15:58:30
10/26/21 00:59:44 influxDB_v1: Start posting at 10/25/21 15:58:40
10/27/21 00:01:38 influxDB_v1: stopped, Last post 10/27/21 00:00:40
10/27/21 14:22:45 influxDB_v1: Start posting at 10/27/21 00:00:50
10/27/21 23:09:10 influxDB_v1: stopped, Last post 10/27/21 23:08:30
10/28/21 15:28:11 influxDB_v1: Start posting at 10/27/21 23:08:40
10/28/21 23:33:18 influxDB_v1: stopped, Last post 10/28/21 23:32:50
10/29/21 15:56:04 influxDB_v1: Start posting at 10/28/21 23:33:00
10/30/21 00:43:46 influxDB_v1: stopped, Last post 10/30/21 00:43:10
10/30/21 15:56:30 influxDB_v1: Start posting at 10/30/21 00:43:20
10/30/21 23:49:11 influxDB_v1: stopped, Last post 10/30/21 23:48:10
11/01/21 13:58:05 influxDB_v1: Start posting at 10/30/21 23:48:20
11/02/21 14:04:39 influxDB_v1: stopped, Last post 11/02/21 14:04:20
11/02/21 15:04:59 influxDB_v1: Start posting at 11/02/21 14:04:30
11/03/21 00:35:30 influxDB_v1: stopped, Last post 11/03/21 00:34:20
11/04/21 00:11:31 influxDB_v1: Start posting at 11/03/21 00:34:30
11/04/21 01:21:58 influxDB_v1: stopped, Last post 11/04/21 01:21:10
11/04/21 18:45:39 influxDB_v1: Start posting at 11/04/21 01:21:20
11/05/21 00:11:35 influxDB_v1: stopped, Last post 11/05/21 00:11:00
11/05/21 09:25:50 Updater: Update from 02_06_05 to 02_06_06
11/05/21 09:25:50 Updater: download 02_06_06
11/05/21 09:25:57 Updater: Release downloaded 6995ms, size 900176
11/05/21 09:26:03 Updater: signature verified
11/05/21 09:26:10 Updater: firmware upgraded to version 02_06_06
11/05/21 09:26:10 Updater: Firmware updated, restarting.

** Restart **

SD initialized.
11/05/21 13:26:20z Real Time Clock is running. Unix time 1636118780
11/05/21 13:26:20z Reset reason: Software/System restart
11/05/21 13:26:20z Trace: 1:6[1], 1:6[2], 1:6[3], 1:5[31], 1:6[4], 31:0, 31:1, 31:2[8], 31:5, 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[5], 1:6[4], 5:0, 5:7
11/05/21 13:26:20z ESP8266 ID: 6195317, RTC PCF8523
11/05/21 13:26:20z IoTaWatt 5.0, Firmware version 02_06_06
11/05/21 13:26:20z Updater: Installing update files for version 02_06_06
11/05/21 13:26:20z Updater: Installing FAVICON.ICO
11/05/21 13:26:20z Updater: Installing GRAPH.HTM
11/05/21 13:26:20z Updater: Installing GRAPH.JS
11/05/21 13:26:20z Updater: Installing GRAPH2.HTM
11/05/21 13:26:21z Updater: Installing GRAPH2.JS
11/05/21 13:26:21z Updater: Installing INDEX.HTM
11/05/21 13:26:21z Updater: Installing TABLES.TXT
11/05/21 13:26:21z Updater: Installing CNFSTYLE.CSS
11/05/21 13:26:21z Updater: Installing EDIT.HTM
11/05/21 13:26:21z Updater: Installation complete.
11/05/21 13:26:22z SPIFFS mounted.
11/05/21 09:26:22 Local time zone: -5:00, using DST/BST when in effect.
11/05/21 09:26:22 device name: IotaWatt
11/05/21 09:26:22 HTTP server started
11/05/21 09:26:22 influxDB_v1: Starting, interval:10, url:http://192.168.1.64:8086
11/05/21 09:26:22 timeSync: service started.
11/05/21 09:26:22 statService: started.
11/05/21 09:26:22 dataLog: service started.
11/05/21 09:26:24 dataLog: Last log entry 11/05/21 09:25:55
11/05/21 09:26:27 historyLog: service started.
11/05/21 09:26:27 historyLog: Last log entry 11/05/21 09:25:00
11/05/21 09:26:27 WiFi connected. SSID=ATT6AbiV3A, IP=192.168.1.100, channel=6, RSSI -62db
11/05/21 09:26:27 MDNS responder started for hostname IotaWatt
11/05/21 09:26:27 LLMNR responder started for hostname IotaWatt
11/05/21 09:26:27 Updater: service started. Auto-update class is MINOR
11/05/21 09:26:58 influxDB_v1: stopped, Last post 02/06/06 01:28:16
11/05/21 09:27:00 Updater: Auto-update is current for class MINOR.
11/05/21 12:47:37 influxDB_v1: Start posting at 11/05/21 00:11:10
11/06/21 06:29:10 Table file parse failed.
11/06/21 07:29:16 Updater: update tables from invalid to 0.0.3
11/10/21 15:12:38 influxDB_v1: stopped, Last post 11/10/21 02:54:40
11/10/21 15:13:40 influxDB_v1: Start posting at 11/10/21 02:54:50
11/17/21 12:00:10 Table file parse failed.
11/17/21 13:00:16 Updater: update tables from invalid to 0.0.3
11/19/21 13:05:08 Updater: update tables from 0.0.3 to 0.0.4
11/19/21 14:05:14 Updater: update tables from 0.0.3 to 0.0.4
11/19/21 15:05:20 Updater: update tables from 0.0.3 to 0.0.4
11/19/21 16:05:26 Updater: update tables from 0.0.3 to 0.0.4
12/04/21 17:41:51 Table file parse failed.
12/04/21 18:41:57 Updater: update tables from invalid to 0.0.4
12/04/21 19:42:03 Table file parse failed.
12/04/21 20:42:09 Updater: update tables from invalid to 0.0.4
12/07/21 00:20:42 WiFi disconnected.
12/07/21 00:20:48 WiFi connected. SSID=ATT6AbiV3A, IP=169.254.0.2, channel=6, RSSI -85db
12/07/21 00:22:40 WiFi disconnected.
12/07/21 00:22:44 WiFi connected. SSID=ATT6AbiV3A, IP=169.254.0.2, channel=6, RSSI -63db
12/08/21 02:54:16 Table file parse failed.
12/08/21 03:54:23 Updater: update tables from invalid to 0.0.4
12/17/21 08:28:33 timeSync: Six week routine restart.

** Restart **

SD initialized.
12/17/21 13:28:35z Real Time Clock is running. Unix time 1639747715
12/17/21 13:28:35z Reset reason: Software/System restart
12/17/21 13:28:35z Trace: 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:3, 1:1[3], 1:2[4], 9:0[4], 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[2], 1:6[2], 1:6[2], 1:6[2], 1:6[3], 1:5[20], 1:6[4], 20:0, 20:1
12/17/21 13:28:35z ESP8266 ID: 6195317, RTC PCF8523
12/17/21 13:28:35z IoTaWatt 5.0, Firmware version 02_06_06
12/17/21 13:28:35z SPIFFS mounted.
12/17/21 08:28:35 Local time zone: -5:00, using DST/BST when in effect.
12/17/21 08:28:35 device name: IotaWatt
12/17/21 08:28:35 HTTP server started
12/17/21 08:28:35 influxDB_v1: Starting, interval:10, url:http://192.168.1.64:8086
12/17/21 08:28:35 timeSync: service started.
12/17/21 08:28:35 statService: started.
12/17/21 08:28:35 dataLog: service started.
12/17/21 08:28:37 dataLog: Last log entry 12/17/21 08:28:30
12/17/21 08:28:40 historyLog: service started.
12/17/21 08:28:40 historyLog: Last log entry 12/17/21 08:28:00
12/17/21 08:28:40 WiFi connected. SSID=ATT6AbiV3A, IP=192.168.1.100, channel=6, RSSI -58db
12/17/21 08:28:40 MDNS responder started for hostname IotaWatt
12/17/21 08:28:40 LLMNR responder started for hostname IotaWatt
12/17/21 08:28:40 Updater: service started. Auto-update class is MINOR
12/17/21 08:29:13 Updater: Auto-update is current for class MINOR.
12/21/21 19:55:34 Table file parse failed.
12/21/21 20:55:40 Updater: update tables from invalid to 0.0.4
12/25/21 20:45:29 influxDB_v1: Start posting at 12/07/21 00:19:40
1/03/22 19:22:44 influxDB_v1: stopped, Last post 01/03/22 19:22:00
1/03/22 19:24:20 influxDB_v1: Start posting at 01/03/21 19:24:30
1/03/22 19:32:58 influxDB_v1: stopped, Last post 01/04/21 19:40:20
1/03/22 19:40:57 influxDB_v1: Start posting at 01/03/21 19:41:10
1/03/22 19:41:07 influxDB_v1: stopped, Last post 01/03/21 20:03:30

OK, couple of things here:

Prior to setting this switch, your IoTaWatt appears to have stopped posting on Pearl Harbor Day. You apparently started it back up on Christmas and it chugged to upload the missing 2+ weeks of data.

You appear to have then stopped the upload an hour or two ago and presumably switched to the new influx instance. When you restarted, it began at 1/3/21. That’s because you can only upload from the most recent year’s data in the current log. The history log does not have 10 second data.

The way to preserve your older data is to use the influx backup/restore tools to copy your influx database to the new server. Then restart the IoTaWatt upload and it should pick up where it left off with the old server on 01/03/22 19:22:00.

That sounds about right. The notebook PC that I originally set up with InfluxDB has a habit of dropping it’s network connection. It usually doesn’t take long for me to reset it but this time it ran that way for a couple of weeks before I reconnected it to the network. I stopped the database earlier today to reset the connection to the Pi server. That’s the first stop at 19:22. I restarted it after the changes were complete at 19:24 when it started uploading the data from Jan 2021. I stopped it again at 19:40, dropped and recreated the database, and restarted it at 19:41. My question is why would it start the upload from Jan 2021? Note that the times of both restarts are different as well.

I will take your advice and see if I can port a data backup to the Raspberry Pi. Hopefully that will take care of the issue.

Because that’s the earliest time that you have current log data.

Notice that your current log has one year’s data. It is full and has wrapped so that as you add new entries it overwrites the oldest. Watch it for more than 5 seconds and you will see the start time advance as the end time advances.

When you started it at 19:24:20, the first entry would have been 19:24:30, so that’s where it started the upload.

It had uploaded about a day’s worth of data when you stopped it 10 minutes later and dropped the database. Then when you restarted at 19:40:57 the first entry in the current log would have been 19:41:10.

If nothing else it will orders of magnitude faster.

I guess that begs another question. If the original InfluxDB somehow got corrupt and was unusable, I would not be able to completely rebuild the database from the IotaWatt? If I’m understanding what your saying, I can only download data to InflluxDB as far back as logs go, even though the data is still in the IotaWatt database.

The history log only has 60 second resolution. Your influx is 10 second resolution. More importantly, you have the ability to backup influx annually to avoid that scenario.