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

Added ostrom tariff #16354

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Added ostrom tariff #16354

wants to merge 9 commits into from

Conversation

kscholty
Copy link
Contributor

@kscholty kscholty commented Sep 26, 2024

In discussion #15512 and closed issue #11148 people are asking for Ostrom support.
Since they have a public API and I had some spare time I implemented a tariff for EVCC.

The implementation supports both the SIMPLY_FAIR (fixed price for at least a month) and the SIMPLY_DYNAMIC (hourly rates) tariff, which would make it worth having a native implementation.
The prices for both tariffs are queried on a regular basis.

Client credentials can be created under https://developer.ostrom-api.io/

Looking forward to your comments

@andig andig marked this pull request as draft September 27, 2024 16:19
@kscholty
Copy link
Contributor Author

@andig Warum draft? Nach meiner Ansicht ist das fertig so, oder hast du Änderungsvorschläge?

@softcat
Copy link
Contributor

softcat commented Sep 28, 2024

Bezüglich des Preises für den SIMPLY_FAIR Tarif:

Ich nutze aktuell schlicht einen Query für die generische tariff Integration (ohne Authentifizierung)

https://api.ostrom.de/v1/tariffs/city-id?cityId=11111&usage=1000

Allerdings muss man sich dafür die cityId über die Homepage händisch raussuchen. Funktioniert dann aber gut.

Gibt die API ggf. bzgl. der cityId etwas her? Ich kann es leider aktuell nicht testen.

Ich wechsle in ein paar Wochen in den SIMPLE_DYNAMIC Tarif, dann ist deine Integration perfekt.

@kscholty
Copy link
Contributor Author

Guter Hinweis. In der dokumentierten API gibt es nichts, um die CityId zu erfragen. Aber etwas suchen im Quelltext der Webseite ergab:
https://api.ostrom.de/v1/addresses/cities?zip=${zip}
Damit bekommt man die CityId zu einer Postleitzahl.
Ich habe den Code jetzt so angepasst, dass er das automatisch alles aus dem Contract ermittelt und abfragt.
Sollte sich der Simply Fair Preis also ändern, merkt evcc das spätestens an dem Tag, an dem es passiert. In die Zukunft abfragen geht leider nicht (bzw. weiß ich nicht genau, ab wann die API den neuen Preis liefert)

@kscholty kscholty marked this pull request as ready for review September 28, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants