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 session log #4162

Merged
merged 15 commits into from
Oct 5, 2022
Merged

Add session log #4162

merged 15 commits into from
Oct 5, 2022

Conversation

andig
Copy link
Member

@andig andig commented Aug 19, 2022

Fix #4159

This PR adds:

  • sessions persisted to database, typically ~/.evcc/evcc.db using Sqlite
  • session api (/api/sessions)
  • optional csv output (/api/sessions?format=csv)

Todo

  • figure out restart behaviour (leave open sessions open and start new? resume if delta <x minutes?)

We will do the UI part in a follow-up PR:

  • CSV download link in UI
  • UI session display

@andig andig added the enhancement New feature or request label Aug 19, 2022
@andig andig marked this pull request as draft August 19, 2022 16:10
@naltatis
Copy link
Member

🌈 Gefällt mir gut als ersten Schritt Richtung Persistenz.

@andig
Copy link
Member Author

andig commented Aug 20, 2022

Lass mich doch erstmal was bauen ;)

@andig andig force-pushed the master branch 2 times, most recently from ece3ca9 to 97bf4ac Compare September 30, 2022 19:57
@andig andig force-pushed the feature/ladelog-2 branch from 6461f66 to b5121dc Compare October 3, 2022 09:58
@andig andig marked this pull request as ready for review October 3, 2022 17:26
@andig andig requested a review from naltatis October 3, 2022 17:28
@naltatis
Copy link
Member

naltatis commented Oct 4, 2022

Looks good to me. Ich werd den Branch heute Abend mal bei mir in Ruhe testen und schauen ob das für mich klappt.

@naltatis
Copy link
Member

naltatis commented Oct 4, 2022

Changed the default location of the sqlite db to ~/.evcc/evcc.db. This makes it easier to map the database to a volume outside the docker container even if the database has not been created yet.

docker run andig/evcc:latest -p 7070:7070 -v ~/.evcc:/root/.evcc

Copy link
Member

@naltatis naltatis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with demo configurations an my real home setup and everything worked as expected. This PR is a huge step to persistent 🎉

@andig andig added the ux User experience/ interface label Oct 5, 2022
@andig andig force-pushed the feature/ladelog-2 branch from ea36c58 to 4715062 Compare October 5, 2022 11:02
@andig andig merged commit 85d0117 into master Oct 5, 2022
@andig andig deleted the feature/ladelog-2 branch October 5, 2022 11:12
@andig andig mentioned this pull request Oct 6, 2022
1 task
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.

Ladelog umsetzen
4 participants