Skip to content

COP energy offset values in P1P2MQTT-bridge.ino#276

Open
AndrCarl wants to merge 1 commit into
Arnold-n:mainfrom
AndrCarl:patch-1
Open

COP energy offset values in P1P2MQTT-bridge.ino#276
AndrCarl wants to merge 1 commit into
Arnold-n:mainfrom
AndrCarl:patch-1

Conversation

@AndrCarl
Copy link
Copy Markdown

Motivation

The current COP calculations (COP_Lifetime, COP_Before_Bridge, COP_After_Bridge) rely fully on the Daikin-reported lifetime energy counters.

In practice, these counters are often not ideal as an absolute baseline because:

external electricity meters may have different accumulated totals
compressor/outdoor-unit replacements may reset counters
historical values before P1P2MQTT installation may be incomplete
users may want to align COP calculations with calibrated metering data
thermal/electrical lifetime counters may already contain installation-specific offsets

This PR proposes adding configurable offsets for:

electrical consumed energy
thermal produced energy

which are added before COP calculation.

Proposed implementation

Add two new persistent EEPROM-backed parameters:

These should behave like existing configurable bridge parameters:

configurable via telnet
configurable via MQTT / Home Assistant
persistent in EEPROM
changeable without recompiling firmware

Suggested EEPROM fields:

uint32_t electricityConsumedCompressorHeating1Offset;
uint32_t energyProducedCompressorHeating1Offset;

Suggested parameter names:

"Electricity kWh offset"
"Production kWh offset"
COP calculation

Instead of:

cop = produced / consumed;

use:

effectiveConsumed =
daikinConsumed + electricityKwhOffset;

effectiveProduced =
daikinProduced + thermalKwhOffset;

cop = effectiveProduced / effectiveConsumed;

Additional note

To avoid breaking existing EEPROM layouts and parameter numbering, the new parameters should preferably be appended at the end of the existing parameter table instead of inserted between existing parameter IDs.

### Still to do's: I haven't found calucaltion of COP itself

Hope I haven't forgot a if clause with the new parameters

code should look like this

uint32_t electricityConsumedCompressorHeating1ForCop = electricityConsumedCompressorHeating1 + EE.electricityConsumedCompressorHeating1Offset;

uint32_t energyProducedCompressorHeating1ForCop = energyProducedCompressorHeating1 + EE.energyProducedCompressorHeating1Offset;
float copLifetime = electricityConsumedCompressorHeating1ForCop ? (float) energyProducedCompressorHeating1ForCop / (float) electricityConsumedCompressorHeating1ForCop+ : 0;

* ArduinoJson 6.11.3 by Benoit Blanchon
*
* Version history
* 20260513 v0.9.57 Offset for COP calculation (elecrical/thermal)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

wrong version :-(. It looks like the example is older; current ino.bin has v0.9.58rc23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant