Octopus Energy - Intelligent Tariff

I’d be very interested in the outcome as I’m assuming that if the response for the Intelligent session is on/active - that 30 minutes will be at the lower rate regardless of wether the car is actually charging.

I agree that if the car stops charging then cheaper rate should stop, but how the two are linked I’m not clear on as the slot appears to stay open. If it’s that flag that tells their back end system to charge me the lower rate then whether the car charges or not becomes irrelevant. Depends on how they are checking.

My understanding has always been that as long as the api (and therefore the integration) is showing it as an intelligent slot, then its off-peak.

However… for me, Intelligent integrates directly with my car, but with you it sounds like maybe its integrating with the charger?

The former probably means that I never get into the same situation as you are describing, where the car has stopped charging, but the window is still open (for me, once because Intelligent talks to the car, once it gets to target, it stops the slot)

My gut feeling is that you are getting off-peak for as long as the API is showing as such (whether thats by design of Intelligent, or not).

I can’t remember, do you have a house battery too? in the short term, obviously you want to ensure that your battery doesn’t charge if your car completes before the window, just incase.

Longer term, I would then make a note of when you have seen the extended window, and the times the integration gave you. Then check your next bill… the daily page on the bill will clearly show you what time’s you had peak/off-peak. I’d say thats the best way to be sure… I can imagine the contact centre folks won’t be 100% sure… especially if its not working strictly to design.

Mine also integrates directly with the car (Tesla) and I have a Tesla Powerwall.

So my thought is that I need to switch to using power from the battery after the car has finished charging, even if the window is still open (Unless I can prove otherwise - I guess by checking my bill? Not sure if there’s a way to get data from Octopus which states historic Peak/Off-Peak times / usage etc? )

Interesting all the same!

Hi John,

Were you asking me for my script? This is how I configure the plug-in to kick-start my Lux LXP3600 pair of inverters to charge at cheap rate:

alias: Cheap Battery Charge **START**
description: >-
  Called when the electricity rate is cheap. Manually sets the inverters to
  charge from the grid. Also sets the battery maximum SOC limit of 90%. 
trigger:
  - platform: time
    at: "23:30:00"
  - platform: state
    entity_id:
      - binary_sensor.octopus_intelligent_slot_2
    from: "off"
    to: "on"
    for:
      hours: 0
      minutes: 0
      seconds: 30
condition: []
action:
  - type: turn_on
    device_id: 8a2e063ac2beb7afdc4ccfe37f68e61a
    entity_id: switch.lux_ac_charge_enable
    domain: switch
  - type: turn_on
    device_id: 328e1b697cba7379a40660edbc88f9b1
    entity_id: switch.lux_ac_charge_enable_2
    domain: switch
  - device_id: 8a2e063ac2beb7afdc4ccfe37f68e61a
    domain: number
    entity_id: number.lux_ac_battery_charge_level
    type: set_value
    value: 100
  - device_id: 328e1b697cba7379a40660edbc88f9b1
    domain: number
    entity_id: number.lux_ac_battery_charge_level_2
    type: set_value
    value: 100
  - device_id: 8a2e063ac2beb7afdc4ccfe37f68e61a
    domain: number
    entity_id: number.lux_ac_charge_power_rate
    type: set_value
    value: 60
  - device_id: 328e1b697cba7379a40660edbc88f9b1
    domain: number
    entity_id: number.lux_ac_charge_power_rate_2
    type: set_value
    value: 60
  - device_id: c67ddd3a9ac0ecb351a8a05185589053
    domain: mobile_app
    type: notify
    message: Cheap Rate *Active*
    title: Intelligent Octopus
mode: single

Cheers, Andy

2 Likes

@Pete_Matheson

Hmm strange then - I have a Tesla with a Hypervolt charger, and it works fine and when the car finishes it stops the intelligent slot.

My gut feeling is you are getting additional off-peak for some reason, but you will only be able to tell that by looking at a monthly bill and checking the peak/off-peak times for that day

Got a question
How can i show the planned slot like in apps one on the homeassistant dashboard?
Many thanks
Eg 10:30- 5:30

My understanding (and experience from examining my first IO bill) is that as long as the car is connected (not necessarily charging), the off-peak slots are still honoured at the cheap rate. So you don’t need to check if the car is actually charging, just be sure your house battery is charging during the IO slots AND leave the car connected. Other posts corroborate this!

Sorry I didn’t explain clearly
What i means is if there is a way to show the up coming schedule on home assistant as the apps does?
So i dont have to tell my family when is today’s cheap rate time.just have to shown them on my homeassistant dashboard on the firehd so every know when to turn on the washer machine.

23:30 - 05:30 is off peak whatever. No need to have the car plugged in.
The dispatches are a bonus

@megakid This is an amazingly useful thread, thanks to you and those contributing.
I’m relatively amatuer, and have an issue those on here may have solved.
I have a Zappi EV charger combined with my Solar panels and batteries. I programatically switch the charge mode of the Zappi, so that during the day it charges in Eco mode (taking all excess energy to the car before shipping to the grid), and Fast mode at night, to take advantage of the Intelligent Octopus Tariff.
I want to just have the API command to switch the switch.octopus_intelligent_smart_charging to off, during the day, so that the car just takes what charging it is given, and then switch.octopus_intelligent_smart_charging to on, at 5pm so Intelligent octopus can schedule any over night charging, if needed.
Can anyone on here highlight what API call I need to make (just via a noddy command line) to switch the smart charging on or off.
I’ve made an assumption here, this is the same ash the allow/disable “Smart Charging” option in the Intelligent Octopus app on my phone. I may be wrong.
Thanks in advance.

