4 Commits
0.2 ... 0.3

Author SHA1 Message Date
Ben Roberts
a67298263e Add changelog 2020-09-13 12:37:02 +01:00
Ben Roberts
d0a44b902c Merge pull request #1 from optiz0r/add-license-1
Add LICENSE
2020-09-13 12:34:28 +01:00
Ben Roberts
08f54e55ce Add LICENSE 2020-09-13 12:34:14 +01:00
Ben Roberts
0daa79454f Add Readme 2020-09-13 12:32:45 +01:00
3 changed files with 80 additions and 0 deletions

11
CHANGELOG.md Normal file
View File

@@ -0,0 +1,11 @@
# Changelog
## v0.2 (2020-09-06)
Bug fixes:
* Fixed packaging of `config_default.yaml`
## v0.1 (2020-09-06)
* Initial version

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020 Ben Roberts
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.

48
README.md Normal file
View File

@@ -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