Octopus Energy - Intelligent Tariff

If you are using Octopus Intelligent (where they control the charging of your EV in exchange for long off peak periods) Intelligent Octopus | Octopus Energy

I’ve built an integration for it

15 Likes

I moved to Intelligent today. I’ll be installing this tomorrow :slight_smile:

Question, when you set the charge Octopus tells you what hours are your cheap rate for charging your car. These could be during the normal off peak period or could be during the peak period. Is it possible to get a notification when these are? Does the API expose them?

Here’s what mine is showing for tonight’s charge.

It’s a little confusing. Basically, you always get cheap rate from 23:30 to 05:30. If it shows charging slots outside of this core time, you get those on the cheap rate too, bit unbelievable to believe but true. I think the rationale is Octopus wants the big loads, such as your EV, to kick in when they want to balance the grid. Just because your house is taking advantage of the cheap rate is by-the-by.

The minor flaw in this is that those of us with home batteries will, obviously, want to take advantage of the cheap rate.

I’ve only just installed this plug-in and I hope I can control my battery inverter’s charging habits too…

Andy

1 Like

OK, I have been using this plug-in for a week now and, in a word, WOW!

Just set up two automations; one to trigger on “Octopus Intelligent Slot turned off” and another on “Octopus Intelligent Slot turned on”. Here I can ask my home battery inverters to enable and disable charging respectively.

The really nice point of this is that when you plug-in your EV, within a few minutes, Octopus will set up a new charging schedule which can be outside of the normal 11:30 to 05:30 cheap rate slot. Last week this happened to be 21:00 to 21:30 and my home batteries started to charge automagically.

Point to note, at 11:30 they started to charge as normal.

Really really nice work, Megakid!

Andy

5 Likes

Hi,

This is a great piece of work and brilliant for automation!

Yes it is brought through but as an attribute to the binary_sensor.octopus_intelligent_slot in the PlannedDispatches entry. It even shows how much charge will be given (I only have a trickle charger at the moment)

Each time slot is listed

PlannedDispatches
- startDtUtc: '2022-07-30 01:00:00+00:00' 
  endDtUtc: '2022-07-30 01:30:00+00:00' 
  chargeKwh: '-0.08' 
  meta: source: smart-charge 
  location: null 
- startDtUtc: '2022-07-30 01:30:00+00:00' 
  endDtUtc: '2022-07-30 04:00:00+00:00' 
  chargeKwh: '-5.75' 
  meta: source: smart-charge 
  location: null
1 Like

Glad this is useful. I am considering adding a new sensor showing a timestamp of when your electric will be cheap, so in advance you can see (for dashboards etc) how long you’ve got until cheap rate electric. This will ofcourse be based on the 2330 and any planned dispatches outside of that time.

Any other suggestions?

4 Likes

Any idea how I can send the timeslots to my phone as a notification? I can’t seem to find the right path in Node-Red.

Hi @Puntoboy,

Here’s an automation I use to send notifications (which includes the iPhone/Android apps) on change of peak/off-peak. You could swap out my call to notify.notify for notify.mobile_app_PHONENAME if you only want to target one device.

Hope this helps someone.

Joel

alias: Alert Octopus Intelligent Change
description: >-
  Notify everyone if the cheap window starts or stops, and send the timings of
  upcoming charges.
trigger:
  - platform: state
    entity_id:
      - binary_sensor.octopus_intelligent_slot
    from: "off"
    to: "on"
    id: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 30
  - platform: state
    entity_id:
      - binary_sensor.octopus_intelligent_slot
    from: "on"
    to: "off"
    id: "off"
    for:
      hours: 0
      minutes: 1
      seconds: 0
condition: []
action:
  - if:
      - condition: trigger
        id: "on"
    then:
      - service: notify.notify
        data:
          title: Off-Peak Electricity Rate!
          message: >-
            {% set plannedDispatches =
            state_attr('binary_sensor.octopus_intelligent_slot',
            'plannedDispatches') %} {% set cheapNow =
            states("binary_sensor.octopus_intelligent_slot") == 'on' %} {% set
            pence = (states('sensor.octopus_intelligent') | float(0)) * 100 %}
            {% if cheapNow %} Electricity is currently cheap 🔥 {{ pence }}p/kWh
            {% else %} Electricity is currently expensive 🔥🔥🔥 {{ pence
            }}p/kWh {% endif %}

            {% if (plannedDispatches | length) == 0 %} No additional slots are
            scheduled yet today. 😢

            Use 23:30 - 05:30 only. {% else %} There are {{ plannedDispatches |
            length }} upcoming slots for {{
            as_timestamp(plannedDispatches[0].startDtUtc)|timestamp_custom
            ('%Y/%m/%d')}}.

            {% for item in plannedDispatches %} {{
            as_timestamp(item.startDtUtc)|timestamp_custom ('%H:%M') }} - {{
            as_timestamp(item.endDtUtc)|timestamp_custom ('%H:%M') }}

            {%- endfor%} {% endif %}
    else:
      - service: notify.notify
        data:
          title: Peak Electricity Rate!
          message: >-
            {% set plannedDispatches =
            state_attr('binary_sensor.octopus_intelligent_slot',
            'plannedDispatches') %} {% set cheapNow =
            states("binary_sensor.octopus_intelligent_slot") == 'on' %} {% set
            pence = (states('sensor.octopus_intelligent') | float(0)) * 100 %}
            {% if cheapNow %} Electricity is currently cheap 🔥 {{ pence }}p/kWh
            {% else %} Electricity is currently expensive 🔥🔥🔥 {{ pence
            }}p/kWh {% endif %}

            {% if (plannedDispatches | length) == 0 %} No additional slots are
            scheduled yet today. 😢

            Use 23:30 - 05:30 only. {% else %} There are {{ plannedDispatches |
            length }} upcoming slots for {{
            as_timestamp(plannedDispatches[0].startDtUtc)|timestamp_custom
            ('%Y/%m/%d')}}.

            {% for item in plannedDispatches %} {{
            as_timestamp(item.startDtUtc)|timestamp_custom ('%H:%M') }} - {{
            as_timestamp(item.endDtUtc)|timestamp_custom ('%H:%M') }}

            {%- endfor%} {% endif %}
