From 0daa79454f519b03a455082f8ed60e404ce27176 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sun, 13 Sep 2020 12:32:45 +0100 Subject: [PATCH] Add Readme --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a358448 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# energy-usage + +Realtime energy usage reporting from Bright MQTT feed (SEP) into InfluxDB/VictoriaMetrics. Can be installed and run via pip or docker. + +## Configuration + +Copy `config.yaml.example` to `config.yaml` and fill in your MQTT login details, and your influx/vm server details. +The config file should be placed into one of the following locations: + +* `/etc/energy-usage/config.yaml` +* `~/.config/energy-usage/config.yaml` +* Any dir pointed at by `ENERGY-USAGEDIR` env var + +## Pip usage + +### Installation + +pip install energy-usage + +### Run + +```bash +energy-usage [--debug] [--noop] +``` + +* `--debug` enables verbose output about what the script is doing +* `--noop` mode will retrieve stats from mqtt, and show you what would be published to influx but does not actually send anything + +## Docker usage + +### Build + +```bash +docker build -t energy-usage:latest . +``` + +### Run + +```bash +docker run -v config.yaml:/etc/energy-usage/config.yaml energy-usage:latest +``` + +## Tested with: + +* Python 3 +* VictoriaMetrics 1.40 +* Docker 19.03.05 +* Nomad 0.12.4