commit 417030f61e2920383512ecc1cd8aa15a185f674b Author: KevinMidboe Date: Mon Nov 28 12:38:01 2022 +0100 Project requirements & README diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6b072 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +config.yaml diff --git a/README.md b/README.md new file mode 100644 index 0000000..fb8e089 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Schleppe UPS Consumption + +Pulls UPS power draw over ModBus and logs to ElasticSearch. + +## Install +Download repo: + +``` +bash git clone https://github.com/kevinmidboe/schleppeUPSConsumption +cd schleppeUPSConsumption +``` + +Install python requirements: + +```bash +pip3 install -r requirements.txt +``` + +## Configure +Create copy of config and edit follow values: + +```bash +cp config.yaml.default config.yaml +``` + +```yaml +logger: + name: schleppe_ups_consumption + ch_level: INFO + +modbus: + host: + port: + +elastic: + host: + port: + ssl: + apiKey: +``` + +## Run + +```bash +python3 apcWatts.py +``` diff --git a/config.yaml.default b/config.yaml.default new file mode 100644 index 0000000..2c25b60 --- /dev/null +++ b/config.yaml.default @@ -0,0 +1,14 @@ +logger: + name: schleppe_ups_consumption + ch_level: INFO + +modbus: + host: + port: + +elastic: + host: + port: + ssl: + apiKey: + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d7a3509 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +pyModbusTCP==0.1.10 +PyYAML==6.0