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

Add support for Amber Electric (AU) #12381

Merged
merged 2 commits into from
Feb 21, 2024
Merged

Add support for Amber Electric (AU) #12381

merged 2 commits into from
Feb 21, 2024

Conversation

ross-w
Copy link
Contributor

@ross-w ross-w commented Feb 21, 2024

I'm fairly new to Golang so I'd appreciate any comments on how this code might be improved.

This adds support for Amber Electric (Australia) as a variable tarriff, for both grid imports and exports (feed-in.)

API documentation is available at https://app.amber.com.au/developers/ though unfortunately you need an account to obtain an API token.

The API returns both import and export pricing in the one call, so the result needs to be filtered by "channel", which can be general, feedIn, or another one for controlled loads (I don't have any, so I can't confirm what this looks like)

One striking difference to other variable tarriffs in evcc is that I have this updating every minute. Most people using the Amber API tend to use this interval (the official Home Assistant integration also polls every minute). The prices tend to fluctuate and can make sudden movements, so it's fairly important to keep this up to date. If 1 minute is not acceptable, 5 minutes is likely OK, but hourly would be too infrequent. As an example we had a swing from around $0.10 to around $19.00 (yes, really) last week due to a sudden fault causing spot prices to skyrocket. I'd have not wanted my charging to continue at full power for another hour until the next refresh, as this would have cost a bomb!

Screenshots attached of a local build, compared to what Amber's site is showing me presently:
Screenshot 2024-02-21 at 4 19 18 pm

Screenshot 2024-02-21 at 4 19 26 pm Screenshot 2024-02-21 at 4 20 05 pm

@ross-w ross-w mentioned this pull request Feb 21, 2024
@andig
Copy link
Member

andig commented Feb 21, 2024

One striking difference to other variable tarriffs in evcc is that I have this updating every minute.

@ross-w the update is not a problem. I'm afraid though that evcc would continue charging for the current period (i.e. 1hr) even if the current slow- due to price increase- would no longer be part of the plan. We've added this to prevent switching off to frequently.

/cc @schenlap maybe we'll need another parameter to account for potentially frequently-changing price conditions?

@ross-w does this require and api key? Would be great to share with [email protected] as I cannot support this otherwise.

@andig andig added the enhancement New feature or request label Feb 21, 2024
@andig
Copy link
Member

andig commented Feb 21, 2024

Would you also add a template for the Tariff? See https://github.com/evcc-io/evcc/tree/master/templates/definition/tariff for examples. We'll use these in the near future.

@ross-w
Copy link
Contributor Author

ross-w commented Feb 21, 2024

Thanks for the info @andig will definitely keep that in mind. For now I can work around the problem by having Home Assistant detect price spikes and set the loadpoints to off via the API. It would be nice to have a native solution for this in evcc longer term.

API key is required. Understand the requirement for support, that said the API key is personal to me and my property and you can do more than just read prices with it. I'll email to discuss.

I've added a template as requested. Hope it looks OK; I'm not sure how to test it.

@andig andig merged commit 5cdf197 into evcc-io:master Feb 21, 2024
7 checks passed
@andig
Copy link
Member

andig commented Feb 21, 2024

Great PR, thank you!

@schenlap
Copy link
Contributor

Please confirm that I understood correctly:
There is a plan with 30 minute intervals. This plan is not binding and you then have to check the current price every minute.
Is there a restriction on how much the current price can deviate from the plan? Is there a binding plan for prices that change every minute?

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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants