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

Persist targetSoc/Energy, minSoc, targetTime per vehicle, add minSoc to UI #8115

Merged
merged 63 commits into from
Aug 2, 2023

Conversation

naltatis
Copy link
Member

@naltatis naltatis commented May 21, 2023

Vehicle based settings now survive server restart and are carried over when manually changing vehicles at a loadpoint.

fixes #5271
replaces #6740

  • 💽 storing targetSoc, targetEnergy, minSoc, targetTime per vehicle in database
  • 🔄 stored settings are used on startup, vehicle change (UI) and physical vehicle (dis-)connect
  • 🧪 removed "experimental" flag for minSoc UI (see screenshot)
    • 🛫 target time charging is now in the departure tab (default)
    • 🛬 additional onIdentify options (min/maxCurrent, mode) will be added to the arrival tab later
  • 🎯 Charging plan link is now shown in all modes modes and with missing target energy (guest/offline vehicles)

Note: onIdentify values in evcc.yaml have precedent. From now on they should only be used if you want to reset to these values. @VolkerK62 could you updated the documentation accordingly?

shows active minSoc
Bildschirmfoto 2023-05-21 um 11 42 36

departure tab
Bildschirmfoto 2023-05-21 um 11 43 01

arrival tab
Bildschirmfoto 2023-05-21 um 12 28 32

@naltatis naltatis requested a review from andig May 21, 2023 10:06
api/api.go Outdated Show resolved Hide resolved
core/loadpoint_vehicle.go Show resolved Hide resolved
core/loadpoint_vehicle.go Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
vehicle/embed.go Outdated Show resolved Hide resolved
VolkerK62 added a commit to VolkerK62/docs that referenced this pull request May 30, 2023
naltatis and others added 14 commits May 31, 2023 10:54
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
* Translated using Weblate (Czech)

Currently translated at 37.3% (99 of 265 strings)

Co-authored-by: Dusan Suja <bc.suja.dusan@googlemail.com>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/cs/
Translation: evcc/evcc

* Translated using Weblate (Finnish)

Currently translated at 100.0% (265 of 265 strings)

Co-authored-by: Arna Lepikkö <arna.lepikko@telemail.fi>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/fi/
Translation: evcc/evcc

* Translated using Weblate (German)

Currently translated at 100.0% (265 of 265 strings)

Co-authored-by: ThinkEV <claas@rootdir.de>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/de/
Translation: evcc/evcc

* Translated using Weblate (Croatian)

Currently translated at 100.0% (265 of 265 strings)

Translated using Weblate (Slovenian)

Currently translated at 100.0% (265 of 265 strings)

Co-authored-by: Žiga Deisinger <ziga@deisinger.si>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/hr/
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/sl/
Translation: evcc/evcc

* Translated using Weblate (Catalan)

Currently translated at 100.0% (265 of 265 strings)

Co-authored-by: Norbert Poch <npoch@yahoo.com>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/ca/
Translation: evcc/evcc

* Translated using Weblate (Dutch)

Currently translated at 76.6% (203 of 265 strings)

Translated using Weblate (Dutch)

Currently translated at 74.3% (197 of 265 strings)

Co-authored-by: Ruben Van Boxem <vanboxem.ruben@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/nl/
Translation: evcc/evcc

* fix toml

---------

Co-authored-by: Dusan Suja <bc.suja.dusan@googlemail.com>
Co-authored-by: Arna Lepikkö <arna.lepikko@telemail.fi>
Co-authored-by: ThinkEV <claas@rootdir.de>
Co-authored-by: Žiga Deisinger <ziga@deisinger.si>
Co-authored-by: Norbert Poch <npoch@yahoo.com>
Co-authored-by: Ruben Van Boxem <vanboxem.ruben@gmail.com>
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
Also aligns heartbeat implementations
@andig
Copy link
Member

andig commented Jun 16, 2023

@naltatis könntest Du rebasen? Für mich ist schwer zu erkennen, was hier PR und was Beiwerk ist. Kann es sein, dass es stört wenn immer wieder rein gemerged wird? Imho ist lokaler rebase weniger für solche Fehler anfällig.

@andig
Copy link
Member

andig commented Jun 16, 2023

Die Lösung, die ID vom Coordinator zu holen find ich übrigens Klasse, ist aber nicht ganz stabil. Akzeptieren wir fürs Erste? Alternativ könnten wir je ID auch noch den title weg schreiben und nur restoren falls dieser immer noch zum Vehicle passt. Auch keine Garantie, aber vielleicht ein Indiz.

@naltatis
Copy link
Member Author

ist aber nicht ganz stabil. Akzeptieren wir fürs Erste?

Ja ich würd sagen lass uns damit starten und auf "echte IDs" umschalten sobald wir das haben. Ich sehe das hier in der Tat auch eher als einen Zwischenschritt.

@naltatis
Copy link
Member Author

Imho ist lokaler rebase weniger für solche Fehler anfällig.

Ich find ja mergen weniger fehleranfällig. Aber seis drum. Der Branch ist nun auf Stand und das Diff sieht sauber aus. Schau gerne noch mal.

i18n/en.toml Outdated Show resolved Hide resolved
andig and others added 3 commits June 18, 2023 10:44
Co-authored-by: Simon Riepl <43091717+savus4@users.noreply.github.com>
@github-actions github-actions bot added the stale Outdated and ready to close label Jul 9, 2023
@github-actions github-actions bot closed this Jul 15, 2023
@andig andig reopened this Jul 15, 2023
@github-actions github-actions bot removed the stale Outdated and ready to close label Jul 16, 2023
@JanDragon
Copy link
Contributor

Is there a planned date to merge this PR? I would be especially interested in the feature that allows you to set the vehicle to always be at a certain charge level. Should be the minSOC option. Looking forward to use that in the future. Thanks in advance.

@naltatis
Copy link
Member Author

naltatis commented Aug 1, 2023

@JanDragon yes, this feature will go to master very soon.

@naltatis naltatis merged commit 7de4849 into master Aug 2, 2023
6 checks passed
@naltatis naltatis deleted the fix/persist_target_soc_time branch August 2, 2023 13:43
@Robbe64
Copy link
Sponsor

Robbe64 commented Aug 7, 2023

Ich teste das Feature gerade im Nightly aber bei mir vergisst er targetSoc und minSoc beim ab und wieder anstecken. Soll ich die Details hier hinterlegen oder einen Bug anlegen?

@naltatis
Copy link
Member Author

naltatis commented Aug 7, 2023

Hast du die Werte aus der yaml entfernt? siehe #9245

@Robbe64
Copy link
Sponsor

Robbe64 commented Aug 7, 2023

Ja, hab sie entfernt. Starte ich EVCC neu, bleiben die Werte die ich eingestellt hatte erhalten. Auch beim Fahrzeugwechsel in EVCC bleiben die Werte bestehen. Nur wenn ich ab und anstecke klappt es nicht. Dann wird targetSoc auf 100% und minSoc auf 0/x gestellt.

#uri: 0.0.0.0:7070 # uri for ui
plant: *****
interval: 20s # control cycle interval

log: debug
levels:
  id: trace
  easee: trace
#  lp-1: trace
#  tibber: trace

sponsortoken: *****

meters:
  - type: template
    template: kostal-plenticore
    id: 71
    host: 192.168.178.101
    port: 1502
    usage: pv
    modbus: tcpip
    name: pv1
  - type: template
    template: kostal-plenticore
    id: 71
    host: 192.168.178.101
    port: 1502
    usage: battery
    modbus: tcpip
    name: battery2
    capacity: 5.2
  - type: template
    template: kostal-ksem-inverter
    id: 71
    host: 192.168.178.101
    port: 1502
    usage: grid
    modbus: tcpip
    name: grid3

chargers:
  - name: easee1
    type: easee
    user: *****
    password: *****
    charger: EHE84FNG
    timeout: 20s

loadpoints:
  - title: Carport
    charger: easee1
    mode: pv
    mincurrent: 7
    maxcurrent: 32
    resetOnDisconnect: true
    soc:
      estimate: false # Interpolation des SoC zwischen den Abfragen zum Auto
      poll:
        mode: always
        interval: 60m
    vehicle: egolf
    vehicles:
      - egolf
#      - tesla
    enable:
      delay: 3m
    disable:
      delay: 7m
      threshold: 100
    guardduration: 5m
    priority: 10

site:
  title: Mein Zuhause
  meters:
    grid: grid3
    pvs:
      - pv1
    batteries:
      - battery2
  bufferSoC: 95 # Hausbatterie wird oberhalb SoC x% als Puffer genutzt
  prioritySoC: 20 # Hausbatterie bekommt bis zum SoC x% Priorität beim laden
  residualPower: 100 # 100W soll immer eingespeist werden. Nötig für Batteriesystem
  maxGridSupplyWhileBatteryCharging: 50 # Verhindert den Netzbezug bei DC Leistung > AC Leistung und gleichzeitigem Batterieladen

vehicles:
  - name: egolf
    type: vw
    title: eGolf
    capacity: 21
    user: *****
    password: *****
    phases: 1
    onIdentify:
      minCurrent: 7
      maxCurrent: 16
#      targetSoC: 80 #-> Now stored from UI
    #cloud: false
    identifiers: 04DA682ABD7280

tariffs:
  currency: EUR
  grid:
    type: tibber
    token: *****
    #price: 0.31 # [currency]/kWh

  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.077 # [currency]/kWh
  co2:
    type: grünstromindex
    zip: 59609

influx:
  url: http://solaranzeige:8086
  database: evcc

telemetry: true

@Robbe64
Copy link
Sponsor

Robbe64 commented Aug 7, 2023

Habe gerade festgestellt, dass schon beim Abstecken die genannten Werte zurückgesetzt werden. Womöglich beim setzen des Standardfahrzeugs?

[site  ] DEBUG 2023/08/07 11:48:36 ----
[lp-1  ] DEBUG 2023/08/07 11:48:36 charge power: 0W
[site  ] DEBUG 2023/08/07 11:48:37 pv power: 912W
[site  ] DEBUG 2023/08/07 11:48:37 battery soc: 39%
[site  ] DEBUG 2023/08/07 11:48:37 battery power: -515W
[site  ] DEBUG 2023/08/07 11:48:37 grid power: -31W
[site  ] DEBUG 2023/08/07 11:48:37 site power: -446W
[lp-1  ] DEBUG 2023/08/07 11:48:37 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2023/08/07 11:48:37 charge total import: 4443.962kWh
[lp-1  ] DEBUG 2023/08/07 11:48:37 charger status: A
[lp-1  ] INFO 2023/08/07 11:48:37 car disconnected
[lp-1  ] DEBUG 2023/08/07 11:48:37 set charge mode: pv
[lp-1  ] DEBUG 2023/08/07 11:48:37 set min current: 7
[lp-1  ] DEBUG 2023/08/07 11:48:37 set max current: 32
[lp-1  ] DEBUG 2023/08/07 11:48:37 set min soc: 0
[lp-1  ] DEBUG 2023/08/07 11:48:37 set target soc: 100
[lp-1  ] DEBUG 2023/08/07 11:48:37 set priority: 10
[lp-1  ] DEBUG 2023/08/07 11:48:37 set min current: 7
[lp-1  ] DEBUG 2023/08/07 11:48:37 set max current: 16
[lp-1  ] DEBUG 2023/08/07 11:48:37 vehicle soc: 83%
[lp-1  ] DEBUG 2023/08/07 11:48:37 vehicle range: 93km
[site  ] DEBUG 2023/08/07 11:48:37 ----

@naltatis
Copy link
Member Author

naltatis commented Aug 7, 2023

Ok, klingt dann doch nach nem Bug. Magst du ein Issue aufmachen?

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.

Planner: Persist plan