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

thermostat_over_climate: What do the external temperature sensor and the room temperature probe do? #125

Closed
maia opened this issue Oct 16, 2023 · 9 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested

Comments

@maia
Copy link

maia commented Oct 16, 2023

The documentation states that for the thermostat_over_climate mode three things are required: an underlying climate entity, a room temperature sensor and an external temperature sensor.

What do the external temperature sensor and the room temperature probe actually do? How do they influence the control of a TRV (thermostatic radiator valve)? How does versatile thermostat calibrate the target_temperature based on the measured indoor temperature?

I've browsed the code and it seems like both these values are only used in the thermostat_over_switch mode but are irrelevant in the thermostat_over_climate mode. But maybe I'm missing something, my Python/Jinja knowledge is very small.

@masi
Copy link

masi commented Oct 17, 2023

https://github.com/jmcollin78/versatile_thermostat#parameters-synthesis
Both values are only used by thermostat_over_switch .

But what I don't get is what the external sensor is for. There is no hint in the documentation except that it is crucial.

"Better Thermostat" also needs one, but is also lacking an explanation in the docs.

@maia
Copy link
Author

maia commented Oct 17, 2023

Better thermostat only uses the external temperature to turn on/off the heating when the average temperature of the past three days rises above or falls below a certain level. Or it might be similar to that, I didn't look it up, but it does not alter the heating power based on the outdoor temperature.

If Versatile Thermostat neither uses the external temperature nor the room temperature when using the thermostat_over_climatemode, it would be good to adjust the documentation, as that specifically says, these two sensors are the minimum requirement even in this mode.

Still, it would be sad if Versatile Thermostat really does not do anything with the indoor room temperature. After these two days of heating with my new setup (Aqara Zigbee room temperature sensors in every room and Eve Thermo TRVs in every room) I can see that the TRVs would certainly benefit of calibration. Some TRVs keep the valve open at 20-30% although the room temperature is more than 1°C above the target temperature. This kind of calibration is a key feature of Better Thermostat and I hoped that VTherm does this calibration too.

@jmcollin78
Copy link
Owner

The documentation states that for the thermostat_over_climate mode three things are required: an underlying climate entity, a room temperature sensor and an external temperature sensor.

What do the external temperature sensor and the room temperature probe actually do? How do they influence the control of a TRV (thermostatic radiator valve)? How does versatile thermostat calibrate the target_temperature based on the measured indoor temperature?

I've browsed the code and it seems like both these values are only used in the thermostat_over_switch mode but are irrelevant in the thermostat_over_climate mode. But maybe I'm missing something, my Python/Jinja knowledge is very small.

You are right @maia , temperature and external temperature are now not used for thermostat over climate. It was the case in previous release but has been removed. Previously, it was to manage the security mode (when temperature sensors are not available). But, because in over climate mode, the regulation is done by the underlying climate itself, the security mode have been deactivated for over climate thermostat. I will fix the documentation.

As said by @masi , this have been added into the https://github.com/jmcollin78/versatile_thermostat#parameters-synthesis table.

@maia
Copy link
Author

maia commented Oct 17, 2023

