Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a67298263e | ||
|
|
d0a44b902c | ||
|
|
08f54e55ce | ||
|
|
0daa79454f |
11
CHANGELOG.md
Normal file
11
CHANGELOG.md
Normal 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
21
LICENSE
Normal 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
48
README.md
Normal 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
|
||||
Reference in New Issue
Block a user