Home Assistant plus Intelligent Octopus Go

How to use Home Assistant to utilise additional cheap Intelligent Octopus Go slots for your whole Home

Introduction

This is a very specific quite technical post related to the Intelligent Octopus Go electricity tariff and the free open source smart home technology Home Assistant. However, this question comes up almost daily on many different community forums related to EVs, EV Chargers, Home Energy, Heat Pumps, and Octopus; so I thought it time to write a post rather than write my forum answers manually each time! This is specific to Octopus Energy who are perhaps unique in offering dynamic EV charging slots. But as we move towards the Internet of Energy I think this is a good example of how with freely available technology you can significantly reduce your home energy bills. You may be able to adapt the ideas in this post for your own situation.

There are actually two uses for this Home Automation:-

  • Use additional cheap electricity half hour slots to reduce your energy bills by load shifting
  • Stop your home battery from discharging when your car is charging

The problem of trying to stop your home battery discharging when your EV is charging also comes up on forums all the time. The solution can often be a simple unclipping and repositioning of current transformers, but if you’re unlucky it might mean a wiring change. Hence this is a way of avoiding that with Home automation software.

Intelligent Octopus Go

Intelligent Octopus Go (IOG) is a smart electricity tariff from the UK energy company Octopus Energy specifically aimed at Electric Vehicles (EVs). It offers six hours low cost charging from 23-30 to 5-30 each night at circa 7p/kWh. The cost outside these hours is typically much more expensive at 30p/kWh. Many other energy companies such as Chippenham based Good Energy for example offer similarly competitive EV tariffs.

The part that is really interesting and is unique to Octopus is IOG also schedules EV charging slots outside of the fixed night-time off peak times. These are typically half hour slots and can be scheduled by Octopus on the fly. Octopus would ideally like you to keep your EV plugged in so they can schedule and charge your EV on the fly throughout the day based on wholesale electricity rates and particularly when there is an abundance of renewable energy on the grid. During these extra dynamic slots if your car is plugged in and charging then your whole house is at the same low p/kWh rate. You can see why this might be appealing – the whole house is on the same low rate in these slots.

Now this is all within the Octopus T&Cs, though they have recently introduced a charge cap of 6 hours of EV charging per day. This has caused considerable confusion. Essentially if Octopus charge your EV at a low rate during the day it counts towards your 6 hour daily EV limit, however your house electricity is still cheap in that slot and also over the full night time slot. IOG is a beta tariff and it’s quite likely this is part of an ongoing transition to smarter electricity usage with further changes as our grid evolves and we deploy more renewables.

To qualify for IOG you need to have either an EV or a smart EV charger on their approved list. I have the MyEnergi Zappi EV Charger.

Home Assistant

Home Assistant is Free Open Source smart home software written by a global community of developers that has reached a critical mass worldwide. It is not tied to any global tech giant and all of its software is publicly available to view and contribute to. The huge advantage here is that for almost every device you can conceive of automating in your home, someone in the community has written an integration for it. An integration is a piece of software you can install.

The challenge is Home Assistant is more of an ongoing journey than a finished piece of work. It doesn’t require software skills, but it is a steep learning curve. So if you’re someone that likes a project and enjoys technology, then it might be for you. If you’re someone that is already glazing over then you might want to consider solutions such as Predbat  that offer to take over control of your home energy systems and optimise them for you for an annual subscription. I have no experience of Predbat or similar solutions, so this isn’t a recommendation, simply an alternative.

Home Assistant is free to download, and you can run it on an old laptop, a raspberry pi (4+), or whatever computer you might have to hand. There is a dedicated piece of hardware available to buy pre-installed – Home Assistant Green. This is what I use having moved from a Raspberry Pi 3 which struggled to run it. Home Assistant Green is great, but the price has doubled this year so you might want to try HA on an existing computer first in case it isn’t for you.

Instructions for installing Home Assistant are available on their website here Getting started with Home Assistant – Home Assistant

Once you have set up Home Assistant you will need to install the Home Assistant Community Store (HACS) addon.

Detecting IOG slots

In order to detect the IOG slots we’ll need to use an integration that connects to the Octopus API allowing us to detect the slots.

There are two community integrations available that do that. The integration I use in the automations is one written by ‘megakid’.

The integration and installation instructions can be found here

megakid/ha_octopus_intelligent

If you are new to Home Assistant this can be quite confusing. Essentially you have to install the community integrations via the HACS menu by finding them and downloading them. Then switch to the ‘integrations’ page and click ‘add integration’ to install it.

You then need to follow the instructions to connect the megakid integration to the Octopus API, so make sure you have your Octopus login to hand.

All being well you should now be installed and connected to Octopus.

The other Octopus integration that is well known in the HA community is written by Bottlecap Dave. This has a whole wealth of information. But for the purpose of this write up we’re only going to use the mega kid integration.

Writing the automations

In order to detect our additional Octopus slots i’ve written two automations.

One to detect the slot start, and one to detect the slot stop.

So you’ll need to create a new automation and for the trigger find the ‘Octopus Intelligent Slot’ in the Octopus Intelligent Tariff. You should be able to search for this. When a slot starts this changes from off to on.

You can see a screenshot of the Home Assistant automation below. Automations can be created with a graphical interface in Home Assistant, and this a good way to learn.

Intelligent Octopus Go Slot detection

You’ll also see that i have an ‘and if’  check to make sure the time is after 5-30am and before 21-30. This is because I have other automation that are triggered on a time basis. For example once we’re past 11-30 at night and into cheap rate electricity I start the dishwasher. So i’m only using this automation to detect those extra slots thrown in by Octopus during the day.

In the ‘Then do’ section this is where the action takes place. I start charging my home battery by its own integration and I turn on the dishwasher. You can essentially do what you like in this part. If you’re new to Home Assistant you might simply want to send a notification to your phone or make a voice announcement so you can manually do something. It’s up to you!

You’ll need to find an integration specific to your home battery (see Appendix). I have an Alpha ESS B3+ battery. To start it charging I change the start and stop charge windows to be 5-30 am and 22-30. This means the battery will start charging from the grid.

Another use for this is to stop your home battery from discharging when your EV is charging.

The second automation detects when the slot finishes by looking at the change to Off of the same entity.

So when I detect the slot stopping I set my battery charge times back to the night time charge time range of 23:45 to 5:30 and a nominal 100% charge.

I have other automations that run at 23:00 and set the battery charge % based on the next day’s solar forecast, but that’s a different story.

I also send a notification to my phone and make a voice announcement.

Essentially that’s it!

Conclusions

The automations have worked really well, not only preventing our home battery from discharging when charging our car, but take advantage of the low cost slots to charge our home battery. This really helps in the winter as at 5kWh our home battery is quite small. The automation can be used to trigger any home electricity device that you want to automate, but it makes most sense to trigger power hungry devices.

Another example could be to trigger your heat pump to heat the hot water for half an hour. A hot water tank is really a thermal energy store.

As we move towards the Internet of Energy and the cost of home batteries continue to fall automations like this will be come more and more important. Companies like Octopus are using load shifting like this to help balance the grid collectively especially when there is an abundance of renewable energy. The advantage for customers able to load shift by automation is lower electricity bills. I believe we’ll also see more companies offering to automate this as a service for people for a fee.

Appendix – Battery Specific Control

There are several different battery and inverter manufacturers and models. To control these via Home Assistant you’ll need to find a specific integration for your battery. The easiest way to do this is search the web, search the Home Assistant Forums, or find a Facebook forum specific to your battery and search for Home Assistant. Inevitably someone will have written an integration. I’ve even seen the availability of a Home Assistant integration become a factor in people choosing their Home Battery manufacturer. 

I have the Alpha ESS B3+ battery and use the integration written by Charles Gillanders – CharlesGillanders/homeassistant-alphaESS: Monitor your energy generation, storage, and usage data using the official API from Alpha ESS.

This integration use the Alpha ESS API and essentially allows the same control as the Alpha ESS app, setting charge start and stop times and target percentage.

All of these integrations tend to be written by individuals so there’s always the possibilities that things change over time. Similarly the battery manufacturer could change the interface. This is why Home Assistant may need to be viewed as an ongoing project rather than a set and forget.

In one recent example the battery manufacturer GivEnergy went into administration leaving the possibility that customers would lose the ability to control their batteries via the GivEnergy cloud and their GivEnergy apps. Here the Home Assistant community rose to the challenge and there is now a local control tutorial providing GivEnergy users and option for local control via Home Assistant.