Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

[GUIDE] Automations for Octopus Intelligent with Home Assistant

This site may earn commission on affiliate links.
Thanks for this - some good ideas here and integrations I hadn't noticed before.

BottleCapDave's Octopus integration provides much more info than the IO integration I was using previously. It seems though, that the octopus_energy_intelligent_dispatching sensor is only on during Octopus' IO charging slots - i.e. it might be off at times during the 23:30 - 05:30 "off peak" period.

I've gotten round that by defining an input_boolean helper for "IO Peak period" with automations to set it on or off due to time and dispatching status.

I'm also using the TeslaMate-provided MQTT entries to provide the Tesla charge limit for the 2nd automation. Those values are taken from the Tesla streaming API rather than polling, so there's no chance of waking the car. These are read-only though, so if you wanted to set the Tesla charge limit, you'd need to use the integration.

Cheers,
Tim
 
  • Like
Reactions: Medved_77
I’ve started beta testing the IO Zappi integration. Unfortunately, it’s a choice of either the Tesla integration or the Zappi integration, it won’t leverage both to control charging and read the car SoC to charge the correct amount. With the Zappi integration you merely set how much % SoC you wish to add during the night (you tell it what car you have during onboarding so it has an idea of battery capacity) so you have to set it every day based on how much you’ve used the car. I had already been using HA to automate IO and the Zappi to allow PV charging during the day and IO charge at night, in a rather convoluted way using numerous automations. The Zappi integration is neater, however I’d like to automate setting the IO charge %. Unfortunately, my abilities fall short for what I’d like to do, so I’m wondering if anyone here might be able to assist? I’d imagine it would help anyone else who subsequently ends up using the Zappi integration and also runs HA.

Essentially, what I’d like to do is set an automation that triggers when I plug my car in at home (this bit I can do), then reads the car SoC, checks a new entity/variable where you set the desired target SoC, then subtracts one from the other, rounds up to the nearest 10% and uses this to set the IO target SoC (they use the same parameter as with the Tesla integration, but it acts differently, as explained above).

Any ideas from the braniacs in the group?
 
@Medved_77 I wanted cross check with you if that is an expected behaviour.

So be default, if car is not connected, lovelace dhasboard shows that charging is disabled.
1695196301197.png

  • LED indicator on PodPoint (I got older Solo, as per picture) is white/yellow-ish.
  • Once cable is connected into car, LED and lovelace dashboard stays the same as IO slot is not allocated yet.
  • But in Tesla app, where you can see that cable is connected to the car, the cable itself is shown as Red, with error "no power". This is the status I get every time with setting as above.
Having above all evening and IO did not provide me with schedule. Octopus app was still showing sleeping octopus and it was waiting when cable is plugged in.

However, even if I have same cable error as above, if I click allow charge, nothing happens for some time... or until I press "Unlock charging Port" in the Tesla app. After I click unlock charger port - it starts to actually charge the car.

And if then I disable "charging allowed" in lovelace, the cable indicator in the app is blue.

is this the same behaviour you see?
 
I don't have any issues with the IO/Tesla integration not working like some people do since I have a very basic automation which looks for when the Tesla (My MY in the screenshot below) is plugged in at my home location and cycles IO on and off. This has so far prevented any issues of non-creation of charge schedules that others have experienced.

1695205348226.png


I do still have the 23.30 start time set in the car, so no charging happens when I plug in even though I've completely turned off all schedules on my Easee charge point. Might be useful for others in combination with the automations listed in this thread.
 
  • Like
Reactions: MarkScott
@Medved_77 I wanted cross check with you if that is an expected behaviour.

So be default, if car is not connected, lovelace dhasboard shows that charging is disabled.
View attachment 975487
  • LED indicator on PodPoint (I got older Solo, as per picture) is white/yellow-ish.
  • Once cable is connected into car, LED and lovelace dashboard stays the same as IO slot is not allocated yet.
  • But in Tesla app, where you can see that cable is connected to the car, the cable itself is shown as Red, with error "no power". This is the status I get every time with setting as above.
Having above all evening and IO did not provide me with schedule. Octopus app was still showing sleeping octopus and it was waiting when cable is plugged in.

However, even if I have same cable error as above, if I click allow charge, nothing happens for some time... or until I press "Unlock charging Port" in the Tesla app. After I click unlock charger port - it starts to actually charge the car.

And if then I disable "charging allowed" in lovelace, the cable indicator in the app is blue.

is this the same behaviour you see?
Sounds similar, although in my case I get the Octopus schedule shortly after plugging in, regardless of the state of the podpoint charger.

If your integration is setup correctly then the podpoint should only be powered when an intelligent slot is available. Whilst you have the cable connected to the car, yet the podpoint is off, you'll see a charging error as the car knows there's no power being delivered.

Bear in mind that when you override the charging allowed it may take a while to react, and in that time, the automation may have triggered again, thus disabling the charge. You can look at the traces section in the automation to see if this is happening. I'm lost as to why clicking unlock charge port would start charging the car.
 
Sounds similar, although in my case I get the Octopus schedule shortly after plugging in, regardless of the state of the podpoint charger.

If your integration is setup correctly then the podpoint should only be powered when an intelligent slot is available. Whilst you have the cable connected to the car, yet the podpoint is off, you'll see a charging error as the car knows there's no power being delivered.

Bear in mind that when you override the charging allowed it may take a while to react, and in that time, the automation may have triggered again, thus disabling the charge. You can look at the traces section in the automation to see if this is happening. I'm lost as to why clicking unlock charge port would start charging the car.
I find that it takes about 20s - 30 s to change it to "charge allowed".

What is interesting is that in my case, if "charge is not allowed", then Pod Point is always showing as unplugged.
 
Last edited:
Sounds similar, although in my case I get the Octopus schedule shortly after plugging in, regardless of the state of the podpoint charger.

If your integration is setup correctly then the podpoint should only be powered when an intelligent slot is available. Whilst you have the cable connected to the car, yet the podpoint is off, you'll see a charging error as the car knows there's no power being delivered.

Bear in mind that when you override the charging allowed it may take a while to react, and in that time, the automation may have triggered again, thus disabling the charge. You can look at the traces section in the automation to see if this is happening. I'm lost as to why clicking unlock charge port would start charging the car.
on, but in this case, by the way, does octopus knows that car is plugged? as I had waitied more or less whole evening, no IO slotts were provided

at the same time this would mean than there are more or less no IO slots before 23:30?
 
I actually changed your automation with something different.

I run 2 automation connected with this.
Note: I am not using the Pod-Point integration for this - my Pod Point charger is always enabled.

1) IO and Tesla.
If IO slot is not allocated

Once car is connected to the charger at home, it waits for 30 s (enough to raise charge current to full 30 A) and then instructs Tesla to Stop charging.

If IO slot is allocated
Once car is connected to the charger at home, it does nothing and charging continues.

2) IO and Growatt inverter via Solar-Assistant
if IO slot is not allocated - Inverter is on the Load first mode.
If IO slot is allocated - Inverter switches to Battery first mode

Current IO price at 7.5p and IO export at 15p makes life extremely simple :D
 
possible to use this in conjunction with the givenergy integration to set discharge power limit on the battery to 0W (effectively preventing discharge) if there is an additional IO off peak 30 minute window that pops up? how responsive is that in changing?
 
possible to use this in conjunction with the givenergy integration to set discharge power limit on the battery to 0W (effectively preventing discharge) if there is an additional IO off peak 30 minute window that pops up? how responsive is that in changing?
I don't use this particular set of integrations, but that is how my setup works. The system polls the planned dispatches every 5 minutes for any changes in schedule and subsequently sets charging the battery in any off-peak slots whether they are in the fixed period or scheduled outside of that.
 
I don't use this particular set of integrations, but that is how my setup works. The system polls the planned dispatches every 5 minutes for any changes in schedule and subsequently sets charging the battery in any off-peak slots whether they are in the fixed period or scheduled outside of that.
how did you set up to check for it every 5 mins?
 
I don't want to put doom and gloom on this thread, but anyone looking to invest a lot of time in these automation solutions might be worth reading up on the changes that Tesla are making in the new year which may mean significant changes are required and possible render some of these obsolete.


It's described as fleet, but from what I've read this will also kill off the hobbiest API reverse engineered approach
 
In my case the integrations are with GivEnergy (local control) and the Octopus API. I don't need to query the Tesla API. Hopefully Octopus' developers are across the required changes.

It would suck to lose Teslamate though.
 
I don't think there's anything there that would prevent (say) Teslamate from accessing the fleet APIs. It would be more tricky to set up though, as each installation would have to register as a new API "application" with Tesla.

I can't see any pricing information for after the free period ends - hopefully there will be a free or cheap personal tier.
 
Tidied up the automation to prevent the car from charging during peak periods.

1. Migrated from Octopus Intelligent integration to the Octopus Energy Integration as I'd missed the update that introduced the charge entity. Octopus Intelligent integration now deleted from HA.
2. Added a condition to check that Bump Charge was not active.
3. Using trigger IDs in the actions, just a bit neater.

Of course, this is setup for my car with my podpoint charger so you'll need to tweak this.

1698415310377.png

YAML:
alias: Enable Podpoint charging if Intelligent Octopus Slot exists.
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.octopus_energy_intelligent_dispatching
    from: "off"
    to: "on"
    id: Intelligent Dispatching On
  - platform: state
    entity_id:
      - binary_sensor.octopus_energy_intelligent_dispatching
    from: "on"
    to: "off"
    id: Intelligent Dispatching Off
condition:
  - type: is_plugged_in
    condition: device
    device_id: a4214720d771888f715fd12a2962d54a
    entity_id: binary_sensor.psl_140567_cable_status
    domain: binary_sensor
  - condition: state
    entity_id: switch.octopus_energy_intelligent_bump_charge
    state: "off"
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Intelligent Dispatching On
        sequence:
          - type: turn_on
            device_id: a4214720d771888f715fd12a2962d54a
            entity_id: switch.psl_140567_charging_allowed
            domain: switch
      - conditions:
          - condition: trigger
            id:
              - Intelligent Dispatching Off
        sequence:
          - type: turn_off
            device_id: a4214720d771888f715fd12a2962d54a
            entity_id: switch.psl_140567_charging_allowed
            domain: switch
mode: single
 
  • Like
Reactions: Garry TheBiz