@jmcollin78 Do you consider the possibility of adding a calibration feature similar to the one used by Better Thermostat? (see https://better-thermostat.org/configuration specifically "Calibration Type" and "Calibration Mode")

@jmcollin78
Copy link
Owner

Some TRVs keep the valve open at 20-30% although the room temperature is more than 1°C above the target temperature. This kind of calibration is a key feature of Better Thermostat and I hoped that VTherm does this calibration too.

I don't think that force activation of Thermostat using the external temperature is a good idea. Turning on and off thermostat should stay a manual operation i think. it is a decision which is no so easy to take: what will the weather like on next days ? Am I there ? ...

On the contrary, auto-calibration is a very interesting feature and I would really be pleased to add it. It is not planned but if someone can explain how it would work, i will be interested to add it.

Let's try to define what is a calibration and when it is needed:

  1. a calibration is an offset added to a target temperature,
  2. a calibration should be used when the target temperature cannot be reach after the current temperature is stable,

Don't hesitate to propose something else.

If I look at the temperature in my room in which a reversible AC climate is installed, I've got this:
(above the power of the clim, below the temperature in the room)
Capture d’écran 2023-10-17 à 23 04 33

We can see, the current temperature is never stable. Have you something different ?
I fear it will be difficult to obtain something usefull.

@jmcollin78
Copy link
Owner

jmcollin78 commented Oct 17, 2023

@jmcollin78 Do you consider the possibility of adding a calibration feature similar to the one used by Better Thermostat? (see https://better-thermostat.org/configuration specifically "Calibration Type" and "Calibration Mode")

I didn't know this thermostat and i'm discovering it just now. I will have a close look at it. The approach is quiet similar (thermostat over climate) but the calibration with 3 modes is interesting.

@jmcollin78 jmcollin78 added documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested labels Oct 17, 2023
@maia
Copy link
Author

maia commented Oct 18, 2023

I don't think that force activation of Thermostat using the external temperature is a good idea. Turning on and off thermostat should stay a manual operation i think.

I agree. The only reason for integrating an outdoor temperature sensor is to adjust heating parameters based on the outdoor temperature. For example some central heating systems with radiators adjust the flow temperature based on the outdoor temperature. In the case of VTherm the outdoor temperature sensor could have an effect on the offset/calibration (see below).

Let's try to define what is a calibration and when it is needed:

  1. a calibration is an offset added to a target temperature,
  2. a calibration should be used when the target temperature cannot be reach after the current temperature is stable

In my setup the issue is that while the room temperature already is above the target temperature, the radiator keeps heating, as its internal temperature sensor has a different result. So what the calibration could do is:

Initial offset calculation (calibration phase)

  1. For each climate entity, create a offset value with default 0.
  2. Whenever the room temperature is more than 0,5°C above or below the target temperature, compare the room temperature with the TRV internal temperature sensor.
  3. Adjust the offset value by adding/subtracting a fraction of the difference calculated in the step above. This could be done as a simple exponential moving average or (more complex but maybe interesting too) as bayesian model averaging in a time series model

Usage of offset (regular usage phase)

  1. Once the calculated offset is stable, one could manually activate it to alter the underlying target temperature. For example if my room usually overheats by about 1°C (measured by the room temperature) and if my target temperature is 21°C, the VTherm entity will ask the underlying climate entity to heat to 20°C.
  2. The offset should be adjusted based on additional calculations as described above, but with smaller adjustments.

We can see, the current temperature is never stable. Have you something different ? I fear it will be difficult to obtain something usefull.

In my case the TRVs adjusts the valve percentage constantly based on the differences between current temp and target temp. The fluctuations are tiny, as the TRV acts preemptively. Here's an example, you can see when I opened the windows, when the target temperature changed or when the door to the next room (which is slightly warmer) was open. And this room has the target temp set at 21°C most of the time, so you can see that it overheats constantly.
Bildschirmfoto 2023-10-18 um 12 24 43

@jmcollin78
Copy link
Owner

In the case of VTherm the outdoor temperature sensor could have an effect on the offset/calibration (see below).

Exactly. I found some interesting algorithm to achieve this.

Usage of offset (regular usage phase)
Once the calculated offset is stable, one could manually activate it to alter the underlying target temperature. For example if my room usually overheats by about 1°C (measured by the room temperature) and if my target temperature is 21°C, the VTherm entity will ask the underlying climate entity to heat to 20°C.
The offset should be adjusted based on additional calculations as described above, but with smaller adjustments.

Indeed ! If you are a "specialist" I can share with you the algorithm I found and I intend to test. It is really near what you are saying. It is based on PI (Proprotionnal and Integral methods).

@jmcollin78
Copy link
Owner

I close this issue and keep the #129 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants