Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with defrost binary sensor #130

Open
4 tasks done
jeroen85 opened this issue Nov 2, 2024 · 9 comments
Open
4 tasks done

Issues with defrost binary sensor #130

jeroen85 opened this issue Nov 2, 2024 · 9 comments

Comments

@jeroen85
Copy link

jeroen85 commented Nov 2, 2024

System Health details

N/A

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

I experience a lot of Defrost cases with my HP1 while it is not defrosting at all. It happens during start of the HP.

bnpG0hOhZCTf9QlpiHMuM6PH

in my case it is caused by a small temperature difference of the water inlet and outlet sensor when the HP is not in use. This results in the power measurement becoming negative, exceeding -100W and triggering the defrost binary sensor.
gQ3RuQAqn5hKC7khNQJZug2n

Maybe some additional parameters should be checked to determine defrost situations?

Reproduction steps

N/A

Debug logs

N/A

Diagnostics dump

No response

@jeroen85
Copy link
Author

jeroen85 commented Nov 3, 2024

As the heat power decreases up to -6000W during defrost I would suggest to change the threshold to something like -2000W instead of -100W

@patrickvorgers
Copy link
Contributor

patrickvorgers commented Nov 3, 2024

What I see in the code is that it uses the power and powerinput from the Quatt and not the waterdelta.
Can you create a graph of a longer period of the power and powerinput of HP1?

What I see in the graph currently that it probably has to do something with having a Quatt Duo. When HP2 is active HP1 is running on "low" power (less than 100W).

@patrickvorgers
Copy link
Contributor

Looking at my own Quatt (don't have a duo), it seems like that changing the heatpower check to -2500 could do the trick.

image

Could you change in the file coordinator.py (custom_components/quatt) the computedDefrost function?
Especially the return statement which checks the ranges of the input and output power.
After the change you have to restart Home Assistant to activate the change.
Please check whether that fixes the issue for you.

    def computedDefrost(self, parent_key: str | None = None):
        """Compute Quatt Defrost State."""
        if parent_key is None:
            return None

        powerInput = self.getValue(parent_key + ".powerInput")
        powerOutput = self.getValue(parent_key + ".power")

        LOGGER.debug("%s.computedDefrost.powerInput %s", parent_key, powerInput)
        LOGGER.debug("%s.computedDefrost.powerOutput %s", parent_key, powerOutput)

        if powerInput is None or powerOutput is None:
            return None

        powerOutput = float(powerOutput)
        powerInput = float(powerInput)

        return powerOutput < -2500 and powerInput > 100

@jeroen85
Copy link
Author

jeroen85 commented Nov 3, 2024

What I see in the code is that it uses the power and powerinput from the Quatt and not the waterdelta. Can you create a graph of a longer period of the power and powerinput of HP1?

The power is a calculated value within the CiC. It is the flow * heat capacity of water * T_waterdelta. As the T_waterdelta becomes slightly negative (-0,1 degC), the resulting power measurement also get's negative. This exceeds the threshold of -100W and triggers the defrost binary.

I will change the coordinator.py file, thanks for the suggestion!

@patrickvorgers
Copy link
Contributor

What I see in the code is that it uses the power and powerinput from the Quatt and not the waterdelta. Can you create a graph of a longer period of the power and powerinput of HP1?

The power is a calculated value within the CiC. It is the flow * heat capacity of water * T_waterdelta. As the T_waterdelta becomes slightly negative (-0,1 degC), the resulting power measurement also get's negative. This exceeds the threshold of -100W and triggers the defrost binary.

I will change the coordinator.py file, thanks for the suggestion!

You are right that the CIC uses a similar formula as the Quatt integration when an external powermeter is used to calculate the produced heat computedWaterDelta * flowRate * 1.137888.

Great that you are going to test out the change. Please report back whether it fixes the issue. I will also apply the change myself and check the effects on a single Quatt. After some testing I will create a pull request (PR) for the change.

@jeroen85
Copy link
Author

jeroen85 commented Nov 4, 2024

It worked as expected. Binary sensor indicated defrost when power was below -2500W.
No defrost for small power drops (for example the -233W around 12:00)

Screenshot 2024-11-04 200315

@patrickvorgers
Copy link
Contributor

@jeroen85, I created a PR with the fix. Hopefully it will be merged soon.

@patrickvorgers
Copy link
Contributor

patrickvorgers commented Nov 7, 2024

Today, I was checking the defrost sensor and I saw that I don't get any negative power values anymore. After some investigation I saw that the CiC was upgraded to version 2.20.2.
Below is what I see currently and I suspect that it is a defrost:

  • Power value is 0
  • Waterdelta is negative

image

@jeroen85, could you check whether you see the same behaviour?

@jeroen85
Copy link
Author

jeroen85 commented Nov 9, 2024

I will, unfortunately no defrosts these days

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

No branches or pull requests

2 participants