Rewrite electricity-logger to use an sqlite3 database

This commit is contained in:
2022-06-25 22:17:46 +02:00
parent 458d824dc8
commit 5b09b06bcf
62 changed files with 5937 additions and 3 deletions

12
script/solar/README.md Normal file
View File

@@ -0,0 +1,12 @@
# Scripts
This directory contains the following 2 scripts:
- `createdb.sh` is used to create the SQL database file used by the logger
- `migratedb.sh` is used to fill the newly created SQL database with the old file based logging content
The created database exists out of 3 rows, ignoring the `RowId` column:
- `DateTimeUtc` is an `INTEGER` and represents the UTC date and time in the Unix epoch format
- `Watts` is an `INTEGER` and represents the power output at the time of logging
- `KilowattHour` is a `REAL` and represents the cumulative power generated that day
Try running each script without any arguments for more help or read their source code.