kamaradclimber / heishamon-homeassistant

An integration for heatpumps handled by heishamon
Apache License 2.0
42 stars 22 forks source link

COP > 10 reported as 0 #137

Closed ClassicGOD closed 11 months ago

ClassicGOD commented 11 months ago

Versions

COP > 10 reported as 0. Related to https://github.com/kamaradclimber/heishamon-homeassistant/blob/eb6c2ecb5fc02f3a7aaac0ab47a5208a055484bc/custom_components/aquarea/sensor.py#L130

We started the heat cycle on our unit for the first time this year. Outside temp was 15C. According to the heatpump itself max COP reached 14 so I think 10 limit on the COP is too low.

To Reproduce Make the heatpump go brrrrr ;)

Expected behavior Report correct COP.

geduxas commented 11 months ago

It's impossible to get that high of cop :D something is really wrong here

ClassicGOD commented 11 months ago

OK i just verified and I have no idea where i got 14 from but it definitely was 10.5 :D image

geduxas commented 11 months ago

OK i just verified and I have no idea where i got 14 from but it definitely was 10.5 :D image

Is it K/L series pump? Never seen so high cop :D 7-8 is top

ClassicGOD commented 11 months ago

It's a KIT-WXC09H3E8 so 3 phase T-CAP H series. It was also the highest COP we've seen but it was first time it heated anything other than hot water. And to be clear, it was momentary COP, average was definitely closer to 7-8

geduxas commented 11 months ago

It's a KIT-WXC09H3E8 so 3 phase T-CAP H series. It was also the highest COP we've seen but it was first time it heated anything other than hot water. And to be clear, it was momentary COP, average was definitely closer to 7-8

:O something really strange. If you had data for exact time. Could you manual calculate it?

((Outlet_temp - inlet_temp) * 4.187 * (flow_rate/60) * 1000)/consumed_electricity

ClassicGOD commented 11 months ago

Sorry I don't know what units you are looking for and result I'm getting from your formula does not make any sense to me. But I'm willing to share: Outlet: 29,97C Inlet: 24C flow: 16,6L/min was reporting 600W power consumption (6400W of production)

kamaradclimber commented 11 months ago

I'm of course ready to consider increase the threshold if it makes sense.

