From 19a9d5de2b09b65ce81b0d2aa43c0e4802492ad6 Mon Sep 17 00:00:00 2001 From: nikilase Date: Sat, 13 Jan 2024 15:46:31 +0100 Subject: [PATCH] Add License and Readme and change schedule time for aggregation back to 5 minutes --- LICENSE.md | 21 +++++++++++++++++++++ README.md | 15 +++++++++++++++ main.py | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 LICENSE.md create mode 100644 README.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..e80514e --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright © 2024 Niklas Eichenberg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ddfe59c --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Kostal API Requester App +Little app to get current power data from kostal solar inverter and send it to an influxdb v1 time series database. + +Also has the feature of calculating the daily amount of electricity sold to the grid or bought from the grid, +with the option to set how much money one kWh costs to buy or sell. + +## Installation +Make sure you have an influxdb (version 1) installed and configured your config/config_template.py saving the modified +template as config/config.py + +## Usage +By default, this app runs the data requester every 10 seconds and the aggregation every 5 minutes. +You can change this in the main.py file with the schedule.every() functions + +App was tested on Python 3.11 \ No newline at end of file diff --git a/main.py b/main.py index 1c1762e..303300b 100644 --- a/main.py +++ b/main.py @@ -10,7 +10,7 @@ def main(): schedule.every(10).seconds.do(k_m) - schedule.every(30).seconds.do(a_m) + schedule.every(5).minutes.do(a_m) try: while True: