rsciriano / ESPHome-OpenTherm

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

Remeha Tzerra Ace - setBoilerTemperature always at 10 °C #32

Closed jfranken2 closed 1 year ago

jfranken2 commented 2 years ago

Hello,

first i want to thank you for this great project. Realy good work! I'm trying to use the opentherm master shield with a wemos d1 mini from diyless.com with a remeha tzerra ace boiler.

The hot water control and nearly all sensor values in HA are working fine, except the heating target temperature is always set to 10°C and can't be modified. I don't know why the PID_OUTPUT value is always 0.0.

Here is the log of the wemos d1:

[15:29:45][C][logger:275]: Logger:
[15:29:45][C][logger:276]:   Level: DEBUG
[15:29:45][C][logger:277]:   Log Baud Rate: 115200
[15:29:45][C][logger:278]:   Hardware UART: UART0
[15:29:45][C][template.switch:058]: Template Switch 'PID Climate Autotune'
[15:29:45][C][template.switch:059]:   Restore State: NO
[15:29:45][C][template.switch:060]:   Optimistic: NO
[15:29:45][C][pid.climate:062]: PID Climate 'PID Climate Controller'
[15:29:45][C][pid.climate:063]:   Control Parameters:
[15:29:45][C][pid.climate:064]:     kp: 0.38197, ki: 0.01012, kd: 3.60387
[15:29:45][C][pid.sensor:056]: PID Climate Sensor 'PID Climate Result'
[15:29:45][C][pid.sensor:056]:   State Class: 'measurement'
[15:29:45][C][pid.sensor:056]:   Unit of Measurement: '%'
[15:29:45][C][pid.sensor:056]:   Accuracy Decimals: 1
[15:29:45][C][pid.sensor:056]:   Icon: 'mdi:gauge'
[15:29:45][C][pid.sensor:056]: PID Climate Sensor 'PID Climate HEAT'
[15:29:45][C][pid.sensor:056]:   State Class: 'measurement'
[15:29:45][C][pid.sensor:056]:   Unit of Measurement: '%'
[15:29:45][C][pid.sensor:056]:   Accuracy Decimals: 1
[15:29:45][C][pid.sensor:056]:   Icon: 'mdi:gauge'
[15:29:45][C][pid.sensor:056]: PID Climate Sensor 'PID Climate ERROR'
[15:29:45][C][pid.sensor:056]:   State Class: 'measurement'
[15:29:45][C][pid.sensor:056]:   Unit of Measurement: '%'
[15:29:45][C][pid.sensor:056]:   Accuracy Decimals: 1
[15:29:45][C][pid.sensor:056]:   Icon: 'mdi:gauge'
[15:29:45][C][captive_portal:088]: Captive Portal:
[15:29:45][C][mdns:084]: mDNS:
[15:29:45][C][mdns:085]:   Hostname: heizungssteuerung
[15:29:45][C][ota:085]: Over-The-Air Updates:
[15:29:45][C][ota:086]:   Address: heizungssteuerung.local:8266
[15:29:45][D][opentherm_component:095]: update heatingWaterClimate: 3
[15:29:45][D][opentherm_component:096]: update hotWaterClimate: 3
[15:29:46][D][opentherm_component:116]: PID_OUTPUT is 0.000000
[15:29:46][D][opentherm_component:125]: setBoilerTemperature  at 10.000000 °C (from PID Output)
[15:29:47][D][sensor:124]: 'External Temperature': Sending state 17.59766 °C with 0 decimals of accuracy
[15:29:47][D][sensor:124]: 'Return Temperature': Sending state 21.60938 °C with 1 decimals of accuracy
[15:29:47][D][sensor:124]: 'Boiler Temperature': Sending state 21.72656 °C with 1 decimals of accuracy
[15:29:47][D][sensor:124]: 'Heating Water Pressure': Sending state 1.39844 hPa with 1 decimals of accuracy
[15:29:47][D][sensor:124]: 'Boiler Modulation': Sending state 0.00000 % with 0 decimals of accuracy
[15:29:47][D][sensor:124]: 'Heating Target Temperature': Sending state 10.00000 °C with 1 decimals of accuracy
[15:29:47][D][climate:385]: 'Hot water' - Sending state:
[15:29:47][D][climate:388]:   Mode: HEAT
[15:29:47][D][climate:390]:   Action: OFF
[15:29:47][D][climate:408]:   Current Temperature: 49.36°C
[15:29:47][D][climate:414]:   Target Temperature: 50.00°C
[15:29:47][D][climate:385]: 'Heating water' - Sending state:
[15:29:47][D][climate:388]:   Mode: HEAT
[15:29:47][D][climate:390]:   Action: OFF
[15:29:47][D][climate:408]:   Current Temperature: 21.73°C
[15:29:47][D][climate:411]:   Target Temperature: Low: 5.00°C High: 80.00°C
[15:29:47][C][api:138]: API Server:
[15:29:47][C][api:139]:   Address: heizungssteuerung.local:6053
[15:29:47][C][api:143]:   Using noise encryption: NO
[15:29:47][C][homeassistant.sensor:030]: Homeassistant Sensor 'Actual temperature'
[15:29:47][C][homeassistant.sensor:030]:   State Class: ''
[15:29:47][C][homeassistant.sensor:030]:   Unit of Measurement: '°C'
[15:29:47][C][homeassistant.sensor:030]:   Accuracy Decimals: 1
[15:29:47][C][homeassistant.sensor:031]:   Entity ID: 'sensor.temperature_sensor'
[15:29:48][D][opentherm_component:095]: update heatingWaterClimate: 3
[15:29:48][D][opentherm_component:096]: update hotWaterClimate: 3
[15:29:49][D][opentherm_component:116]: PID_OUTPUT is 0.000000
[15:29:49][D][opentherm_component:125]: setBoilerTemperature  at 10.000000 °C (from PID Output)
[15:29:50][D][sensor:124]: 'External Temperature': Sending state 17.60938 °C with 0 decimals of accuracy
[15:29:50][D][sensor:124]: 'Return Temperature': Sending state 21.60938 °C with 1 decimals of accuracy
[15:29:50][D][sensor:124]: 'Boiler Temperature': Sending state 21.71875 °C with 1 decimals of accuracy
[15:29:50][D][sensor:124]: 'Heating Water Pressure': Sending state 1.39844 hPa with 1 decimals of accuracy
[15:29:50][D][sensor:124]: 'Boiler Modulation': Sending state 0.00000 % with 0 decimals of accuracy
[15:29:50][D][sensor:124]: 'Heating Target Temperature': Sending state 10.00000 °C with 1 decimals of accuracy
[15:29:50][D][climate:385]: 'Hot water' - Sending state:
[15:29:50][D][climate:388]:   Mode: HEAT
[15:29:50][D][climate:390]:   Action: OFF
[15:29:50][D][climate:408]:   Current Temperature: 49.30°C
[15:29:50][D][climate:414]:   Target Temperature: 50.00°C
[15:29:50][D][climate:385]: 'Heating water' - Sending state:
[15:29:50][D][climate:388]:   Mode: HEAT
[15:29:50][D][climate:390]:   Action: OFF
[15:29:50][D][climate:408]:   Current Temperature: 21.72°C
[15:29:50][D][climate:411]:   Target Temperature: Low: 5.00°C High: 80.00°C
[15:29:51][D][opentherm_component:095]: update heatingWaterClimate: 3
[15:29:51][D][opentherm_component:096]: update hotWaterClimate: 3
[15:29:52][D][opentherm_component:116]: PID_OUTPUT is 0.000000
[15:29:52][D][opentherm_component:125]: setBoilerTemperature  at 10.000000 °C (from PID Output)
[15:29:53][D][sensor:124]: 'External Temperature': Sending state 17.62891 °C with 0 decimals of accuracy
[15:29:53][D][sensor:124]: 'Return Temperature': Sending state 21.60938 °C with 1 decimals of accuracy
[15:29:53][D][sensor:124]: 'Boiler Temperature': Sending state 21.71875 °C with 1 decimals of accuracy
[15:29:53][D][sensor:124]: 'Heating Water Pressure': Sending state 1.39844 hPa with 1 decimals of accuracy
[15:29:53][D][sensor:124]: 'Boiler Modulation': Sending state 0.00000 % with 0 decimals of accuracy
[15:29:53][D][sensor:124]: 'Heating Target Temperature': Sending state 10.00000 °C with 1 decimals of accuracy
[15:29:53][D][climate:385]: 'Hot water' - Sending state:
[15:29:53][D][climate:388]:   Mode: HEAT
[15:29:53][D][climate:390]:   Action: OFF
[15:29:53][D][climate:408]:   Current Temperature: 49.35°C
[15:29:53][D][climate:414]:   Target Temperature: 50.00°C
[15:29:53][D][climate:385]: 'Heating water' - Sending state:
[15:29:53][D][climate:388]:   Mode: HEAT
[15:29:53][D][climate:390]:   Action: OFF
[15:29:53][D][climate:408]:   Current Temperature: 21.72°C
[15:29:53][D][climate:411]:   Target Temperature: Low: 5.00°C High: 80.00°C
[15:29:53][D][api:102]: Accepted 192.168.178.5
[15:29:53][D][api.connection:861]: Home Assistant 2022.6.7 (192.168.178.5): Connected successfully
[15:29:54][D][opentherm_component:095]: update heatingWaterClimate: 3
[15:29:54][D][opentherm_component:096]: update hotWaterClimate: 3
[15:29:55][D][opentherm_component:116]: PID_OUTPUT is 0.000000
[15:29:55][D][opentherm_component:125]: setBoilerTemperature  at 10.000000 °C (from PID Output)
[15:29:56][D][sensor:124]: 'External Temperature': Sending state 17.59766 °C with 0 decimals of accuracy
[15:29:56][D][sensor:124]: 'Return Temperature': Sending state 21.60938 °C with 1 decimals of accuracy
[15:29:56][D][sensor:124]: 'Boiler Temperature': Sending state 21.71875 °C with 1 decimals of accuracy
[15:29:56][D][sensor:124]: 'Heating Water Pressure': Sending state 1.39844 hPa with 1 decimals of accuracy
[15:29:56][D][sensor:124]: 'Boiler Modulation': Sending state 0.00000 % with 0 decimals of accuracy
[15:29:56][D][sensor:124]: 'Heating Target Temperature': Sending state 10.00000 °C with 1 decimals of accuracy
[15:29:56][D][climate:385]: 'Hot water' - Sending state:
[15:29:56][D][climate:388]:   Mode: HEAT
[15:29:56][D][climate:390]:   Action: OFF
[15:29:56][D][climate:408]:   Current Temperature: 49.30°C
[15:29:56][D][climate:414]:   Target Temperature: 50.00°C
[15:29:56][D][climate:385]: 'Heating water' - Sending state:
[15:29:56][D][climate:388]:   Mode: HEAT
[15:29:56][D][climate:390]:   Action: OFF
[15:29:56][D][climate:408]:   Current Temperature: 21.72°C
[15:29:56][D][climate:411]:   Target Temperature: Low: 5.00°C High: 80.00°C
[15:29:57][D][opentherm_component:095]: update heatingWaterClimate: 3
[15:29:57][D][opentherm_component:096]: update hotWaterClimate: 3
**[15:29:58][D][opentherm_component:125]: setBoilerTemperature  at 10.000000 °C (from PID Output)**

