[APP] Octopus Energy Integration

Developing Octopus Integration App

I have been a use of Homey for about 6 months now. My main focus is automating energy management in my house. My energy supplier is Octopus - currently it seems to be largely unsupported by the Homey ecosystem.

I have been developing code to automate the collection of energy data for consolidation in Google Sheets for some time. I have taken that code and used it as the basis for implementing my very first Homey App code.

I now have basic automation working for the Octopus Mini device. The data provided is live, though access to the api is throttled (by Octopus) to about 100 requests per hour, so I have a chosen a 1 minute polling rate - this allows other requests to the API in addition to the “live” polling of Octopus Mini.

The Octopus Mini device:

The insights available:

The code is so new that I am only running the app in debug mode. I also have a number of restrictions on how I can research the API and its use. In particular:

  • There is no gas supply to the property so I can’t test access to gas meter data;
  • Only two tariff types apply to the property so I can’t evaluate the use of other tariff types
  • I have no experience using Github, so that’s going to be a learning curve for sharing the code

If anybody is interested in collaborating to develop the app further it will be great to work with you.

Current Functionality

  • Octopus Mini live monitoring only

Functionality In Development

  • Half-hourly monitoring of data on "standard meters" (mediated by the Octopus Mini api)

Planned Functionality

  • Tariff "devices" to monitor consumption by price-band and measure efficiency of tariff use
  • Bill "device" to estimate and predict cost of consumption in invoice periods
  • Internationalisation (of course)

Flow Cards

  • Haven't even thought about these yet :rofl:
2 Likes

Nice! Ive wanted to get octopus energy data into homey since i switched from HA.

Tried various scripts posted on here but non i could get to work.

What tariff are you on ? Im tracker gas and electric with a mini.

I have Cosy Octopus (for Heatpump) and Outgoing Variable for the solar PV export…

The access to the Octopus Mini via the GraphQL interface is quite complex to work through. I have been using several distinct technologies to help. Octopus provide their own GraphiQL site where you can test GraphQL queries against their schema and data.

The data returned is not necessarily in a form that is directly usable with Homey. So I have been using JSONATA to query, manipulate and transform the JSON data returned by both the GraphQL and REST api. Just getting to grips with the way to use GraphQL is a bit of a learning curve.

Given this complexity, I reckon that getting anything useful out of a simple script would be a bit of a challenge.