Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

mikeewhite/octopus-energy-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐙 Octopus Energy Dashboard

Prototype dashboard for viewing electricity usage consumed from the Octopus Energy API using Golang (for data collection), InfluxDB (for data storage), and Grafana (for visualization).

Usage

  1. Create a .env file in the root directory with the following content:
# Octopus energy config (get your values from https://octopus.energy/dashboard/developer/)
OCTOPUS_ENERGY_API_KEY=<YOUR-API-KEY>
ELECTRICITY_METER_MPAN=<YOUR-MPAN-NUMBER>
ELECTRICITY_METER_SERIAL_NUMBER=<YOUR-SERIAL-NUMBER>

# InfluxDB config
INFLUXDB_USERNAME=admin
INFLUXDB_PASSWORD=admin1234
INFLUXDB_TOKEN=O-mfkVnkRYlueeyffw8q0T_K2Cf4TJMtFGlZaZoFxG-v80ZhvWSGZyJwMaRrIAIHWtA6pZ_bDQCwTvApccFcVw==
  1. Start the dashboard with:
docker-compose up -d
  1. Run main.go to collect data.

  2. Create DBRP mappings:

docker-compose exec influxdb bash
influx bucket list # to determine ID of 'consumption bucket' - see https://docs.influxdata.com/influxdb/v2.1/organizations/buckets/view-buckets
influx v1 dbrp create --db consumption --rp infinite --bucket-id <bucket-id> --default
  1. Visit http://localhost:3001 and navigate to 'Consumption (InfluxQL)' dashboard.

About

Prototype dashboard for viewing electricity usage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages