evcc-io / evcc

Sonne tanken ☀️🚘
https://evcc.io
MIT License
3.3k stars 604 forks source link

Improve heat pump use case #10220

Open MikeTheTux opened 11 months ago

MikeTheTux commented 11 months ago

By luck I found the description how to use EVCC to control my heat pump (in addition to my wallbox). I would like to share the following improvement ideas:

  1. The heat pump use case is not well "advertised". E.g. it is not mentioned in Home
  2. The setup is described in Sonstiges - a better title should be used for the page
  3. Sonstiges is incomplete: 3.1. chargers misses an explanation of the standbypower parameter (<0 vs. >=0) 3.2. In addition the parameters integrateddevice, heating as well as icon are not mentioned 3.3. In the loadpoint section, the priority could be explained as useful option - Charged Car v.s. Warm Water ;-) 3.4 The default poll.mode is charging. You need it to set on always/connected, see https://docs.evcc.io/en/docs/reference/configuration/loadpoints/#pollmode
  4. meters -> WP_Pwr should also support a standbypower parameter. Without, the standby of the heat pump (~15 Watt in my case) is interpreted as "Charging" and accumulates as charged energy.
  5. In docs/reference/configuration/chargers the option heating is not specified
andig commented 11 months ago

Great input, thank you!

MikeTheTux commented 11 months ago

For 4. I implemented a workaround using the following logic in openHAB and transmit the result via MQTT to EVCC:

if ( power < 100W )
{
   power = 0W
}
else
{
   power = power - 15W // typical standby
}
andig commented 8 months ago

/cc @VolkerK62

VolkerK62 commented 8 months ago

@MikeTheTux This example was originally intended for use in Shellys, not specifically for heat pumps. All parameters are described in the configuration area. You are right about the poll mode, that should be changed.

For 4: standbypower on the chargemeter is still not necessary, it is enough, if it is entered on the charger. Try using standbypower: 100.

By the way, he documentary can be edited by any user 😄

andig commented 7 months ago

Additional enhancements from https://github.com/evcc-io/evcc/discussions/11822#discussioncomment-8224247:

Ja, Einerschritte macht hier durchaus Sinn. Kann ich mich gerne drum kümmern. Anpassung der Skala (lower/upper) ist schwieriger. Da haben wir aktuell (noch) keinen guten Ort für. Wäre etwas speziell für Heater. Da wir gerade dabei sind die yaml-Settings zu reduzieren bzw. in der UI zu migrieren würde ich das auch erst nach der Migration sehen.

MikeTheTux commented 7 months ago

For 4: standbypower on the chargemeter is still not necessary, it is enough, if it is entered on the charger. Try using standbypower: 100.

Muss ich am Charger nicht -1 setzen, um in den Static-Switch Modus zu gelangen? https://docs.evcc.io/docs/devices/chargers/#schaltbare-steckdosen

Ist die poll-mode Änderung aus https://github.com/evcc-io/docs/pull/515 nicht redundant aufgrund der Änderungen aus https://github.com/evcc-io/evcc/pull/10284?

VolkerK62 commented 7 months ago

Muss ich am Charger nicht -1 setzen, um in den Static-Switch Modus zu gelangen?

Wenn du ein meter nutzt, kannst du auch positive Werte nehmen.

Ist die poll-mode Änderung aus https://github.com/evcc-io/docs/pull/515 nicht redundant aufgrund der Änderungen aus https://github.com/evcc-io/evcc/pull/10284?

Stimmt, daran hab ich gar nicht mehr gedacht ;-)

MikeTheTux commented 7 months ago

Ist die poll-mode Änderung aus evcc-io/docs#515 nicht redundant aufgrund der Änderungen aus #10284?

Stimmt, daran hab ich gar nicht mehr gedacht ;-)

Ich denke, die Änderung aus https://github.com/evcc-io/docs/pull/515 sollte zurückgenommen werden. Damit entsteht der Eindruck, dass der poll Parameter immer noch eine Relevanz hat. Vielmehr sollte das via https://github.com/evcc-io/evcc/pull/10284 implementierte Verhalten beschrieben werden.

MikeTheTux commented 7 months ago

Muss ich am Charger nicht -1 setzen, um in den Static-Switch Modus zu gelangen?

Wenn du ein meter nutzt, kannst du auch positive Werte nehmen.

@VolkerK62: Folgende Config, mit positiver standbypower hat bei mir nicht funktioniert:

chargers:
  - name: heatpump_switch
    type: template
    template: shelly
    host: 192.168.69.152
    standbypower: 15
    integrateddevice: true
    heating: true
    icon: waterheater

meters:
- name: heatpump_power
  type: custom
  power:
    source: mqtt
    topic: heatpump/power

loadpoints:
- title: Heatpump
  charger: heatpump_switch
  meter: heatpump_power
  vehicle: heatpump
  mode: pv
  enable:
    threshold: 0
    delay: 1m
  disable:
    threshold: 0
    delay: 15m              # Laufzeit mindestens 15 Minuten
  guardduration: 15m        # Pause mindestens 15 Minunten
  priority: 10

vehicles:
  - name: heatpump
    type: custom
    title: Heatpump
    icon: waterheater
    phases: 1
    onIdentify:
      mode: pv
    soc:
      source: mqtt
      topic: heatpump/temperature

Warte auf Heizung, Geladene Energie 0 kWh ...

Untitled-1

VolkerK62 commented 7 months ago

Ich weiß jetzt warum. Siehe #12276 Hatte ich so nicht auf dem Schirm

michiproep commented 4 months ago

Ich würde mich hier auch noch gerne dranhängen. Das mit dem standbypower ist die eine Sache. Was jetzt noch dazukommt, ist der maxCurrent, den evcc meldet. Wenn zB die Wärmepumpe nachmittags ihre Arbeit erledigt hat und aufgrund ihrer Hysteresen (Warmwasser und/oder Heizung) jetzt im StandBy ist und es jetzt Abend wird und somit die PvErzeugung sinkt, meldet evcc weiterhin den maxmimalen maxCurrent für den Loadpoint. Dies führt dazu, dass der SG-/PV-Ready-Kontakt aktiv bleibt und die WP bei unterschreiten der Hysterese wieder mit Vollgas anfängt zu arbeiten.

Bei mir ist der WP Loadpoint auf min. 2,8kw und max. 4,6kw eingestellt.

Müsste der Loadpoint in diesem Fall (Screenshot) nicht disabled werden?

grafik

andig commented 2 months ago

Was jetzt noch dazukommt, ist der maxCurrent, den evcc meldet.

@michiproep der wird nicht gemeldet, sondern eingestellt. Dein Screenshot zeigt es: Du hast Überschuss, also wird geladen. Ob die WP das aufgrund Hysterese gerade konsumiert oder nicht ist da erstmal egal.

Dies führt dazu, dass der SG-/PV-Ready-Kontakt aktiv bleibt und die WP bei unterschreiten der Hysterese wieder mit Vollgas anfängt zu arbeiten.

Das Hauptproblem hier ist m.E., dass evcc den Leistungsbedarf der WP nicht kennt. Du müsstest dafür sorgen, das indirekt mittels minCurrent am Loadpoint einzustellen. Wenn die zum WP-Bedarf passt dann wird der LP auch korrekt abgeschaltet.

Das scheint mir hier aber OT- gerne separate Diskussion dazu.

andig commented 2 months ago

3.4 The default poll.mode is charging. You need it to set on always/connected, see

@MikeTheTux this should be obsolete now since charger can supply soc and will always be polled irrespective of poll mode.

For the rest- since the documentation was greatly enhanced- I'm not sure which points still apply.

andig commented 2 months ago

meters -> WP_Pwr should also support a standbypower parameter. Without, the standby of the heat pump (~15 Watt in my case) is interpreted as "Charging" and accumulates as charged energy.

@MikeTheTux https://github.com/evcc-io/evcc/pull/14546 allows defining power and energy on the custom charger. If you want to make status dependent on power, that can be done by using the go or javascript plugins to intercept the meter values and use those for calculating status. Not particularly pretty, but possible (see https://github.com/evcc-io/evcc/discussions/12761#discussioncomment-9944308 for a technical example).

michiproep commented 2 months ago

Hi @andig Du schreibst:

@michiproep ... Dein Screenshot zeigt es: Du hast Überschuss, also wird geladen. ...

Das kann ich so nicht erkennen. Hab ich da einen Denkfehler? Im Screenshot sieht man, dass ein anderer Ladepunkt schon soviel zieht, dass die Batterie auch schon angezapft wird. Zu dem Zeitpunkt war der Batterie-Status im Bereich "Laden hat Vorrang". Der MinCurrent des Ladepunkts "Warmwasser" steht auf 4A / 2,8kw ; Max: 7A / 4,8kw Warum STELLT evcc den Ladepunkt in dem Fall auf 7A wenn von vorn herein nur maximal 1,8kw verfügbar sind?

andig commented 2 months ago

Das scheint mir hier aber OT- gerne separate Diskussion dazu.