Add envoy support to solar logger

This commit is contained in:
2022-08-15 13:14:16 +02:00
parent 642170172a
commit 35e6ec08d7
16 changed files with 355 additions and 309 deletions

View File

@@ -1,37 +0,0 @@
# The electricity-server REST API
This project depends on the `pistache` HTTP framework, see their [website](http://pistache.io/) for more info.
## Endpoints
All endpoints respond in JSON. Examples can be found in the Examples section. Dates are always in ISO format, meaning they take the shape of `year-month-day` with leading zeroes for month and day. Example: `2019-01-11` is the eleventh day of January, 2019.
- `/day?start=[yyyy-MM-dd]` This tells the server what date to serve all the collected records from the specified day.
- `/day?start=[yyyy-MM-dd]&stop=[yyyy-MM-dd]` This tells the server what date range to serve a per day summary for.
### Example Response /day?start=2020-01-10
Will give you as many objects as there are recorded values for the 10th of January, 2020. Ordered from earliest to latest. If there are no records for the given day an empty array is returned.
```json
[
{
"dateTime":1578614401,
"totalPowerUse":3282.95,
"totalPowerReturn":2790.88,
"totalGasUse":3769.23
},
...
]
```
### Example Response /day?start=2020-01-01&stop=2020-01-19
Will give you a summary for each recorded day in the range 1st of January 2020 to the 19th of January 2020. If no logs exist for the day on the server it will send an object with a valid dateTime for that day but with 0 values for the other fields.
```json
[
{
"dateTime":1578614401,
"totalPowerUse": 8.324,
"totalPowerReturn": 3.62,
"totalGasUse": 11.05
},
...
]
```

View File

@@ -1,22 +0,0 @@
# About
This software targets linux and has been tested on both x86_64 and armv7 hardware.
## solar-logger
Simple data collecting program for ZeverSolar's Zeverlution Sxxxx "smart" inverters with a network interface (referred to as "combox" by the manufacturer). It collects all the exposed data of the Zeverlution, including current power generation (watts) and today's cummulative power production (kilowatt/hours).
### Strange output
Zeverlution Smart Inverters currently have a bug that causes leading zeroes in a decimal number to be ignored. Concretely this means that the value 0.01 becomes 0.10, 3.09 becomes 3.9, etcetera. This is causing strange peaks in the logged data where sequences go from 2.80 to 2.90 to 2.10.
Another bug is the inverter turning itself off and back on again throughout the day. This happens if the yield get too low. This will cause the cumulative power to reset to zero (kilowatt per hour).
# Building
## Dependencies
### solar-logger
Dependencies for this program are:
- `libcurl` which can be installed using your package manager. It has been tested with the `openSSL` flavour, libcurl version 4.
- `sqlite3` which is sometimes also referred to as `libsqlite3-dev`.
## Building
The logger program can be build by running the makefile (`make all`) in the project root. It will create a `bin` folder where it puts the newly created binaries. Move these to wherever you keep your binaries or use the `install` make target.
Refer to the `--help` switch to find out more about supported launch parameters.