sHedC/python-masterthermconnect

Home Assistant does not properly show passive cooling?

Closed this issue · 40 comments

SeBsZ commented

It seems that we don't show the cooling state properly. My season is shown as summer and the HP function has been set to 'Cooling', my heat pump is passively cooling as the setpoint is low enough. Yet, the heatpump shows 'Heating'. You can also see in my diagnostics that the pump and brine bumps are both running. The compressor is off, so it is clearly not heating.

I've attached my integration diagnostics here:
config_entry-mastertherm-7da32185577a95dc0894742ebfc867fd.json (1).txt

Let me know if you need any more info or data to debug this.

sHedC commented

@SeBsZ - Just checking this and the operating mode Cooling only activates if D_4 is 1, D_4 is the variable for Cooling Mode and in your diagnostics its 0.

Also interested what the APP says at the same time?

What I see is these two registers:
"D_276": "1",
"D_277": "1",

D_276 - Passive Cooling Enabled
D_277 - Passive Cooling brine pump run

Logic now is as follows, the heating and idle I updated the rest should map to what the APP does.
So seems the Cooling and Heating logic could be extended?

In summary

  • Cooling if D_4 (Cooling Mode) is on
  • Heating if D_8 (Fan/ Brine Pump) is on or Compressor1/2 or Circulation pump is on