The reason I put one is to avoid outlier values that exist, according to me, because measuring electricity consumption and "produced" heat is not necessarily reliable, especially during transition phases (just an intuition, I don't have anything to back this).

ClassicGOD commented 11 months ago

I'm of course ready to consider increase the threshold if it makes sense.

The reason I put one is to avoid outlier values that exist, according to me, because measuring electricity consumption and "produced" heat is not necessarily reliable, especially during transition phases (just an intuition, I don't have anything to back this).

I completely agree. I'm not proposing removing it but increasing it to like 15 maybe since heatpump itself reported COP > 10.

geduxas commented 11 months ago

Sorry I don't know what units you are looking for and result I'm getting from your formula does not make any scence for me. But I'm willing to share: Outlet: 29,97C Inlet: 24C flow: 16,6L/min was reporting 600W power consumption (6400W of production)

Indeed 11.52 :)

Bucky2k commented 11 months ago

For what it's worth: My own COP calculation based on S0 and heat energy meter I limited at 12 -> that is usually covering all cases of my Aquarea I ever whitnessed (including cooling)

kamaradclimber commented 11 months ago

I've put the limit at 15 and we'll see. At worse we are not filtering enough but apart from value reading by a human, I don't think there is much utility to COP.

MEKadan commented 11 months ago

Just to add to this discussion and what it's worth: I checked my fairly recent H model 9kW T-CAP, and it reports the COP just by production/ consumption ratio. Not by ((Outlet_temp - inlet_temp) * 4.187 * (flow_rate/60) * 1000)/consumed_electricity which might be termophysically more correct?

geduxas commented 11 months ago

Truly no one knows which sensors and how accrue uses Panasonic to calculate it's heat production.. also no one knows exactly where power consumption is measured.. so there is place to debate :) also there is very well known that t-cap series power consumption measures more accurate than other's.

MEKadan commented 11 months ago

According to unit's Energy monitoring/ present situation where there are consumption, generation and COP presented in the same page, it is easy to note that that at least current COP is a result of straightforward mathematical division. Where the consumption/ generation values come from, is more or less unknown, but the point is, that at present there are 2 different COP values depending on which device reports them.

geduxas commented 11 months ago

Yes and cop is division of production/consumption. True point is from where and how consumption and production is calculated.. in user perspective it should be inlet/outlet water temperature difference with flow rate.. in panasonic it can messured near hex (heat exchanger) or maybe in gas pipes.. also what point should calculate consumption? Whole unit or compressor? How about CPU, and circulation pumps. By fact that pump is only reports current for compressor.. it could be that it's just calculates it's power consumption by adding some constants..

MEKadan commented 11 months ago

Yes, we know this, but from normal user's perspective, I think the question is, should Heishamon and Aquarea give the same value and the readings be unified, regardless of the calculation methods?

geduxas commented 11 months ago

:D it's depends.. I think yes it's should be same as pump reports.. and just for those who don't trust that value and want to see difference should use custom calculation.

Bucky2k commented 11 months ago

I feel you are talking from different positions? To my knowledge, Heishamon - and the HA integration - do show exactly the same COP as the Aquarea Control unit, right? Both do the simple "production devided by consumption = COP"

@MEKadan Where do you see the conflict?

Bucky2k commented 11 months ago

Just to add to this discussion and what it's worth: I checked my fairly recent H model 9kW T-CAP, and it reports the COP just by production/ consumption ratio. Not by ((Outlet_temp - inlet_temp) * 4.187 * (flow_rate/60) * 1000)/consumed_electricity which might be termophysically more correct?

This is what the Aquarea is doing. The "production" value reported by Aquarea is calculated internally following the formula you stated (excl. the consumption decision). The sometimes high error on reported COP results from poor/partial consumtion measurement and low resolution of Temp Sensors

MEKadan commented 11 months ago

I feel you are talking from different positions? To my knowledge, Heishamon - and the HA integration - do show exactly the same COP as the Aquarea Control unit, right? Both do the simple "production devided by consumption = COP"

@MEKadan Where do you see the conflict?

Hmm... After recents updates to both Heishamon integration and Heishamon board firmware, I see sensor.aquarea_cop reporting different values than Aquarea

MEKadan commented 11 months ago

E.g: this:

image

Picture reports COP to be 2.19, maths give 2.6?

Bucky2k commented 11 months ago

Screenshot_20231023_135721_Home Assistant Not in my case - it's just plain calculation. 5KW J Series Heishamon 3.2.2 Integration 1.3.2

geduxas commented 11 months ago

I feel you are talking from different positions? To my knowledge, Heishamon - and the HA integration - do show exactly the same COP as the Aquarea Control unit, right? Both do the simple "production devided by consumption = COP" @MEKadan Where do you see the conflict?

Hmm... After recents updates to both Heishamon integration and Heishamon board firmware, I see sensor.aquarea_cop reporting different values than Aquarea

It can't be same.. average for longer period will be in near..

And no, integration don't use that formula.

Bucky2k commented 11 months ago

That is not what I mean. The COP in the integration is straight forward, production divided by consumption as reported by heishamon. My graph shows that, e.g. 2800W / 400Watt = 7.

But MEKadan shows a view where 5200/2000 yields 2.19 instead of 2,6. That should not be possible

MEKadan commented 11 months ago

I feel you are talking from different positions? To my knowledge, Heishamon - and the HA integration - do show exactly the same COP as the Aquarea Control unit, right? Both do the simple "production devided by consumption = COP" @MEKadan Where do you see the conflict?

Hmm... After recents updates to both Heishamon integration and Heishamon board firmware, I see sensor.aquarea_cop reporting different values than Aquarea

It can't be same.. average for longer period will be in near..

And no, integration don't use that formula.

So. is it so that what comes to current COP, the integration and heat pump shows different values?

20231023_143539

at the same time, the integration reports consumption 1.4kW production 4.6 kW COP 2.39

Bucky2k commented 11 months ago

I feel you are talking from different positions? To my knowledge, Heishamon - and the HA integration - do show exactly the same COP as the Aquarea Control unit, right? Both do the simple "production devided by consumption = COP" @MEKadan Where do you see the conflict?

Hmm... After recents updates to both Heishamon integration and Heishamon board firmware, I see sensor.aquarea_cop reporting different values than Aquarea

It can't be same.. average for longer period will be in near.. And no, integration don't use that formula.

So. is it so that what comes to current COP, the integration and heat pump shows different values?

20231023_143539

at the same time, the integration reports consumption 1.4kW production 4.6 kW COP 2.39

I suspect what's wrong on your side... Your MQTT broker still holds an old power / consumption value, the name has changed. Restart / reset your MQTT broker and it should be fine again.

The integration does the same as you with your calculator. Only it finds two consumption or power (formerly energy) values and adds them

MEKadan commented 11 months ago

I suspect what's wrong on your side... Your MQTT broker still holds an old power / consumption value, the name has changed. Restart / reset your MQTT broker and it should be fine again.

Hmm... I have restarted HA at least half a dozen times since installation of the latest updates, should it do the same? I also both reloaded the integration and restarted the addon, to no avail.

The production/ consumption values were updating just fine even before these actions. Only COP does not update correctly. It is calculated in the integration, and thus can not find a relevant MQTT topic.

On thing needs to be clarified also. It was said in the firmware release notes, that:

Rename 'Energy' to 'Power' for the heat/cool/dhw consumption and production topics. Remember to change this into your home automation tools

I must have misunderstood this somehow.

Some background: MQTT Explorer shows the new topics:

Heat_Power_Production = 0
Heat_Power_Consumption = 0
Cool_Power_Production = 0
Cool_Power_Consumption = 0
DHW_Power_Production = 5200
DHW_Power_Consumption = 1400

...and they are updating. The old 'energy' ones are still visible there, but do not update, of course.

Heat_Energy_Production = 0
Heat_Energy_Consumption = 0
Cool_Energy_Production = 0
Cool_Energy_Consumption = 0
DHW_Energy_Production = 4000
DHW_Energy_Consumption = 2200

HOWEVER, the HA entities did not change after the update. They are still the "old style" energy ones, like e.g. sensor.panasonic_aquarea_main_dhw_energy_production

Still, they do get updated values from MQTT. And I cannot find any "new style" entities like sensor.panasonic_aquarea_main_dhw_power_production. Should there be such?

Have I missed something?

Bucky2k commented 11 months ago

The thing is, that for the name change on heishamon side the integration needed to react to the change to still work. What has been coded by @kamaradclimber is that it looks for old and new topic and adds the values. Entities on HA side are kept.

Find a way to set the old energy values in MQTT broker back to 0 and you are fine

MEKadan commented 11 months ago

The thing is, that for the name change on heishamon side the integration needed to react to the change to still work. What has been coded by @kamaradclimber is that it looks for old and new topic and adds the values. Entities on HA side are kept.

Find a way to set the old energy values in MQTT broker back to 0 and you are fine

OK, that did it. Sorry about all the hassle. Thanks. guys :)

MEKadan commented 11 months ago

Just in case others bump into same problem (and I can't see, why some wouldn't...), setting old energy values in MQTT broker (Mosquitto in my case) to 0 was not enough, because they kept on coming back after restarts etc.

Old retained MQTT topics needs to deleted. I don't know if there is a good way to do that e.g. in HA, but for example in MQTT Explorer it is easy.

ClassicGOD commented 11 months ago

In HA you can just send a message (from MQTT integration "configure" page) with retained flag set and empty payload (delete the default 0) to the topic. Sending retained message with 0 would also work but you would forever have phantom data laying around.