MELCloud / Ecodan energy monitoring

I suspect that my Ecodan ASHP is mis-reporting energy consumption & output and I’m regretting not getting an energy monitoring package when the system was installed last spring. I’ve got an answer on the consumption by taking daily readings from the consumer panel meter & more recently adding a Shelly EM: MELcloud under-reports total consumption by about the amount consumed by the circulation pumps.
So I turned my attention to validating the energy output. This should be easy: multiply the delta T by the flow rate by the specific heat of the fluid. Melcloud reports flow & return temps & I can look up the data on the 30% propylene glycol in the system (1.1155Wh/litre/degC). Finding the flow rate is a pain: although you can get it from MELCloud (service menu / running information / ref 540 gives current flow in litres/min). I couldn’t find any way of getting this into HA automatically so I:-

  • used a REST sensors to get "HP_WaterPump1Status" and "HP_WaterPump2Status" which are the HP circulation pump and UFH circulation pump respectively. If 1 is on & 2 is off then the pump is in HW mode, if both are on it is in heating mode.
  • Used MELCloud service code 540 & made a note of the flow rates in the 2 modes & store these in 'input_number.flow_rate_hw' and input_number.flow_rate_htg
  • Created a template sensor to set HP_flow_rate_now (discussed at Choosing a vlaue for a template sensor - #3 by Didgeridrew)
  • Created a template sensor
    - name: HP flow rate dT
      state: "{{ states('sensor.HP_flow_rate_now')|float * states('sensor.HP_Flow_delta_T')|float }}" 
      unit_of_measurement: lC/min
  • Used a Reimann Integral to sum this minute by minute:
  - platform: integration
    source: sensor.HP_flow_rate_dT
    name: HP_flow_rate_dT_integral
    round: 3
    unit_time: min
    method: left
  • Use a template sensor to get this into a form that can be examined by statistics cards:
    - name: HP output by flowdT
      state: "{{ states('sensor.HP_flow_rate_dT_integral') | float  * 0.0011155 }}" #new glycol correction 17:15 on 27th Feb
      unit_of_measurement: kWh
      device_class: energy
      unique_id: hw_output_by_flowdT
      state_class: total_increasing

At present I am manually keeping track of this for the Hot Water cycle separately from the Heating. The trouble is it bears no relationship with what MELCloud is reporting. E.g.

Date   MELCloud HW   HA est    Melcloud Htg HA est
28/2        5.7kWh    4.9         20.9      17.93
1/3         4.9       4.12        21.7      16.41

Has anyone else tried to do this or got any ideas on how to improve it?

Isn’t it just a question of other losses in the system? You are assuming 100% efficiency? Maybe calculate a ratio between your hourly/daily values and MELclouds to see if they are approximately constant. I would suspect that the efficiency will depend on the temperature differences outside and inside, if not event their absolute values.