Skip to content

Conversation

@fzahn
Copy link
Contributor

@fzahn fzahn commented Aug 6, 2025

Lambda template corrected for E-Eintrag setting. With this setting the Lambda is allowed to consume the power, that EVCC reports.

Lambda template corrected for E-Eintrag setting
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @fzahn - I've reviewed your changes - here's some feedback:

  • Since removing the 'excess' parameter hardcodes scale to 1, please verify that import/export semantics are still handled correctly without needing a negative multiplier.
  • This change removes an existing parameter, so consider bumping the template version or adding a changelog entry to signal the breaking change.
  • Double-check that the new "Energy-Input" measuring point label exactly matches the device or EVCC documentation to prevent user confusion.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since removing the 'excess' parameter hardcodes scale to 1, please verify that import/export semantics are still handled correctly without needing a negative multiplier.
- This change removes an existing parameter, so consider bumping the template version or adding a changelog entry to signal the breaking change.
- Double-check that the new "Energy-Input" measuring point label exactly matches the device or EVCC documentation to prevent user confusion.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@andig andig marked this pull request as draft August 6, 2025 20:54
@andig andig added the heating Heating label Aug 6, 2025
fzahn added 4 commits August 7, 2025 09:39
Excess-parameter remains and set to deprecated
scale not needed for deprecated param excess
description for excess
@fzahn fzahn marked this pull request as ready for review August 7, 2025 09:07
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @fzahn - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@fzahn
Copy link
Contributor Author

fzahn commented Aug 7, 2025

Is fixed

@fzahn fzahn closed this Aug 7, 2025
@fzahn fzahn reopened this Aug 7, 2025
@anbie
Copy link
Contributor

anbie commented Aug 8, 2025

Could you please clarify the intent of this PR?

In particular:

Fall 2: Negative Energieüberschussmessung: Der Energiezähler misst die Energiemenge in der Netzzuleitung das Gebäudes. Die Wärmepumpe versucht die Überschüssige Energie (PV Ertrag abzüglich aller eletrischen Verbraucher im Gebäude), welche ins Netz eingespeißt werden muss, zu verbrauchen. Negativ bedeuted hier, dass bei Messung eines Überschusses (Strom wird ins Netz eingespeißt) ein negativer Wert angezeigt wird. "

For reference, from the Lambda Modbus Spec - Register 102

Name

102 Actual power (input or excess)

Data Format

UINT16 or INT16

Register desciption

Actual input power [UINT16 (min = 0 W; max = 65535 W)] or actual excess power [INT16 (min = -32768 W; max = 32767 W)] (depends on settings in Module)

(source: https://lambda-wp.at/wp-content/uploads/2025/02/Modbus-Beschreibung-und-Protokoll.pdf)

@fzahn
Copy link
Contributor Author

fzahn commented Aug 9, 2025

Hi,
the current implementation of the Lambda heatpump does not work and using the "negative excess" configuration of Lambda is not appropriate for EVCC. The reason is, that EVCC by design gives the availabe power to the Lambda heatpump and does the excess-calculation itself. That matches the "E-Eintrag" or "Energy-Input" setting of the Lambda.
So with "negative excess" setting the Lambda will not shutdown because of no excess energy, because the own consumption will be added to this value... That does not make sense in combination with EVCC
There was a exhaustive discussion regarding that and this PR is result of that:
#20179 (reply in thread)

Best regards,
Florian

@premultiply premultiply changed the title Update lambda-zewotherm.yaml lambda-zewotherm: use "E-Eintrag" mode only [BC] Aug 9, 2025
@andig andig changed the title lambda-zewotherm: use "E-Eintrag" mode only [BC] Lambda Zewotherm: use "E-Eintrag" mode only [BC] Aug 9, 2025
@andig andig merged commit b7eb467 into evcc-io:master Aug 9, 2025
6 checks passed
@andig
Copy link
Member

andig commented Aug 9, 2025

I've left the BC marker for heads-up, but it really isn't breaking as the old configuration was broken anyway.

@anbie
Copy link
Contributor

anbie commented Aug 9, 2025

My Lambda heat pump is configured with “Neg. E-Überschuss” — a fixed setting that I cannot change myself; it can only be adjusted by Lambda or someone with elevated access.

I’ve been running evcc in this configuration "excess: minus" for about a week, and the test phase has looked quite positive so far. While I haven’t done exhaustive testing, here’s what I’ve observed:

  • The “excess loading” indicators on the Lambda turn on when excess energy is reported from the SolarEdge Hybrid Inverter (or its associated smart meter, to be precise)

  • They turn off when I plug in my car — since the wallbox has higher priority, evcc correctly redirects excess energy to it

  • Whenever I’ve checked Lambda’s Energie-Management panel, the numbers looked correct and I haven’t noticed anomalies

Could you please explain what is actually fixed by removing the "excess: minus" option?

Removing this parameter does break my setup, as the Lambda expects negative values in “Neg. E-Überschuss” mode.

@fzahn @andig @premultiply

@fzahn
Copy link
Contributor Author

fzahn commented Aug 9, 2025

@anbie I see your problem. Please contact your installer to get the level2-password for the lambda, which is required to change the setting to "E-Eintrag".
the setting "excess: minus" is not working properly, as the Lambda is doing own calculation of available power, which conflicts with EVCCs approach.
The details are discussed in the discussion-thread I mentioned above, especialy in this post:
#20179 (reply in thread)
Short summary: with excess: minus the Lambda is starting properly, if there is sufficient pv-excess-power, but it does not stop, when evcc sends "0", as it calulates that as "0+ own consumption". With E-Eintrag that is not the case.

So strongly recommend to have your installer change the setting to E-Eintrag (or ask Lambda-support to do that for you, they seem to have a good support)

@andig
Copy link
Member

andig commented Aug 9, 2025

@anbie Irrespective of this change, your current installer settings just don't fit how evcc works. This is already a problem without this PR, hence doesn't make a difference. If you're happy with how it's working (though not perfectly) just leave it as-is.

@anbie
Copy link
Contributor

anbie commented Aug 9, 2025

@andig
Thanks for the quick response!

I’m pretty sure that “just leaving it as-is” will actually stop working once this PR is shipped. This change removes the scale statement from the setmaxpower section in the template:
scale: {{ if eq .excess "plus" }}1{{ else }}-1{{ end }}

Without that, negative numbers will no longer be generated and sent to Lambda’s register 102. Since my Lambda is in “Neg. E-Überschuss” mode removing the scale will break the current working but not perfect behavior in my setup.

@fzahn
Copy link
Contributor Author

fzahn commented Aug 9, 2025 via email

@andig
Copy link
Member

andig commented Aug 10, 2025

@anbie autsch, danke für den Hinweis. As discussed, your setup is "wrong" but I also realise you can't fix it. I'd suggest we add scale as advanced parameter like this:

params: 
  - name: scale
scale: {{ if eq .excess "minus" }}-1{{ else }}{{ .scale }}{{ end }}

@fzahn wdyt?

We can also leave out the minus and just add a new scale param

@fzahn
Copy link
Contributor Author

fzahn commented Aug 10, 2025

Hi,
i will implement that and push the change in a few minutes. I will add a description, that this parameter is normally not needed and should not be touched.

Regards,
Florian

@fzahn
Copy link
Contributor Author

fzahn commented Aug 10, 2025

I opened a new PR for that change. I was not able to reuse the excess-parameter, when it was set to deprecated. so I have removed the deprecated setting and made the parameter excess advanced. So we now have the backwards -compatibility

thecem pushed a commit to thecem/evcc that referenced this pull request Sep 11, 2025
StarF666 pushed a commit to StarF666/evcc that referenced this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

heating Heating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants