2022-05-25 22:09:35 +01:00
2022-05-25 22:09:35 +01:00
2022-05-25 20:32:45 +01:00
2022-05-25 20:32:45 +01:00
2022-05-25 22:09:35 +01:00
2020-09-06 15:43:51 +01:00
2020-09-06 15:44:00 +01:00
2020-09-13 12:34:14 +01:00
2020-09-13 13:01:09 +01:00
2020-09-06 00:24:36 +01:00
2021-06-13 20:44:06 +01:00

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

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

docker build -t energy-usage:latest .

Run

docker run -v config.yaml:/etc/energy-usage/config.yaml energy-usage:latest

Grafana

grafana.energy-usage.json contains an example Grafana dashboard which consumes this data (using the prometheus query interface of VictoriaMetrics).

Grafana dashboard screenshot

Upon import of the dashboard, you will be prompted to select your datasource, and enter your unit and standing charges. These are used to plot the costs of realtime usage data, and the daily/weekly/monthly consumption using accumulated usage statistics by the meters. The dashboard does not currently use live tarrif data, as this is not provided in the Bright MQTT feed.

Tested with:

  • Python 3
  • VictoriaMetrics 1.40
  • Docker 19.03.05
  • Nomad 0.12.4
Description
No description provided
Readme MIT 328 KiB
Languages
Python 98.3%
Dockerfile 1.7%