rsciriano / ESPHome-OpenTherm

Example of how to control an opentherm boiler with esphome
156 stars 43 forks source link

Setting upper and lower limits in boiler #29

Open bigbrother72 opened 2 years ago

bigbrother72 commented 2 years ago

Hello

My boiler have limits 45-85C. But i want to set in opentherm PID settings limits 50-75C for water in boiler.

How i can set upper and lower limits in opentherm temostat?

rsciriano commented 2 years ago

Hi @bigbrother72 ,

You can do it like this:

climate:
  - platform: custom
    lambda: |-
      OpenthermComponent *openthermComp = (OpenthermComponent*) opentherm;
      return {
        openthermComp->hotWaterClimate, 
        openthermComp->heatingWaterClimate
      };
    climates:
      - id: hot_water
        name: "Hot water"
      - id: heating_water
        name: "Heating water"
        visual:
          min_temperature: 30 °C
          max_temperature: 70 °C        

The custom climates support the same configuration as core climate

bigbrother72 commented 2 years ago

I think that when I start the pid setting, the boiler will change the temperature from the minimum heating to the maximum heating of 85 degrees, adjusting the pid parameters. But my heating pipes are made of polypropylene, which is not recommended to be heated above 75 degrees, as this shortens their service life.

Therefore, somewhere in the code, there is probably or it is necessary to add a limit on the maximum water temperature in the pipes.

It is only visual on frontend page in HA as i think

visual (Optional): Visual settings for the climate device - these do not affect operation and are solely for controlling how the climate device shows up in the frontend.

    min_temperature (Optional, float): The minimum temperature the climate device can reach. Used to set the range of the frontend gauge.

    max_temperature (Optional, float): The maximum temperature the climate device can reach. Used to set the range of the frontend gauge.

that is, these parameters are not related to the temperature of the water, but to the temperature of the air, and these boundaries in which you can adjust the air temperature in the room.

rsciriano commented 2 years ago

The boiler temperature is controlled via `Heating water climate˜

With this climate you set the low and high values (for example 23 °C and 65 °C)

image

bigbrother72 commented 2 years ago

ok thanks

bigbrother72 commented 2 years ago
* When the room termerature is very low than target temperature, the output of the PID will be 1, and the opentherm component set the boiler terperature to 65 °C

* When the room termerature is near target temperature, the output of the PID will be near of 0, and the opentherm component set  the boiler terperature to 23 °C

* When the room termerature is equal or upper target temperature, the output of the PID will be 0, and the opentherm component set the boiler terperature to 10 °C _(this is to keep the pump running, but it was not a good idea and I will change it in future versions)_

but as I understand from this description, it looks more like a simple thermostat.

First, when we need to bring it to the target temperature, the boiler operates at full power (75 degrees as in screenshot)

When the target temperature is almost reached, the PID output is near zero, and then the boiler simply keeps the heating water temperature at a minimum, but it is not enough to maintain the target temperature in the room.

After some time, when the room temperature drops below the target temperature, the boiler will turn on again at full power.

With the PID running, I think some average temperature should be selected - i.e. pid output - should not be 0 or 1, but for example 0.4, 0.5, etc.

In the description of the pid climate on the esphome website https://esphhome.io/components/climate/pid.html

At least one float output to drive for heating or cooling (or both). This could for example be a PWM output via Slow PWM Output that drives a heating unit.

Please note the output must be controllable with continuous value (not only ON/OFF, but any state in between for example 50% heating power).

Or is it because the pid coefficients are wrong?

In the screenshot, the temperature of the water in the boiler and boiler modlation. (there was boiler used ащк shower between 21:20 and 21:30.)

boiler_temp

boiler_modulation

rsciriano commented 2 years ago

Hi @bigbrother72 ,

You have to adjust the PID coefficients, using the auto-tune feature.

For better monitoring of PID operation, you can use "Heating Target Temperature" or "PID Climate HEAT"

P.D: I have not yet been able to adjust the PID to work fine in my home :(