Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual Refresh of Intelligent Dispatch Slots #735

Open
2 tasks done
JasSmiths opened this issue Feb 2, 2024 · 5 comments
Open
2 tasks done

Manual Refresh of Intelligent Dispatch Slots #735

JasSmiths opened this issue Feb 2, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@JasSmiths
Copy link

Describe the feature

It would be great if there was the ability to manually refresh the data on the Intelligent Octopus Dispatch slots rather than having to wait for the automated checks.

Expected behaviour

The ability to call a service (or any other method) to pull the latest data for Intelligent Dispatch Slots would be hugely appreciated.

Use Case

I would like this because Im currently using Home Assistant as a go between for my EV Charger & Intelligent Octopus, so when slots get generated I have a home assistant automation setup which will switch modes on my EV Charger to allow charging to happen.

If I need to generate a slot and get the car charging as quickly as possible it would be really useful to be able to pull the latest data down which will then trigger my automations and prevent Octopus from notifying that they were unable to control my device because the integration hasn't polled for the latest data.

Note that this will be used manually at most a few times a day so wouldn't cause issues with overloading the API.

Thank you!

Confirmation

  • By submitting this feature request, you agree that you have read the documentation and confirmed it does not already exist
  • I am willing/able to help contribute to the solution of this feature
@JasSmiths JasSmiths added the enhancement New feature or request label Feb 2, 2024
@RobinXe
Copy link

RobinXe commented Feb 2, 2024

This is interesting! Does this mean that you've managed to get on IO without having a supported vehicle/charger? It does raise the possibility of whether OE would be interested in supporting a Home Assistant IO interface, for people with currently incompatible chargers. They should certainly hire Dave to build it!

@BottlecapDave
Copy link
Owner

Hello. My main concern with this is that the service could be abused either accidently or on purpose. Octopus Energy have the ability of tracing requests back to this integration, and don't want to get on bad terms with them. I'll need to look into it.

@andynash
Copy link

andynash commented Apr 3, 2024

I also see a delay between Octopus issuing the new planned dispatches and the integration learning about them. This is frustrating but I understand this is due to Octopus asking for rate limits, backing off etc. Unfortunately planned dispatches is an update you'd want to know about immediately, not whenever the next update comes around.

This service would be one solution, though so would e.g. Octopus providing a webhook to advise new dispatches can be retrieved. The Octopus app clearly has some way of knowing this and let's you know immediately but I don't know how.

Just putting my hand up for a general solution to the delay now that data is retrieved less regularly due to rate limiting - could be this, could be something else.

If such a service existed, I'd call it (after a short delay) when a car is connected, or when the % charge or ready time is changed.

I can see this being an issue though, e.g. when Octopus recently had a problem and planned dispatches were finally sent many hours late. Users' automations might have hammered their API during this time.

To be fair though, it should be an account level problem (ie the account holder should be held responsible for misuse, rather than the integration developer). Each call can be tracked back to the user's API key, not just the integration used, so Octopus should really be setting up their API to restrict/defend against individual problem accounts rather than effectively limiting functionality for all (indirectly, via the 'chilling effect' of potentially tarring the integration, and 'good' users with the same brush as real and potential problem users).

@BottlecapDave
Copy link
Owner

Sorry for the late response.

I also see a delay between Octopus issuing the new planned dispatches and the integration learning about them

This is always going to be the case with the integration polling for data. I'm personally not sure why up to 5 minute delay is a problem, especially as the majority of schedules should be in the future, but I'm not on the tariff and don't know the ins and outs of what people are using the integration for.

I can see this being an issue though, e.g. when Octopus recently had a problem and planned dispatches were finally sent many hours late. Users' automations might have hammered their API during this time.

This is the reason I'm not keen on exposing a service as people will just inevitably not be happy with the standard refresh rate and use the service to get quicker times. This integration will get the "blame" due to a requested user agent on OE's end.

In terms of refresh rates, I've been told both to not hit the API too much and that the endpoint in question has a rate limit that I'm far from exceeding. I could therefore look at increasing the frequency in the future to 3 minutes and see what happens.

@thewishy
Copy link

thewishy commented Apr 6, 2024

Occasionally Octopus do short notice schedules, even in the middle of the night. I'm not entirely sure if this is down to a glitch (Eg my wallbox lost connection, or kracken had a fit) or is intentional demand response workload.
It's rare, and I think tuning the poll times down is probably not needed. However if there was a manual refresh option I could at least poll octopus when my car randomly starts charging - the wallbox integration still works and provides status updates when charging.
Also the octopus app sends notifications when dispatches are planned, which I could also use as a "webhook like" trigger
I would overall make fewer API calls this way vs increased polling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

5 participants