Announcing Pre-Release Octopus Energy Plugin

Posted on
Mon Apr 20, 2020 2:03 pm
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Announcing Pre-Release Octopus Energy Plugin

A plugin that connects to the UK Energy Provider Octopus Energy & their Agile Tariff

Octopus Energy is a UK Energy Supplier that offers a number of Tariff's that appeal to Electric Vehicle (EV) owners, as well as those who may be able to shape their consumption by managing demand through home automation. This plugin was initially built to asses the viability of the Agile Tariff for my personal use. You will find more information at https://octopus.energy as well as their API (which this plugin uses) at https://developer.octopus.energy/docs/api/

The Agile Tariff is especially interesting as it offers a new electricity rate every 30 minutes, based on the then current wholesale rate for that 30 minute period. This "Plunge Pricing" results in a much lower kWh price for electricity for times outside of the 16:00 to 19:00 peak. You carry the risk if the price is higher during this period, but get the benefit when it falls lower. A price cap applies of 35p per kWh, and for example the average today is 5.292p. the minimum 1.764p and the maximum 19.656p. This compares with the fixed rate from my current supplier which is 15.4p. and again for today apart from 3 Hours the Agile rate would be below what I currently pay.

The really interesting thing is that this can also result in negative pricing, typically at times for example when it is windy but during a period of low demand (UK has a reasonable amount of wind turbine capacity). At these times they will actually pay you to consume energy, these are relatively rare but it does mean you can charge you EV to store what will still be very cheap energy, even when the price is not negative. I will be using this to trigger charging my EV, using another plugin that can start and stop charging (Indigo has plugin's for a number of EV's, including in my case an I-Pace).

The plugin does not require you to make a switch to Octopus, to use it you can simply enter your postcode as the prices vary by region in the UK. The plugin will create a device that will show the current kWh price for you location, the daily standing charge, the maximum, minimum and average rates. All these device states can be graphed if you use one of the graphing plugins, you can trigger based on those values or thresholds. If you can measure your whole house demand (even manually using your smart meter in House display) you can project your savings.

This is a very early version, I have to optimise the update procedure as it is currently making too many API calls but this does not present a problem but is inelegant (the API is not throttled and the call rate is not excessive). I intend to switch when I can in the current situation, and I will then incorporate the consumption data. My goal with this will be to track actual historical cost for each 30 minute period, this will only be possible for the previous 24 Hours as Octopus do not publish consumption data real time. This would be possible now if you have a energy monitor, but I do not. The plugin has the configuration UI to enter your API Key, and for future logging capabilites. These are not currently used, only your Postcode. Error detection is limited, so please use this at your own risk and consider it a alpha version.

Comments and feedback extremely welcome, I am also issue tracking in the GitHub repository. Once I am happy I will push to the plugin store.

Documentation at https://github.com/neilkplugins/Octopus ... lugin/wiki

When I do switch I will share my referal code here, and we could both get a £50 credit should you choose to switch to Octopus. Any I get will be donated to the Children's Oncology Suites at the Royal Berkshire Hospital's Lion Ward.

Posted on
Sun Apr 26, 2020 5:23 am
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Announcing Pre-Release Octopus Energy Plugin

I have now published the second alpha version that optimises the hits to the Octopus API and also the device updates for the Indigo Server

https://github.com/neilkplugins/Octopus_Energy-indigo-plugin/releases/tag/0.0.2-alpha

I suspect this is for an audience of one right now, and once I have figured out the right approach to device creation this should be ready to publish to the plugin store. Out of interest below is a snapshot of the rates on the 21st.

IMG_1104.jpg
IMG_1104.jpg (317.34 KiB) Viewed 4249 times


For most of the day you would have been paid around 3p a kWh for electricity in my area ( a combination of good solar by UK standards, good wind and of course negligible industrial demand)

My Smart Meter is now working so I may be able to switch to this soon, and implement the consumption side of this plugin, but remember for now you can simply use it to show what the rates would be, without needing to make any changes. It also works well with Dave's excellent MatPlot Lib Plugin (other great plotting plugins are available).

Neil

Posted on
Sun Apr 26, 2020 2:18 pm
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Announcing Pre-Release Octopus Energy Plugin

As per Joe's suggestion, I have moved the Postcode definition to the device level, rather than at the plugin level. I now can track the live wholesale energy rates available in Downing Street, Lands End, John O'Groats and Edinburgh Zoo (as well as my house). Why not ?

https://github.com/neilkplugins/Octopus_Energy-indigo-plugin/releases/tag/0.0.3-alpha

The wiki now needs to be updated to change the screen shots, but it simply is the postcode field now in the device config rather than the plugin config

I will keep testing this and hopefully push to the store the initial release next weekend.

Neil

Posted on
Wed Apr 29, 2020 10:13 am
mat offline
Posts: 769
Joined: Nov 25, 2010
Location: Cambridgeshire - UK

Re: Announcing Pre-Release Octopus Energy Plugin

I've been off the forums for a few months, busy with other things, but this looks really interesting. I'm currently with Bulb and have a maxed out 3 phase board with utility bills of around £300 - £400 per month. I run a small workshop and glass kilns from home. Just got an EV and will follow this.

You can now put the potential user count at 2! :lol:

Late 2018 mini 10.14

Posted on
Wed Apr 29, 2020 4:17 pm
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Announcing Pre-Release Octopus Energy Plugin

mat,
Now live in the plugin store, any problems let me know.
Neil

Posted on
Wed Apr 29, 2020 4:37 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Announcing Pre-Release Octopus Energy Plugin

Make it +3 :D

I have just installed the plugin from the storeand it is working OK - a good effort - thanks! :)

I have a 4KV Solar PV system and so it will be interesting to see if this tariff would make sense for me.
I am also toying with the idea of getting a Tesla Powerwall but not sure of the economics?

Posted on
Wed Apr 29, 2020 5:02 pm
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Announcing Pre-Release Octopus Energy Plugin

That is good to hear, numbers are growing !

Posted on
Wed Apr 29, 2020 7:38 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Announcing Pre-Release Octopus Energy Plugin

+4

Our smart meter works but Home Display has never worked.

With solar and an EV it would make sense to look at options.


Sent from my iPhone using Tapatalk Pro

Posted on
Thu Apr 30, 2020 2:55 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Announcing Pre-Release Octopus Energy Plugin

The Daily Max Rate doesn't look like it is updating correctly, if I understand how it is meant to work? :?
The Daily Min Rate does AFAICS. :)

This is a print of the Indigo History for the device (via Valentina Studio Pro):
Screenshot 2020-04-30 at 09.46.28.png
Screenshot 2020-04-30 at 09.46.28.png (362.43 KiB) Viewed 4070 times


This is a view of the custom states:
Screenshot 2020-04-30 at 09.46.54.png
Screenshot 2020-04-30 at 09.46.54.png (108.87 KiB) Viewed 4070 times

Posted on
Thu Apr 30, 2020 5:26 am
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Announcing Pre-Release Octopus Energy Plugin

Jon - it is entirely possible the logic could have a flaw and I will take a look. Thanks for taking the time with this,

Neil

Posted on
Thu Apr 30, 2020 5:57 am
petematheson offline
Posts: 847
Joined: Sep 14, 2014
Location: Southampton, UK

Re: Announcing Pre-Release Octopus Energy Plugin

+5 !

This has pushed me to switch from Go to Agile so I'm now paying close attention to what I can charge and when to make the most of cheaper pricing.

I also have an EV, Solar and a Powerwall so looking to get the best prices to charge these each day can have a massive impact on how much I pay each month.

Currently have this setup only to switch on a few chargers around the house when pricing hits negative (as well as when solar is feeding back to the grid)
Now I just need Glenn to update his PowerWall plugin to force it to charge when I want it to and we're living the dream! :D

Posted on
Thu Apr 30, 2020 9:01 am
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Announcing Pre-Release Octopus Energy Plugin

So maybe your new venture could be figuring out how to use their Agile Outgoing tariff to change your power wall when it is negative, and sell it back when the wholesale rate is high.

It reminds me of a "scam" years ago when premium rate numbers came out. BT had a calling plan that offered "free calling during the early hours of the morning". You took a number of premium rate lines where you shared the profit with BT from the call charges and has Modem's auto dial the numbers from the "free call" numbers to your premium rate lines and bingo, Money for Nothing !

Posted on
Thu Apr 30, 2020 11:58 am
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Announcing Pre-Release Octopus Energy Plugin

autolog wrote:
The Daily Max Rate doesn't look like it is updating correctly, if I understand how it is meant to work? :?
The Daily Min Rate does AFAICS. :)

This is a print of the Indigo History for the device (via Valentina Studio Pro):
Screenshot 2020-04-30 at 09.46.28.png


This is a view of the custom states:
Screenshot 2020-04-30 at 09.46.54.png


Just in case I am being dumb. to clarify the issue is the max rate at Midnight UTC is lower than the max rate at 22:30 UTC the day before, so isn't the maximum.

If that is the issue then it is by design, but my premise may well be flawed and I am open to different approaches. Let me explain the approach :-

1) I pull down 48 readings from the API based on UTC rather than BST, and that appears to be consistent. I found when correcting for a different period the API delivered a truncated set of results and in a rather inconsistent manner depending on the time of day. I had built a whole load of complexity to adjust for BST, GMT and UTC and to keep the mapping to the current local time but realised that I would need to map this back again when I consume the consumption data and map it to the prior days rates (that will allow calculation of actual charges per period). It also opened up lots of room for error especially when the Daylight Savings change applied. For that reason I stuck to the UTC day for the calculation of max, min and average.

2) The Wholesale rates are actually published by 4:00pm BST, but are based on CET so are actually 11pm to 11pm BST and 10:00 to 10:00 UTC. Queries prior to 16:00 are missing the last 2 hours of the UTC day. For that reason I force a refresh at 18:00 UTC which will have the correct max. min and average for the whole UTC period (as this may change with the extra 2 hours available). The selection of 18:00 UTC to for a reset is entirely arbitrary and as I write this I realise it may not make too much sense. My use case was to log the max, min and average once a day using the matplot lib plugin (I could also a CSV export option like I do for the day rates at the same time for max, min and average) and I planned to do that as the UTC day changed but I realise the existing approach means you could see variance in these states during the day.

It may be I have missed the point entirely, and I am open to taking a more sensible approach here and I hadn't considered the sql logging aspect so happy to improve.

Cheers,
Neil

Posted on
Thu Apr 30, 2020 1:46 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Announcing Pre-Release Octopus Energy Plugin

I think it was my understanding. :?

I assumed that the maximum rate would be the maximum achieved so far today, as opposed to the rates having already been fixed for the next 24 hours.

There does appear to be a couple of null entries being logged, i.e:
Screenshot 2020-04-30 at 20.40.54.png
Screenshot 2020-04-30 at 20.40.54.png (450.96 KiB) Viewed 4008 times

Posted on
Thu Apr 30, 2020 2:36 pm
neilk offline
Posts: 715
Joined: Jul 13, 2015
Location: Reading, UK

Re: Announcing Pre-Release Octopus Energy Plugin

Jon,
Given I managed to confuse myself writing the response, I think this can be improved and any suggestions or requirements gratefully received for the treatment of the max and min etc.

On the nulls, I will make sure an error is thrown into the log if for some reason the rate is not updated. I will also push the rate into the event log so I can figure out what happened here. UPDATE Sorted the SQL Logger and got it capturing and have Valentina Studio setup so I can check in the same way (which is really cool and great learning)

Thanks for bearing with me !

Neil

Who is online

Users browsing this forum: No registered users and 1 guest

cron