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

Feature/linear compensation (proportional controller mode) #1522

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

folfy
Copy link
Collaborator

@folfy folfy commented Dec 19, 2024

Motivation:

Some eTRVs, like HomematicIP thermostats for example, already have a rather aggressive internal compensation for the thermostat temperature (rising with the radiator on), and using any of the modes by BT causes overcompensation, leading to rather strong oscillation and overheating, even with overheat protection enabled. "No compensation" works, but also leads to not really properly reaching our target temperature often (which would be the whole point of a thermostat controller like BT).

Therefore, a new "linear compensation" algorithm is introduced, which does not consider the actual TRV temperature, but simply adds a proportional (as part of a regular PID controller) offset, based on (t_setpoint - t_extsensor) * f_gain (factor is adjustable), with the applied offset being clamped (also supposed to be adujstable). This is a tradeoff, resulting in at least very small residual deltas (<0.2-0.3°C at worst for me), while minimizing risk for overcompensation (it's not 0, as this calibration can still lead to overheating in a very small room, or if the temperature sensor is slow/lagging in updating us).

RFC - Let me know if you're generally up for adding this feature to BT. This is currently a WIP/draft, because my branch is not up-to-date, PR#1502 is duplicated in this branch/PR, translations are missing, just the very basic function was added so far.

Changes:

  • Added LINEAR_CALIBRATION mode accross the board (calibration.py, definitions, config flow, description...)
  • Changed _calibration_mode checks in calibration.py to if - elif chain

DRAFT PR - ToDo's

Additional features to be approved

-> These two could be applied generally for all modes, with a default of 1 (unity gain) and 0 / empty (no clamping)? This should be helping quite some ppl, being able to dial in and tune the aggressiveness.

Other

Related issue:

Checklist:

  • I did not change any code (e.g. documentation changes)
  • The code change is tested and works locally.

Test-Hardware list (for code changes)

HA Version: 2024.12
Zigbee2MQTT Version: N/A (ZHA)
TRV Hardware: HmIP-eTRV-B-2 R4M by eQ-3 (HomematicIP)

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.

Feature Request: Add an option that limits calibrating offset Does not round correctly
2 participants