The assumption was that if in cooling mode D_4 would be on but maybe that is not always true.

        [
            (
                "'dhw' if {0} else "
                "'pool' if {1} else "
                "'aux_heater' if not ({2} or {3}) and ({4} or {5}) else "
                "'dpc' if {6} else "
                "'cooling' if {7} else "
                "'heating' if {8} or {9} or {10} or {11} else "
                "'idle'"
            ),
            [
                [bool, "D_66"],  # 0 - domestic hot water
                [bool, "D_43"],  # 1 - pool
                [bool, "D_20"],  # 2 - some_error
                [bool, "D_21"],  # 3 - three_errors
                [bool, "D_6"],  # 4 - aux heater 1
                [bool, "D_7"],  # 5 - aux heater 2
                [bool, "D_196"],  # 6 - Dew Point
                [bool, "D_4"],  # 7 - Cooling Mode
                [bool, "D_5"],  # 8 - Compressor 1
                [bool, "D_32"],  # 9 - Compressor 2
                [bool, "D_10"],  # 10 - Ciculation
                [bool, "D_8"],  # 11 - Fan
            ],

PS Sorry it took so long work has been super busy, long days.

SeBsZ commented

Thanks. It looks like the app and website are a bit dumb as well, they also show 'Mode: heating'... I think maybe D_277 (Passive cooling brine pump run) indicates if we are currently passively cooling or not.

sHedC commented

Thanks. It looks like the app and website are a bit dumb as well, they also show 'Mode: heating'... I think maybe D_277 (Passive cooling brine pump run) indicates if we are currently passively cooling or not.

Yes I think D_276 turns on when its in cooling mode, D_277 turns on when running the cooling pump and if D_276 is on and we are circulating.

Not sure about compressor/ fan I assume compressor would be off but maybe compressor 2 is on as passive cooling has a separate pump/ fan/ compressor to heating and hot water.

I am trying with the demo system but its completely quiet everything is off at the moment, but I did see it on in the past. I think Active cooling has a compressor (reverse one) and passive just has a separate pump circuit.

So D_276 if 1 what happens to it if the Hot water starts heating? does it go to 0?

sHedC commented

@SeBsZ - Can you test the following:

What are the values for D_276/7 in the following scenarios:

  • When Heating Mode
  • When Cooling Mode but Hot Water is heating
  • When Cooling Mode but Idle
  • When Cooling Mode but only Circulation Pump is running

I am having no luck with the demo systems seems they have turned them off mostly for now.

Thanks

SeBsZ commented

Cooling mode (cold requested) (circulation pump, brine pump running):
"D_276": "1",
"D_277": "1",

Cooling mode, cold requested, but hot water is heating:
"D_276": "1",
"D_277": "0",

Cooling mode, no cold requested, no pumps running:
"D_276": "1",
"D_277": "0",

Cooling mode, no cold requested, but only circulation pump is running:
"D_276": "1",
"D_277": "0",

Heating mode, no heat requested, hot water heating:
"D_276": "1",
"D_277": "0",

Heating mode, heat requested, compressor and all pumps running, season winter and mode: heating:
"D_276": "1",
"D_277": "0",

So to me, it looks like we can definitely use D_277 to indicate passive cooling is active, but it seems like D_276 only indicates whether the heatpump has passive cooling support, not whether it is currently enabled or not.

sHedC commented

Great but needs a bit more which I was concerned about but I think I have an idea the order of the statement won't change its just handling the heating vs cooling more importantly when D_277 is 0 but we are in cooling mode vs heating mode.

I_51 is Function but if that is set to Auto then need a way to tell if auto is in heating or cooling.

Som some stuff:

  • I_51 - Auto/ Cooling/ Heating - Not much use if Auto
  • D_4 - Cooling Mode, I guess then this only turns on if Active cooling is enabled?
  • D_193 - pAD output active (heating/ cooling), maybe?
  • There are some D values for HC1-6 cooling mode requested but these won't be useful as they can be on even if hot water is running
  • D_276 - Passive Cooling Enabled
  • D_277 - Brine pump running in cooling mode
  • D_420 - 0 - Active Cooling, 1 - Passive Cooling
  • D_422 - Active/ Passive cooling enabled

So the ones that might be interesting are D_193 in Heating or Cooling Mode?
D_422 - if Active or Passive Cooling is enabled and D_420 what type of cooling.

If D_193 shows anything in the scenarios then that would make it relatively easy to update the logic correctly.

Alternatively use the season logic which would be harder.

SeBsZ commented

I believe D_193 only turned to 0 in the "Cooling mode, no cold requested, no pumps running:" scenario. It is "1" in all other cases, so not sure how useful that is.

D_420 and D_422 is 0 in all cases...

sHedC commented

I believe D_193 only turned to 0 in the "Cooling mode, no cold requested, no pumps running:" scenario. It is "1" in all other cases, so not sure how useful that is.

its this scanrio:

Cooling mode, no cold requested, but only circulation pump is running:
"D_276": "1",
"D_277": "0",

In this case I need to detect cooling vs heating.

SeBsZ commented

Not sure what more you need? Looks like D_277 is what should be used to show active passive cooling?

Also now I'm seeing:
image

Is this just a typo? Should this be "dewpoint protection"? Currently D_196=1 (dew point) but D_11 = 0 (defrost mode).

SeBsZ commented

I also discovered that when passively cooling, the requested temperature is incorrect:
image

Here the actual temperature is correct, 16.4. But, the target temperature is 15 currently, which is stored in A_312. Can we make this change somehow?

sHedC commented

Not sure what more you need? Looks like D_277 is what should be used to show active passive cooling?

Just wondering how the heat pump would know we are in cooling mode if only the circulation pump is on, but I think I will update the logic to include that D_277 and let see what it does.

I will check out the rest. I was waiting to see if Mastertherm fixt the demo system but its currently broken for weeks so makes it hard for me to test any cooling stuff as I don't have cooling :(

SeBsZ commented

Two things:
I see this line in sensor.en.json:

"dpc": "Defrost Protection"

But dpc is Dew Point Control, not Defrost Protection. So that's wrong and an easy fix.

Another is the cooling curve, some registers are mixed up. If you look at mastertherm.online:
image

And then at HomeAssistant, you can see something is mixed up:
image

As for testing, I can always test stuff for you.

sHedC commented

@SeBsZ - Can you check D_193 when set to heating vs cooling with no activity or just circulation running? I expect it to be 0 for Heating and 1 for Cooling.

Seems it might be useful if I do.

D_193 == 1 and Ciculation Pump Running

Which would then show cooling if only the circulation pump is running.

SeBsZ commented

D_193 is currently 1 while cooling and circulation pump and brine pump running.

What do you want me to test? Not sure what you meant.

sHedC commented

D_193 is currently 1 while cooling and circulation pump and brine pump running.

What do you want me to test? Not sure what you meant.

No that is what I expected, the test data that I found, basically if circulation pump is running but D_277 is 0 then D_193 is 1 for cooling and 0 for heating.

I am updating based on logic to test for D_277 = 1 or D_193 = 1 so if only circulation pump is running but we are cooling then it shows cooling and not heating.

sHedC commented

Also now I'm seeing: image

Is this just a typo? Should this be "dewpoint protection"? Currently D_196=1 (dew point) but D_11 = 0 (defrost mode).

Looks correct in this repo:
defrost_mode = D_11 (when 1) and dewp_control = D_19

Also now I'm seeing: image

Is this just a typo? Should this be "dewpoint protection"? Currently D_196=1 (dew point) but D_11 = 0 (defrost mode).

Its a typo in the translation in the Home Assistant integration I will correct that there.

SeBsZ commented

Yeah, it was in sensor.en.json.

I will try to get the circulation pump running, and then switch between heating and cooling and give you the values of D_193?

sHedC commented

Two things: I see this line in sensor.en.json:

"dpc": "Defrost Protection"

But dpc is Dew Point Control, not Defrost Protection. So that's wrong and an easy fix.

Another is the cooling curve, some registers are mixed up. If you look at mastertherm.online: image

And then at HomeAssistant, you can see something is mixed up: image

As for testing, I can always test stuff for you.

Yep the registers were the wrong way round. Just checking the requirements version and testing as 3.11 is now the default so probalby moving everything up versions.

Then will update the HASS Integration

SeBsZ commented

My heatpump is currently heating for DHW, so passive cooling is temporarily off. I'm getting these registers:

D_193 = 1
D_4 = 0
D_276 = 1
D_277 = 0
D_422 = 0
D_420 = 0

Might be of use.

sHedC commented

thanks basically saying you are in cooling mode but its currently heating water, should be fine.

SeBsZ commented

Thanks. Have you been able to implement A_312 or not yet?

sHedC commented

Yes in latest fix 2.2.4 but not yet put it into hass, tomorrow will do that

Also fixed the operating mode if my guess is right

sHedC commented

All updated in the 1.1.5-b0 release of the integration, let me know once you check the above :)

NOTE: minimum Home assistant version is 2023-06-01 and latest HACS as updated everything to Python 3.11

SeBsZ commented

Hey, two things. So I'm running the latest 1.1.5-b0. My heat pump mode when cooling is now always 'Dew Point Control':
image

I don't believe this is an issue on your end. Dew point protection is enabled and so I think it will always show this, even when I'm not hitting the dew point yet. I checked and D_196 and D_197 are both 1, so not sure what to do about this. I think we don't need to show this in the Operating Mode at all - if I want to see this I can just use the 'Dew Point Control' entity.

Secondly, I asked if you were able to implement A_312 yet but I think you missed what this was about. See my comment here: #99 (comment) . The requested temperature when cooling is incorrect. Let me know if you have any questions about this.

Many thanks for your hard work of course!

sHedC commented

Secondly, I asked if you were able to implement A_312 yet but I think you missed what this was about. See my comment here: #99 (comment) . The requested temperature when cooling is incorrect. Let me know if you have any questions about this.

I missed that one problem with having too many Item in the same issue, will look to check and fix. Did you check the cooling curve?

Hey, two things. So I'm running the latest 1.1.5-b0. My heat pump mode when cooling is now always 'Dew Point Control':

Didn't change this logic, DPC is checked before we get to cooling/ heating in my logic and in the app. What I changed comes after that check. What does the Web App say?

            "'dhw' if {0} else "
            "'pool' if {1} else "
            "'aux_heater' if not ({2} or {3}) and ({4} or {5}) else "
            "'dpc' if {6} else "
            "'cooling' if {7} or {12} or {13} else"
            "'heating' if {8} or {9} or {10} or {11} else "
            "'idle'"

Should follow the APP logic, but you did see heating instead of cooling at some points so must mean DPC is only turned on in some circumstances?

sHedC commented

Yes could always remove the DPC check.

SeBsZ commented

Yeah, DPC isn't always shown. When heating or heating dhw it doesn't show. But, i got the installer to turn on dew point protection for safety reasons and now it is always showing when passively cooling. The website and app do not show it, but then again they show heating so they're worse than our implementation. I would just hide the dpc mode, i don't think it is necessary.

sHedC commented

going to check the app, wonder whit it does not show logic came from there.

sHedC commented

No idea where it came from shall I remove it?

SeBsZ commented

Yeah

sHedC commented

image

There is a operating mode of Cooling with DPC, should we add this instead?

SeBsZ commented

Yeah

sHedC commented

Um what about the translation in HASS.

Cooling with Dew Point Protection seems too long?

sHedC commented

"Cooling (DPC)"?

SeBsZ commented

yes please, that's great

sHedC commented

Ok you can try with 1.1.5 Beta 1, the new operating mode is in there.

sHedC commented

Icon is a snowflake with half water drops.

sHedC commented

Fixed and published to the home assistant integration

I think we should reopen this ticket. All summer, the operating mode showed a nice cooling mode which was great. However, now that I turned it back to winter mode and I started heating again, the mode is showing cooling instead of heating.

In datamapread.py you have this logic:

"'cooling_dpc' if {6} and ({7} or {12} or {13}) else "
"'cooling' if {7} or {12} or {13} else "

I believe the issue here is with {13} which is:

[bool, "D_193"],  # 13 - Requested Mode

This 'requested mode', or register D_193 is discussed above in this ticket. With the current logic, if we're not heating water (dhw), no heating the pool and not running an aux heater then if D_193 is true, we end up in cooling mode. This is not correct, as I believe D_193 can also be 1 when heating.

Maybe this needs more testing?

Changed cooling/ Heating status to use the Winter/ Summer Mode