mode: single

2 Likes

That’s perfect, thanks very much! I tried to get it to work in Node-Red but couldn’t.

@AndyWhittaker - If you charge your batteries (non car) during the outside off-peak periods that Octopus assign to your charge schedule, wont they (Octopus) still bill you at your peak rate?? My understanding is that they use the API data from your Car/Charger integration when you set this up to calculate the costs.
The house batteries will obviously be outside of that?

Asking as I have the same setup as you and if they bill you on total usage and not just car usage then this would be ace to use to automate my air-source heat pump to come on!

Slightly off topic, however since we are all on the Intelligent Tariff this might be worth a discussion.

I’ve been talking to Octopus and their rule is that once the car is plugged in it charges for ~15min until they tell it to switch off.

Now my peak rate is 0.37p/kWh - and during that period it charges approx 1-1.2kWh. Thats for basic maths £135.05 per year!

Has any one used the Tesla/Their car of choice API to basically disable their car charging straight away when you are home, car is plugged in, turn off?

That money can go to a few more sensors :smiley:

Hi Nick,

The whole point of Intelligent Octopus is to shift large loads (i.e. electric cars) off the grid during off-peak periods. I’m sure it won’t be long before Octopus will include home battery systems, I think they do this already with the Tesla Powerwall integration.

So yes, if the plugin reports off-peak during the day, then it’s time to “fill your boots”. For Octopus, this is ideal because the load shift is even better!

Regards, Andy

Perfect! Thanks for confirming….consider my air source heat pump on :smiley::smiley:

Hmmm, there’s a rumour going around that if your EV isn’t charging outside of the cheap-rate window, you’ll be charged at peak-rate irrespective of what the Intelligent Octopus schedule says.

I have billing evidence in the past months that this was not the case but I wonder if something has now changed? @megakid can you comment on this? I see that you have updated your plugin in the last few days.

Irrespective, if the plugin says you’re on cheap-rate is it guaranteed that you really are? Lots of questions there!

Cheers, Andy

My understanding is that planned dispatches (when Octopus are planning on charging your car) - which is what this integration looks at during “peak” hours - is just that - planned.

If your car rejects the charge or the charge doesn’t work for some reason then despite that 30 min slot being marked as “Offpeak” it will be charged at Peak rates. Your car must actually charge during that period (unsure on the threshold but 3.5kwh per half hour on a 32 charger is the max so perhaps anything above half that? Total guess but I doubt 0.1kwh would be enough to mark the entire period as Offpeak).

Because octopus does this comparison after the fact, it’s impossible for the integration to show this ahead of time.

I’ll try some experiments at home to see the differences between planned and completed dispatches (I think “completed” dispatches are the periods that are actually billed as offpeak- again, this data only gets populated after the fact)

1 Like

I’ve just got this setup and looking forward to having a play. I think the thing I’d find most helpful in the first instance is getting this to automate an alert to my phone - going to have a play with the automation from @joelblogs above in the first instance

Got the script to work, thanks (although only confirming that it’s on peak right now)

@megakid - Is there any way the dashboard could be configured to “show” the off peak charging slots which are outside of the overnight window? People like me with an Ohme EV charger don’t get this info in the Octopus app so would be hugely advantageous to be able to see this information. Thanks for this amazing work.

Also now configured the dashboard to show this information which is great.

Final ask! Why don’t the times align properly on my system? My dashboard / history screen shows off-peak as occurring 0030 - 0630 every night (whereas I know from my Account that it is 2330 - 0530) This means I don’t have confidence in the “bonus” Off Peak window alerts I’m getting (Should I be subtracting an hour from these to make sure they’re correct?)

I’ve checked my system time and date settings are correct but this hasn’t changed. Is this a British Summer Time issue which will resolve next weekend when the clocks change?

Should your code pull the pence rate from the sensor? I cant see that coming through on my sensor or binary sensor feed. Have it working by manually entering the pence rate.

thanks

Hi @megakid, I believe this would be really useful.

I would love to be able to display a timestamp of the next planned cheap rate slot on my dashboard… I have it on a wall mounted tablet in the kitchen, so would allow the family to easily see if we have an early (or late) slot and can shift more of our use. Don’t suppose you have had any luck getting time to look at it?

As another idea, maybe when configuring the integration, there could be a couple of options to enter the peak and off-peak rates (p/kwh), and have these available through entities? I know its not really needed, as we could “hard code” them into our dashboards with if statements, but it would allow easy use for people.

Thanks for a great integration, was exactly what I was looking for!