From 417030f61e2920383512ecc1cd8aa15a185f674b Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Mon, 28 Nov 2022 12:38:01 +0100 Subject: [PATCH] Project requirements & README --- .gitignore | 1 + README.md | 46 +++++++++++++++++++++++++++++++++++++++++++++ config.yaml.default | 14 ++++++++++++++ requirements.txt | 2 ++ 4 files changed, 63 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 config.yaml.default create mode 100644 requirements.txt 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