Is there something i forgot to configure, or to modify in the code, or any other ideas? Thank you. Regards Jan

ShurikenGitHub commented 1 year ago

Hi Jan, If the heating is off (seems like your room temperature is 21.7c), the target temp is 10c, if you turn on the heating and set the target temp to 24c or so, the target temp should go to 50c. The target temp is 10c when no heat is required, so in this case it's correct. If the temperature is still not set, you can have a look at this table, see if all required parameters are supported for your boiler: https://otgw.tclcode.com/matrix.cgi#boilers

jfranken2 commented 1 year ago

Yes, maybe that is the problem, but i don't know how to set the room temperature. Is it possible to define the room temperature via the esp opentherm shield? I want to replaced my eTwist-thermostat with the esp opentherm shield for controlling everything via HA, but i have only climate.hot_water, climate.heating_water and the pid.pid_climate_controller controls in HA for setting temperatures.

The controls in HA are set currently to the following values: image

The log shows continously the following:

[15:52:13][D][sensor:124]: 'External Temperature': Sending state 29.44922 °C with 0 decimals of accuracy
[15:52:13][D][sensor:124]: 'Return Temperature': Sending state 25.51953 °C with 1 decimals of accuracy
[15:52:13][D][sensor:124]: 'Boiler Temperature': Sending state 25.91797 °C with 1 decimals of accuracy
[15:52:13][D][sensor:124]: 'Heating Water Pressure': Sending state 1.29688 hPa with 1 decimals of accuracy
[15:52:13][D][sensor:124]: 'Boiler Modulation': Sending state 0.00000 % with 0 decimals of accuracy
[15:52:13][D][sensor:124]: 'Heating Target Temperature': Sending state 10.00000 °C with 1 decimals of accuracy
[15:52:13][D][climate:385]: 'Hot water' - Sending state:
[15:52:13][D][climate:388]:   Mode: HEAT
[15:52:13][D][climate:390]:   Action: OFF
[15:52:13][D][climate:408]:   Current Temperature: 47.59°C
[15:52:13][D][climate:414]:   Target Temperature: 50.00°C
[15:52:13][D][climate:385]: 'Heating water' - Sending state:
[15:52:13][D][climate:388]:   Mode: HEAT
[15:52:13][D][climate:390]:   Action: OFF
[15:52:13][D][climate:408]:   Current Temperature: 25.92°C
[15:52:13][D][climate:411]:   Target Temperature: Low: 30.00°C High: 40.00°C
[15:52:14][D][opentherm_component:095]: update heatingWaterClimate: 3
[15:52:14][D][opentherm_component:096]: update hotWaterClimate: 3
[15:52:15][D][opentherm_component:123]: setBoilerTemperature  at 10.000000 °C (from PID Output)

Thanks.

ShurikenGitHub commented 1 year ago

Aha, in line 82 of opentherm.yaml, you need to replace sensor.temperature_sensor with the temperature sensor from home assistant that you want to use as the temperature sensor. So in my case I have an esp temperature sensor in my livingroom with the name sensor.livingroom_temperature_sensor and I replaced that in line 82. If it works you should see the temperature in the middle of the PID climate controller thermostat card.

jfranken2 commented 1 year ago

Perfect, that was the solution. Many thanks! Now it is working 👍