BottlecapDave / HomeAssistant-OctopusEnergy

Unofficial Home Assistant integration for interacting with Octopus Energy
https://bottlecapdave.github.io/HomeAssistant-OctopusEnergy/
MIT License
611 stars 61 forks source link

Octopus Intelligent data report #373

Closed springfall2008 closed 1 year ago

springfall2008 commented 1 year ago

Describe the bug

I've just updated to the latest version, Intelligent seems to report the car battery size and charger rate (thanks)

There's some unknowns here, not sure if that is expected or not?

image

Reproduction steps

Running Intelligent tariff with Home Assistant and a Tesla

Expected behaviour

The unknowns to have values

Tariff Code

No response

Integration Version

8.1.0

Home Assistant Version

2023.8.1

Fresh Install?

After upgrading

Home Assistant Logs

n/a

BottlecapDave commented 1 year ago

Hello.

The last_retrieved flag was an error on my part and is never set. This was the last_updated_timestamp before I renamed it. I'll remove this in a future update, but I think it will persist due to the state restoration.

In my testing, the sources within the completed dispatches have always come back as null. I perform some light data transformation with the data that is returned by OE, but all I do is squash it down.

Was there anywhere else you expected data?

BottlecapDave commented 1 year ago

The last_retrieved attribute should now be removed in the latest release https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/releases/tag/v8.2.0. I'm going to close this ticket. If there is more data missing unexpectedly, then just comment here :)

adamwylde commented 1 year ago

Hi

Just piggy backing on this issue - which I’ve also raised in @springfall2008 ’s Predbat and now realise is because of what @BottlecapDave said above:

In my testing, the sources within the completed dispatches have always come back as null. I perform some light data transformation with the data that is returned by OE, but all I do is squash it down.

Presumably caused of the lack of ‘sources’ in the completed dispatches, the sensor that indicates dispatching is ‘on’ triggers for both bump-charge and smart-charge… the difference being ‘bump-charge’ is the users choice and (outside of the cheap window) is expensive, where as a smart-charge is Octopus’ choice and is therefore cheap rate regardless of the time.

At the moment the dispatches sensor updates to On (and downstream Predbat considers this to mean rates are cheap and may charge the PV inverter battery I believe).

Also diagnostically its a pain because - as an example, my car randomly started charging earlier today in peak rate - and I can see some completed dispatches in the sensor - but I cant tell if that means I got stung or I got an intelligent slot retrospectively.

I dont know if there is anything you can do to include this in the completed and active dispatches to distinguish? It sounds like the data probably isn’t there :-(

Happy to provide my key and trigger a bump charge so that you can see what is coming down from the API.

adamwylde commented 1 year ago

Example of a bump charge ‘live’ shown on the dispatching sensor:

Planned dispatches

The other Octopus Intelligent integration seems to ignore the bump-charge entries from my brief testing (which seems sensible as it isn’t a beneficial slot). I suppose the consumer could make that decision but maybe would be helpful to have an attribute on the sensor relating to if the sensor is on due to bump or smart?

springfall2008 commented 1 year ago

That's good, I'll add this to Predbat to ignore

On Tue, 12 Sept 2023 at 22:34, adamwylde @.***> wrote:

Example of a bump charge ‘live’ shown on the dispatching sensor:

Planned dispatches

  • start: '2023-09-12T21:27:48+00:00' end: '2023-09-12T23:01:51+00:00' charge_in_kwh: -11.6 source: bump-charge

The other Octopus Intelligent integration seems to ignore the bump-charge entries from my brief testing (which seems sensible as it isn’t a beneficial slot). I suppose the consumer could make that decision but maybe would be helpful to have an attribute on the sensor relating to if the sensor is on due to bump or smart?

— Reply to this email directly, view it on GitHub https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/373#issuecomment-1716482245, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSXIH5NNXTIWLW45XZEK63X2DIOLANCNFSM6AAAAAA3RGS7IA . You are receiving this because you were mentioned.Message ID: @.*** com>

BottlecapDave commented 1 year ago

I'll also fix the sensor to not turn on for bump charges, as if people want to include bump charges they can use the separate sensor in addition. I'll add it to my list, but in future @adamwylde if you could raise a separate issue it will help me keep track of what's been done and what hasn't.

BottlecapDave commented 1 year ago

I'm also adding a new sensor to indicate if the account is currently in an off peak rate (assuming the tariff has an "off peak"), which will be adjusted to account for intelligent slots (similar to how the current rate sensor changes to the off peak rate when within an intelligent slots), which might be more beneficial for the Predbat integration.

springfall2008 commented 1 year ago

I'm not sure that's what everyone would want, if I hit bump charge and the sensor doesn't turn on then it might mean my car charger won't be triggered and so it won't work.

Perhaps it needs an option?

springfall2008 commented 1 year ago

I'm also adding a new sensor to indicate if the account is currently in an off peak rate (assuming the tariff has an "off peak"), which will be adjusted to account for intelligent slots (similar to how the current rate sensor changes to the off peak rate when within an intelligent slots), which might be more beneficial for the Predbat integration.

Be careful what happens with things like Agile, you would then need a threshold for low vs high rate.... feature creep :(