Specifically I am talking about this part of the UI/X

Hi Andy

Do you use a separate script to switch the luxpowers off at the end of the session, or do you do that manually?

WooHoo!
Hats off to @megakid !
Installed with ease on a Synolgy based Docker edition of HA.
NOTE - not sure how to / if possible to add Custom Repository through the UI when using this Docker version. But just as easy. If you are interested:

  1. download the build from GitHub
  2. locate in the download the subfolder ‘custom_components’ (it has the ‘octopus_intelligent’ folder contained within)
  3. copy this ‘custom_components’ folder to your HA \config\ folder.
    3a - IF you already have a ‘custom_components’ folder under your HA \config folder, like I did because I had already installed some other custom intergration, then copy the ‘octopus_intelligent’ folder from the downloaded build and paste inside your existing HA \config\custom_components\ folder.
  4. restart HA
  5. as megakid details, add it like any other Integration to your system. It will prompt for your Octopus API Key and Account.
  6. Add the entities to a dashboard - easy peasy!

Brilliant! Thanks!!!

Weird, I don’t get a notification that someone has asked me a question … So sorry for the delay.

Yes, I have two scripts, one to start battery charging during a cheap-rate trigger and another to stop it.

Andy

To show the upcoming charging schedule, I have this:

image

It uses template-entity-row and extracts the plannedDispatches attribute from the octopus_intelligent_slot sensor.

title: Octopus Intelligent Tariff
type: entities
show_header_toggle: false
entities:
  - entity: switch.octopus_smart_charging
    name: Smart charging enabled
  - entity: select.octopus_target_ready_by_time
    name: Ready by
  - entity: select.octopus_target_state_of_charge
    name: Charge to
  - type: custom:template-entity-row
    name: Planned slots
    secondary: >-
      {% if (state_attr('binary_sensor.octopus_intelligent_slot', 'plannedDispatches') | length > 0) %}
        {% for dispatch in state_attr('binary_sensor.octopus_intelligent_slot', 'plannedDispatches') -%}
           ⏰ {{ (dispatch.startDtUtc | as_datetime | as_local).strftime('%H:%M') }} to {{ (dispatch.endDtUtc | as_datetime | as_local).strftime('%H:%M') }}
        {%- endfor %}
      {%- else -%}
         ⏰ None
      {%- endif  %}

[EDIT 2023-03-27] Added as_local to template to show times correctly when in British Summer Time.

7 Likes

Very cool. I need to update the readme to show others how to do that sort of things.

1 Like

I agree with @megakid, this is very cool!

Have unashamedly copied this and put it on a test view to see how it well it works… I def see a version of this making it to my main views!

Thanks @duncansmart for sharing :+1:

1 Like

Hello,

I’ve been monitoring the Intelligent sots and comparing them with my bill and they don’t seem to be reliable enough to use for triggering battery charges. Is this something with my setup? An example would be the 26th Feb, see attached photos.

My bill shows an off peak slot 06:30-07:30 however homeassistant has it at 07:20-08:00


I have an Ohme charger and I’m wondering if the basic ‘beta’ integration of the Ohme is affecting things.

FYI: my car wasn’t even plugged in when this slot became available and it’s still being billed at off-peak. Again, I think this might be an Ohme specific issue.

When you use the Ohme integration with a car that does not have a specific API, the octopus API does not publish dispatch slots later in the day past its initial publish
This is due to the OHME man in the middle
Ultimately this plug in cant help you as it has to valid data to pull from octopus later in the evening when Octopus actually update the slots.
(Ive since learnt this from the facebook group dedicated to non-api ohme charging)

The best you can achieve, as i do, is to watch for the car charging outside of offpeak and then use that to trigger things.
In my case, this time of year (due to plenty of solar) i pause house discharge when the car starts charging during normal peak hours
Later in the year i will probably activate top up charges as well.

1 Like

Hi there!

Pretty new to HA, less than a week using it, still amazed by the capabilities of this thing! I’m not a programmer, just a bit of a geek.

@megakid many thanks for this integration! It’s helping people same some money and fully automate this tariff.

I have a Tesla Model 3 and a Hypervolt 2.0, and I also don’t like the idea of plugging in and letting the car charge for a “few” minutes waiting for Octopus to kick in, plan the charge and stop the current charge.

I found out that if I set the Hypervolt to “Schedule” (as opposed to “Plug and Charge”) and plug the car in before 23:30, the car won’t start charging (schedule times are set to the base Intelligent hours) but Octopus will indeed plan the night’s charge. But if I then set the charger to “Plug and Charge” the car will start charging. I could leave it in “Schedule” mode which would allow charging from 23:30, but I see 2 potential issues: One is that the car will probably start charging at 23:30, even if that’s not the first planned slot as per Octopus’ plan, don’t know if Octopus will send a stop charge command to the car so it waits for the first planned slot (I’m guessing not) and this might ruin the charge plan. The other is it won’t allow the charge to start in the odd occasion that Octopus plans an earlier slot than 23:30.

Anyway, excited to start tinkering with this integration and HA in general.

If it helps @paulo.frings, I have a HV 2.0 and the way I work it is, when the cheap tariff is not active an automation sets the HV to Super Eco (i.e. solar charging only), and then when the cheap tariff is active an automation sets the HV to Boost.

This works well… stops the car charging while it awaits the schedule, and it also allows the car to charge with any excess solar (I still need to set the Octopus app to Bump Charge, but I don’t need to change anything on HV). If you don’t have solar, you can still use this method, the HV will just not be able to receive any excess solar for additional charging.