megakid / ha_octopus_intelligent

Apache License 2.0
88 stars 10 forks source link

Question - any way of displaying the plannedDispatches in a LoveLace card for Ohme integration #1

Closed andyvee69 closed 2 years ago

andyvee69 commented 2 years ago

Hi - excellent integration BTW - I'm using the beta Ohme EVSE / Intelligent set up rather than a car API set up. Is there any way of displaying the plannedDispatches in a user friendly format (table/list?) on a LoveLace card in HA?

andyvee69 commented 2 years ago

Update on this as well - the Ohme integration is not using the Octopus app for any scheduling, so is not setting target SoC or time in there. Is it possible to have a 'light' version of the integration with all controls removed and just the binary sensor element to capture the plannedDispatches?

andyvee69 commented 2 years ago

This is what my binary sensor displays now as attributes. I don't think for the Ohme Integration the vehicleChargingPreferences are required or should be set. The plannedDispatches appear at around 16:45 daily then seem to disappear at 17:00 regardless of if you are plugged in or not - I don't know if this is normal behaviour for an API integrated car controlled by the Octopus app?

`vehicleChargingPreferences: weekdayTargetTime: '10:00' weekdayTargetSoc: 100 weekendTargetTime: '10:00' weekendTargetSoc: 100

registeredKrakenflexDevice: krakenflexDeviceId: 00000000-0002-4000-8020-00000000XXXX provider: OHME vehicleMake: Peugeot vehicleModel: e-2008 SUV vehicleBatterySizeInKwh: '45.00' chargePointMake: Ohme chargePointModel: Ohme home pro charger chargePointPowerInKw: '7.400' status: Live suspended: false hasToken: true createdAt: '2022-06-24T14:36:26.239507+00:00'

plannedDispatches: icon: mdi:home-lightning-bolt-outline friendly_name: Octopus Intelligent Slot`

megakid commented 2 years ago

Interesting. How does octopus control when your car charges? I assume by turning on and off at your Ohme charger?

The vehicleChargingPreferences target time and state of charge (soc) are important and set by you within the octopus app, right? Otherwise what else does having the octopus intelligent tariff do?

On Thu, 30 Jun 2022 at 17:06, andyvee69 @.***> wrote:

This is what my binary sensor displays now as attributes. I don't think for the Ohme Integration the vehicleChargingPreferences are required or should be set. The plannedDispatches appear at around 16:45 daily then seem to disappear at 17:00 regardless of if you are plugged in or not - I don't know if this is normal behaviour for an API integrated car controlled by the Octopus app?

`vehicleChargingPreferences: weekdayTargetTime: '10:00' weekdayTargetSoc: 100 weekendTargetTime: '10:00' weekendTargetSoc: 100

registeredKrakenflexDevice: krakenflexDeviceId: 00000000-0002-4000-8020-00000000XXXX provider: OHME vehicleMake: Peugeot vehicleModel: e-2008 SUV vehicleBatterySizeInKwh: '45.00' chargePointMake: Ohme chargePointModel: Ohme home pro charger chargePointPowerInKw: '7.400' status: Live suspended: false hasToken: true createdAt: '2022-06-24T14:36:26.239507+00:00'

plannedDispatches: icon: mdi:home-lightning-bolt-outline friendly_name: Octopus Intelligent Slot`

— Reply to this email directly, view it on GitHub https://github.com/megakid/ha_octopus_intelligent/issues/1#issuecomment-1171405024, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALI2473XXNQYAIDZY7OS23VRXAXFANCNFSM5Z2DMZ6Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

andyvee69 commented 2 years ago

Yes - it controls the Ohme directly. All the scheduling is done in the Ohme app, none in the Octopus app. So I'm unsure if writing any of those vehicle paprameters potentially may mess something up. The Octopus app doesn't display the same screen under devices - it is just a placeholder saying do your scheduling in the Ohme app, we are working on integrating the scheduling in to the Octopus app basically. So I think for 'safety' reasons at the moment, any writes to the API should be disabled if you have OHME as provider and the only feature you need is a read of the registeredKrakenflexDevice and plannedDispatches, and the binary sensor. Unless there are additional new fields in the API specific to the Ohme integration? I suppose you would need an account number and API key for that to look?

megakid commented 2 years ago

Hmm interesting, so by adding your Ohme charger Octopus doesn't control when it charges? I thought that was the point of the tariff (or, as you say, they're working towards that). In which case, the octopus intelligent slot binary sensor will just be timed between offpeak / onpeak hours and not also planned dispatches. Speaking of planned dispatches, as per the title of this issue, if the dispatches only appear for 30 mins or so every night then it that sounds like a bug on their end and they just rely on no-one browsing the API to see it. I assume the planned dispatches you do see during this time is completely irrelevant to your ohme schedule or how octopus will charge you for electric (e.g. if the planned dispatches were outside of the 2330 -> 0530 range, they would charge you offpeak rate for those slots). Is there any reason you want to actually see these in lovelace or does the request no longer apply?

Regarding the 'lite' version, it sounds like for now you can just disable the controls as you see fit (e.g. disable the select drop downs and other bits that aren't relevant to you). That way it prevents any accidental API calls from occurring on the backend other than the usual polling for planned dispatches. Thoughts?

andyvee69 commented 2 years ago

I'm still digging in to this TBH. It works like this : Octopus seem to publish plannedDispatches around 16:45 daily. At 17:00 they disappear from the API. All charging is scheduled in the Ohme app, and it follows the timeslots and charge amounts in the plannedDispatches. It's a little different to on API integrated vehicle. Octopus seem to be billing on the basis that they have provided their preferred HH slots outside of the default 6hrs, and you only get the off peak rate if you are actively charging at that point. They are connected to the Ohme via OCPP so know if you are charging or not. So the ideal solution for Ohme integration is to 'cache' the plannedDispatches until they are in the past, or an update is published. Then I will have to do some logic in HA around if my car is actively charging or not to determine if it is off peak

andyvee69 commented 2 years ago

Closing this - Octopus have stopped publishing any plannedDispatches via the API for the Ohme integration.