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

Refactor target charging apis #5649

Merged
merged 5 commits into from
Jan 19, 2023
Merged

Refactor target charging apis #5649

merged 5 commits into from
Jan 19, 2023

Conversation

andig
Copy link
Member

@andig andig commented Jan 2, 2023

Fix #5784

This PR moves all target charging apis to separate end points:

  • /target/time/<time>
  • /target/soc/<%>
  • /target/energy/<kWh>

As we are now actually returning the current plan, we'll also be able to cache and reuse it in case that proves useful for performance or planning stability.

TODO

  • decide how to make planning conservative again rebase on master
  • update apis in ui
  • enable energy based target charging in ui
  • add tariff api (/tariff/grid|feedin|planner) where planner maybe dedicated planner tariff (co2) or grid tariff
  • add plan api
  • simple text-based plan summary (visualisation next)
  • proper translation
  • unplausible plan data for fixed grid prices
  • document ui-pushed variables
  • update api docs
  • fix planner: GUI zeigt Zielladen obwohl Zielladen nicht mehr aktiv sein sollte #5784
  • fix start/end not shown when plan end beyond tariffs
  • always include costs even when all remaining time must be used
  • fix plan not updated when opening dialog @naltatis
  • fix plan updated on ui reload even if target time is inactive @naltatis
  • add target charging by energy instead of soc @naltatis

/cc @schenlap an der Funktionalität hat sich noch nichts geändert, bis auf die Tatsache dass die Effizienz nur noch 1x aufgeschlagen wird und auch das wäre unter dem erstem Punk zu bewerten.

@andig andig added the infrastructure Basic functionality label Jan 2, 2023
@andig andig marked this pull request as draft January 2, 2023 09:55
@naltatis

This comment was marked as resolved.

@andig
Copy link
Member Author

andig commented Jan 8, 2023

Ups. Api ist drin.

@naltatis
Copy link
Member

naltatis commented Jan 8, 2023

@andig ich hab gerade versucht diesen Branch wieder auf master-Stand zu bringen, gibt aber einige Konflikte bei denen ich mir nicht ganz sicher bin, wie man die korrekt auflöst. Magst du dir das mal anschauen?

@andig
Copy link
Member Author

andig commented Jan 8, 2023

Mache ich. Einheiten: siehe #5718

@andig andig force-pushed the feature/plan-api branch from 47c61e1 to b5e8b6b Compare January 8, 2023 12:41
@andig
Copy link
Member Author

andig commented Jan 8, 2023

Flupp

@andig andig mentioned this pull request Jan 8, 2023
@naltatis
Copy link
Member

naltatis commented Jan 8, 2023

Sehr schön, dann bau ich in diesem PR erstmal ne einfache textbasierte Planungsinfo im Dialog ein. @andig Kannst du dir den Konflikt im LP auch noch mal anschauen.

@andig andig force-pushed the feature/plan-api branch from b5e8b6b to 91b242e Compare January 8, 2023 16:33
@andig
Copy link
Member Author

andig commented Jan 8, 2023

Flupp

@andig andig force-pushed the feature/plan-api branch from f739f5e to f99fb63 Compare January 9, 2023 08:21
@naltatis
Copy link
Member

naltatis commented Jan 9, 2023

@andig Danke. Nu funktionierts wie erwartet.

@naltatis
Copy link
Member

naltatis commented Jan 9, 2023

Text-based planning detail. Will be replaced by a visualisation soon.

Bildschirm­foto 2023-01-09 um 22 45 00

Bildschirm­foto 2023-01-09 um 22 44 29

@Hofyyy
Copy link
Contributor

Hofyyy commented Jan 10, 2023

Also das sieht aber auch schon mal richtig schick aus.
Eine Frage:

  • Wie zeigt ihr die Kosten bei Euro an? Zeigt ihr die Summe an, oder Durchschnitt pro KWH?
  • Ich fände den Durchschnittspreis wie an der Tanke ganz interessant. Beispiel 15 Cent/kWh

@naltatis
Copy link
Member

@Hofyyy Ja, genau so. Wenn die Planung auf Basis von Netztarif gemacht wird wird anstatt der CO2 Menge der Durchschnittspreis pro kWh angezeigt:

Energiepreis: 22ct/kWh

@naltatis
Copy link
Member

Um dem Scope von diesem PR nicht zu sprengen nehm ich das Thema Kosten (Preis/gCO2 pro kWh) hier erstmal wieder raus. Das kommt dann separat.

Bildschirm­foto 2023-01-14 um 10 30 52

@naltatis
Copy link
Member

Docs PR für die API Änderungen
evcc-io/docs#263

@naltatis
Copy link
Member

@andig Was meinst du mit "document ui-pushed variables"? Ist hier noch was offen?

@andig andig marked this pull request as ready for review January 14, 2023 12:51
@andig andig added enhancement New feature or request ux User experience/ interface and removed infrastructure Basic functionality labels Jan 15, 2023
This was referenced Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ux User experience/ interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

planner: GUI zeigt Zielladen obwohl Zielladen nicht mehr aktiv sein sollte
3 participants