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

Lastmanagement #8427

Closed
wants to merge 65 commits into from
Closed

Lastmanagement #8427

wants to merge 65 commits into from

Conversation

hoermto
Copy link
Contributor

@hoermto hoermto commented Jun 12, 2023

Fortführung von PR3453

Dokumentation: lastmanagement

Download unter Relases ab v0.118.0.

use cases

  • Lastbegrenzung: bestimmte Leistung in einem Stromkreis nicht überschreiten
    • zB alle Wallboxen zusammen max 11kW
    • zB max Leistung am Netzpunkt <= 5kW
  • Infrastrukturschutz: Strom begrenzen im Stromkreis zum Schutz der Sicherung oder Leitungen
    • zB max Strom < 20A im Stromkreis (pro Phase)

Arbeitsweise

  • Begrenzung erfolgt immer in einem Stromkreis
  • Stromkreise können hierarchisch sein
  • Stromkreis kann ein physisches Meter haben, muss aber nicht. In diesem Fall wird der Verbrauch aller LP im Kreis benutzt
  • Bei Überschreiten der maximalen Leistung oder des maximalen Stroms werden die LP im jeweiligen Kreis im maximalen Strom begrenzt
  • die Prüfung der maximalen Leistung und des maximalen Stroms erfolgt unabhängig und pro Stromkreis, es kann also beides, eines von beider oder keins geprüft werden.

Konfigurationserweiterung für Lastmanagement:

  • Stromkreise (Circuits) definieren. Es kann (muss aber nicht) ein Hauptkreis angelegt werden, welcher den Zähler der PV verwenden kann. Weitere Stromkreise liegen darunter und können optional eigene Zähler für die Unterverteilung haben. Falls kein physischer Zähler für einen Stromkreis vorhanden ist, wird der Verbrauch aus der Summe aller zugeordneten LP und Unterkreise bestimmt.
  • pro Stromkreis kann die maximale Leistung (in kW) oder der maximale Strom (in Ampere) angegeben werden
circuits:
  - name: main
    maxCurrent: 0
    maxPower: 6
    meter: grid1
    parent:
  - name: zaun
    maxCurrent: 14
    meter:
    parent: main
  - name: garage
    maxCurrent: 12
    meter:
    parent: main
  • Loadpoints einzelnen Stromkreisen zuordnen. Mehrere Loadpoints können einem Circuit zugeordnet werden.
loadpoints:
- title: GarageLinks
  circuit: garage

Die Konfiguration der Circuits kann mit Hilfe des Konfigurationsassistenten im "advanced" Modus erfolgen.

evcc configure --advanced

Installation / Test

Beispielhaft Linux: siehe auch hier für die Schritte: Installation

Manueller Test

Nur das Binary um mal zu gucken obs was tut.

mkdir evcc-test && cd evcc-test
# download and extract
wget https://github.com/hoermto/evcc/releases/download/v0.104.2-lloadmanagement/evcc_v0.104.2-lloadmanagement-next_linux_amd64.tar.gz
tar -xzvf evcc_v0.104.2-lloadmanagement-next_linux_amd64.tar.gz
# create / modify configuration
vi evcc.yaml 
<edit / copy file>

# manual start for testing, ctrl+c to stop
./evcc -c evcc.yaml

# start in background to remain running after shell exit
nohup ./evcc -c evcc.yaml&

Installation komplett

Bei bestehender Installation (https://docs.evcc.io/docs/installation/linux), bzw. Neuinstallation:

# download package (use recent version)
wget https://github.com/hoermto/evcc/releases/download/v0.104.2-lloadmanagement/evcc_0.104.2.lloadmanagement-next_amd64.deb
# Entfernen der Standardinstallation, falls vorhanden. Die /etc/evcc.yaml Konfigurationsdatei bleibt dabei erhalten. Es ist aber sinnvoll vorab eine Kopie zu erstellen.
cp /etc/evcc.yaml ~/evcc.yaml.backup
sudo apt-get remove evcc

# Installation
sudo dpkg -i ./evcc_0.104.2~lloadmanagement-next_amd64.deb
# weitere Schritte siehe Installationsanleitung.

Docker

Download: https://github.com/hoermto/evcc-lm/releases die docker-...zip Datei runterladen, und dann mittels docker load -i <zip datei> in das lokale Repository laden:

> docker load -i ./docker_evcc_amd64_0.124.1.tgz 
Loaded image: evcc/evcc:testing

Weitere Schritte hier: https://docs.evcc.io/docs/installation/docker.
Für den Namen des images dann aber evcc/evcc:testing verwenden.

@ross-w
Copy link
Contributor

ross-w commented Mar 5, 2024

@hoermto any chance of a rebase to release 0.124.6? Above PR is included since 0.124.5.

@hoermto
Copy link
Contributor Author

hoermto commented Mar 6, 2024

@hoermto any chance of a rebase to release 0.124.6? Above PR is included since 0.124.5.

I am currently having issues with the tests in 0.124.x. Need to fix this before releasing.
Also, usually I release the version not before the next major is released (0.125.0).

@hoermto
Copy link
Contributor Author

hoermto commented Mar 9, 2024

v 0.124.8 with lm in releases

Copy link
Member

@andig andig left a comment

Choose a reason for hiding this comment

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

@hoermto nitpicking

docs/design/loadmanagement.md Show resolved Hide resolved
cmd/setup.go Outdated Show resolved Hide resolved
cmd/setup.go Outdated Show resolved Hide resolved
cmd/setup.go Outdated Show resolved Hide resolved
cmd/setup.go Outdated Show resolved Hide resolved
core/circuit.go Outdated Show resolved Hide resolved
core/circuit.go Outdated Show resolved Hide resolved
@andig
Copy link
Member

andig commented Mar 24, 2024

Let's see how we can move this forward. I've published a Docker image with :lm tag containing Tesla support.

@stepir
Copy link
Contributor

stepir commented Mar 25, 2024

just to confirm I've update my (docker based) image and tesla support works. Will be testing LM later. Tnx!!!

@profex1337
Copy link

So is there a official Version coming with Tesla Support?

@andig
Copy link
Member

andig commented Mar 25, 2024

Seems I have already answered this.

@stepir
Copy link
Contributor

stepir commented Mar 25, 2024

So is there a official Version coming with Tesla Support?

yes :lm version has both load management and tesla support

cmd/setup.go Show resolved Hide resolved
cmd/configure/configure.go Show resolved Hide resolved
core/circuit.go Show resolved Hide resolved
core/circuit.go Show resolved Hide resolved
core/circuit.go Show resolved Hide resolved
core/loadpoint.go Show resolved Hide resolved
core/loadpoint.go Show resolved Hide resolved
core/loadpoint.go Show resolved Hide resolved
core/loadpoint.go Show resolved Hide resolved
util/param.go Show resolved Hide resolved
@stepir
Copy link
Contributor

stepir commented Mar 27, 2024

just a headsup on my testing - both lm and tesla seems to be working. I had to refresh the tesla token once as it went offline. Haven't tested yet LM in all conditions (charging in mixed scenario in example).

@Frintrop
Copy link
Contributor

Hi .. is there a timeframe when pr is done ?
Or any hint how to get the last management version as hassio addon on homeassistant ?

@andig andig mentioned this pull request Mar 29, 2024
12 tasks
@andig
Copy link
Member

andig commented Mar 31, 2024

#13207 has an alternative approach to load management that should be more compliant with evcc core model, has simpler structure and should be easy to adapt to config UI. It is also utterly untested and may not work or even be dangerous.

It would still be great if someone able to compile could give it a try. Two words of warning:

  • power in W (not kW)
  • entirely untested

Configuration from this PR should hopefully work. Published on Docker Hub als :lm-new. Turn on trace log for testing, please leave comments in #13207.

@andig
Copy link
Member

andig commented Apr 4, 2024

We do meanwhile have the first positive feedback in #13207. Given that #13207 is easier to integrate with evcc I'm closing here. Please head over there for testing and feedback.

Big ❤️ to @hoermto for providing and maintaining the initial solution, especially for such a long time.

@andig andig closed this Apr 4, 2024
@stepir
Copy link
Contributor

stepir commented Apr 14, 2024

two things to report on this version.

  • EV charging start with surplus but wont stop when there is not anymore and battery can keep it up without the system doing grid import (I have battery meter not implemented as there is an open bug with SolarEdge)
  • Tesla integration work only temprarly with version, after sometime console log the token is not recognised - at restart it's expired.

Garage: vehicle soc: Get \"https://fleet-api.prd.eu.vn.cloud.tesla.com/api/1/vehicles/xxxxx/vehicle_data\": oauth2: \"unauthorized_client\" \"We don't recognize this client_id and client_secret combination\

@andig

This comment was marked as outdated.

@andig
Copy link
Member

andig commented Apr 14, 2024

In other words: please retry with #13207, this one is closed.

@evcc-io evcc-io locked as resolved and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backlog Things to do later enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.