Git Product home page Git Product logo

esphome-opentherm's Introduction

ESPHome OpenTherm

build

This is an example of a integration with a OpenTherm boiler using ESPHome and the Ihor Melnyk, the DIYLESS or the TheHogNL OpenTherm Adapter

Installation

  • Copy the content of this repository to your ESPHome folder
  • Make sure the pin numbers are right, check the file opentherm_component.h in the esphome-opentherm folder.
  • Edit the opentherm.yaml file:
    • Make sure the board and device settings are correct for your device
    • Set the sensor entity_id with the external temperature sensor's name from Home Assistant. (The ESPHome sensor name is temperature_sensor).
  • Flash the ESP and configure in Home Assistant. It should be auto-discovered by the ESPHome Integration.

Additional info

I am working in a new version of this integration, completely rewriting it as an external component. You can see the progress in this branch

I have pending to write a detailed documentation, I promise to do it for the new version. Until then you have lot of info in this issue, thanks to @foltymat

esphome-opentherm's People

Contributors

chupaka avatar fwestenberg avatar gmta avatar igorybema avatar krzysztofsk avatar rsciriano avatar shurikengithub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esphome-opentherm's Issues

ошибка компиляции

При компиляции выдает ошибку:`INFO Reading configuration /config/esphome/opentherm.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing opentherm (board: d1_mini; framework: arduino; platform: platformio/espressif8266 @ 3.2.0)

HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- OpenTherm Library @ 1.1.3
|-- ESPAsyncTCP-esphome @ 1.2.3
|-- ESPAsyncWebServer-esphome @ 2.1.0
| |-- ESPAsyncTCP-esphome @ 1.2.3
| |-- Hash @ 1.0
| |-- ESP8266WiFi @ 1.0
|-- DNSServer @ 1.1.1
|-- ESP8266WiFi @ 1.0
|-- ESP8266mDNS @ 1.2
Compiling /data/opentherm/.pioenvs/opentherm/src/main.cpp.o
Archiving /data/opentherm/.pioenvs/opentherm/lib67b/libESP8266WiFi.a
Compiling /data/opentherm/.pioenvs/opentherm/libb95/ESPAsyncWebServer-esphome/WebAuthentication.cpp.o
Compiling /data/opentherm/.pioenvs/opentherm/libb95/ESPAsyncWebServer-esphome/WebHandlers.cpp.o
Compiling /data/opentherm/.pioenvs/opentherm/libb95/ESPAsyncWebServer-esphome/WebRequest.cpp.o
Compiling /data/opentherm/.pioenvs/opentherm/libb95/ESPAsyncWebServer-esphome/WebResponses.cpp.o
Compiling /data/opentherm/.pioenvs/opentherm/libb95/ESPAsyncWebServer-esphome/WebServer.cpp.o
/config/esphome/opentherm.yaml: In lambda function:
/config/esphome/opentherm.yaml:29:28: error: expected type-specifier before 'OpenthermComponent'
29 | auto opentherm = new OpenthermComponent();
| ^~~~~~~~~~~~~~~~~~
/config/esphome/opentherm.yaml:30:24: error: could not convert '{opentherm}' from '' to 'std::vectoresphome::Component*'
30 | return {opentherm};
| ^
| |
|
/config/esphome/opentherm.yaml: In lambda function:
/config/esphome/opentherm.yaml:37:7: error: 'OpenthermComponent' was not declared in this scope
37 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~~~~~~
/config/esphome/opentherm.yaml:37:27: error: 'openthermComp' was not declared in this scope; did you mean 'opentherm'?
37 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~
| opentherm
/config/esphome/opentherm.yaml:37:63: error: expected primary-expression before ')' token
37 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^
/config/esphome/opentherm.yaml:38:39: error: expected type-specifier before 'OpenthermFloatOutput'
38 | auto opentherm_pid_output = new OpenthermFloatOutput();
| ^~~~~~~~~~~~~~~~~~~~
/config/esphome/opentherm.yaml:41:35: error: could not convert '{opentherm_pid_output}' from '' to 'std::vectoresphome::output::FloatOutput*'
41 | return {opentherm_pid_output};
| ^
| |
|
/config/esphome/opentherm.yaml: In lambda function:
/config/esphome/opentherm.yaml:50:7: error: 'OpenthermComponent' was not declared in this scope
50 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~~~~~~
/config/esphome/opentherm.yaml:50:27: error: 'openthermComp' was not declared in this scope; did you mean 'opentherm'?
50 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~
| opentherm
/config/esphome/opentherm.yaml:50:63: error: expected primary-expression before ')' token
50 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^
/config/esphome/opentherm.yaml:58:7: error: could not convert '{, , , , , }' from '' to 'std::vectoresphome::sensor::Sensor*'
58 | };
| ^
| |
|
/config/esphome/opentherm.yaml: In lambda function:
/config/esphome/opentherm.yaml:103:7: error: 'OpenthermComponent' was not declared in this scope
103 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~~~~~~
/config/esphome/opentherm.yaml:103:27: error: 'openthermComp' was not declared in this scope; did you mean 'opentherm'?
103 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~
| opentherm
/config/esphome/opentherm.yaml:103:63: error: expected primary-expression before ')' token
103 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^
/config/esphome/opentherm.yaml:104:35: error: could not convert '{}' from '' to 'std::vectoresphome::binary_sensor::BinarySensor*'
104 | return {openthermComp->flame};
| ^
| |
|
/config/esphome/opentherm.yaml: In lambda function:
/config/esphome/opentherm.yaml:112:7: error: 'OpenthermComponent' was not declared in this scope
112 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~~~~~~
/config/esphome/opentherm.yaml:112:27: error: 'openthermComp' was not declared in this scope; did you mean 'opentherm'?
112 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~
| opentherm
/config/esphome/opentherm.yaml:112:63: error: expected primary-expression before ')' token
112 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^
/config/esphome/opentherm.yaml:113:46: error: could not convert '{}' from '' to 'std::vectoresphome::switch_::Switch*'
113 | return {openthermComp->thermostatSwitch};
| ^
| |
|
/config/esphome/opentherm.yaml: In lambda function:
/config/esphome/opentherm.yaml:124:7: error: 'OpenthermComponent' was not declared in this scope
124 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~~~~~~
/config/esphome/opentherm.yaml:124:27: error: 'openthermComp' was not declared in this scope; did you mean 'opentherm'?
124 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^~~~~~~~~~~~~
| opentherm
/config/esphome/opentherm.yaml:124:63: error: expected primary-expression before ')' token
124 | OpenthermComponent openthermComp = (OpenthermComponent) id(opentherm);
| ^
/config/esphome/opentherm.yaml:128:7: error: could not convert '{, }' from '' to 'std::vectoresphome::climate::Climate*'
128 | };
| ^
| |
|
Compiling /data/opentherm/.pioenvs/opentherm/libecb/DNSServer/DNSServer.cpp.o
*** [/data/opentherm/.pioenvs/opentherm/src/main.cpp.o] Error 1
========================= [FAILED] Took 16.47 seconds =========================`

в custom_component:

  • lambda: |-
    auto opentherm = new OpenthermComponent();
    return {opentherm};
    components:
    • id: opentherm какой ID указывать? я просто не пойму) извините. Остальные ошибки при компиляции из-за этого? Спасибо.

Add missing sensors

There are several sensors that should be added:

1: Hot water outlet temperature
2: Cold water inlet temperature
3: Fan speed
4: pump revolutions
5: date and time present on the card
6: Circulator flow rate
7: DHW flow rate
8: Smoke temperature
9: Maintenance by Displays the number of days by which maintenance must be performed.
10: Some boilers have a domestic hot water micro-storage which can be programmed in time slots (for IMMERGAS boilers this function is called Boost)

Remeha Tzerra Ace - setBoilerTemperature always at 10 °C

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

unstable operation

The following frequently occurs, always for a brief moment:

  • Return temperature goes to -1°C
  • Hot water measurement goes to -1°C
  • Heating water measurement (boiler temperature) goes to 0°C or 100°C
  • All or some values are unavailable: when this occur, the logging pauzes for a while.
    This behaviour is also in the log.

The device is not restarting, there are no wifi issues.
There are many debug messages per second.
Sometimes warning also: [13:04:29][W][pid.climate:122]: For PID autotuner you need to set AUTO (also called heat/cool) mode!
INFO opentherm.local: Ping timed out!
INFO Disconnected from ESPHome API for opentherm.local
WARNING Disconnected from API
INFO Successfully connected to opentherm.local

Setting upper and lower limits in boiler

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?

HA - ESPhome config

Hi I managed to flash it but when I go to add it on ESPHome it keeps giving me an API error.
image

ps: to flash got needed to coment this line on opentherm_climate: 'traits.set_supports_heat_cool_mode(false);'

PID Controller

Hello,
I've installed your esphome opentherm by commenting arduino version and replace ESP Async WebServer library, by esphome/ESPAsyncWebServer-esphome @ 2.1.0
I've got the diyless opentherm shield
and I've got this boiler https://www.viessmann.fr/fr/chauffage-maison-individuelle/chaudiere-gaz/condensation/vitodens-100-w-vitodens-111-w.html Vitodens 100 w
I looked a bit at the doc https://esphome.io/components/climate/pid.html?highlight=climate

and for the autotune of the PID, they explain https://esphome.io/components/climate/pid.html?highlight=climate#autotuning
that we must put the values

     control_parameters:
       kp: 0.0
       ki: 0.0
       kd: 0.0

and start the autotune
in your opentherm.yaml file there are already the values

     control_parameters:
       kp: 0.38197
       ki: 0.01012
       kd: 3.60387

should we redo the autotune for us or should we keep your conf ?

thank you in advance for your reply and thank you for your great work

[RESOLVED] can't build with ESP Async WebServer

Hello,

Thanks for your work !
When I try to build bin file with the default configuration I've got an error with the ESP Async WebServer library :

`
In file included from /data/opentherm/.piolibdeps/opentherm/ESP Async WebServer/src/AsyncEventSource.h:29:0,
from /data/opentherm/.piolibdeps/opentherm/ESP Async WebServer/src/AsyncEventSource.cpp:21:
/data/opentherm/.piolibdeps/opentherm/ESP Async WebServer/src/ESPAsyncWebServer.h:35:25: fatal error: ESP8266WiFi.h: No such file or directory



#include <ESP8266WiFi.h>
`

But if, in opentherm.yaml, I change "ESP Async WebServer" by "esphome/ESPAsyncWebServer-esphome @ 2.1.0" it seems to work for building bin file.
I don't know if you are aware of this error, or if it is only me who is confronted with this error.

Thanks again for your work !
Version of homeassistant : Home Assistant 2021.12.6
Version of esphome : v2021.12.1

Trying to contribute... But compile issue

Plop!

I recently bought the DIYLess opentherm master adapter. I'm also a developer, so for sure I want to contribute to opentherm+esphome integration, even with external component system to have a very clean config !

But after trying to copy/paste your config and classes, it's failing during compilation:

In file included from src/main.cpp:24:
src/opentherm_output.h:5:39: error: expected class-name before '{' token
    5 | class OpenthermOutput : public Component, public FloatOutput {
      |                                                  ^

It seems like the FloatOutput class coming from esphome itself was not found.

esphome version: v2022.12.3

I did my monkey to totally go to this "empty" config:

esphome:
  name: boiler
  includes:
    - esphome-opentherm/
esp8266:
  board: d1_mini
logger:
api:
  encryption:
    key: "..."
ota:
  password: "..."
wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  power_save_mode: none

the C code:

#pragma once

#include "esphome.h"

class OpenthermBinarySensor : public BinarySensor {
};

And the same error (with or without using namespace esphome;):

In file included from src/main.cpp:26:
src/opentherm_binary.h:5:51: error: expected class-name before '{' token
    5 | class OpenthermBinarySensor : public BinarySensor {
      |                                                   ^

Any idea ?

Heating water temperature not above 45

Hello I have the problem that my heating water does not get over 45 degrees. Even if not set to 60 degrees

i use translator

CH water setpoint Max: 45
CH water setpoint Low: 30
CH water setpoint: 60

Device: Daikin Altherma 3c

OpenTherm blocking communication with HASS (Error getting initial data for [IP]: Timeout waiting for response for <class 'api_pb2.ListEntitiesRequest'> after 60.0s)

Hi

It seems like HomeAssistant is unable to list the entities.

Getting the following message in HomeAssistant log.

Error getting initial data for [IP]: Timeout waiting for response for <class 'api_pb2.ListEntitiesRequest'> after 60.0s

I am almost certain that it is related to the following log messages from the ESPHome device:

12:54:36	[W]	[component:214]	
Component custom_component took a long time for an operation (3.72 s).
12:54:36	[W]	[component:215]	
Components should block for at most 20-30ms.

It seems like the opentherm component is blocking ESPHome from communicating with HomeAssistant

external temperature

Hello, sorry for my English. my question is if it is possible to send the outside temperature data from a sensor that is inside homeassistant to the boiler. From what I see, you can read the temperature of the sensor connected to the boiler, but if you don't have one connected, can you send the temperature of another sensor? I understand that to improve the operation of the boiler, the boiler should have this information in order to modulate the flame accordingly. Thank you very much in advance

constantly disconnecting

ESPHome is in a loop of connectiong - disconnecting.
I tried other devices with this code, same result.
When I use another test code, no issues
Ping from another os not showing any loss.

INFO Successfully connected to opentherm.local
[18:11:33][C][pid.sensor:056]: PID Climate Sensor 'PID Climate ERROR'
[18:11:33][C][pid.sensor:056]: State Class: 'measurement'
[18:11:33][C][pid.sensor:056]: Unit of Measurement: '%'
[18:11:33][C][pid.sensor:056]: Accuracy Decimals: 1
[18:11:33][C][pid.sensor:056]: Icon: 'mdi:gauge'
[18:11:33][D][opentherm_component:095]: update heatingWaterClimate: 0
[18:11:33][D][opentherm_component:096]: update hotWaterClimate: 0
[18:11:36][D][opentherm_component:123]: setBoilerTemperature at 10.000000 °C (from PID Output)
INFO opentherm.local: Ping timed out!
INFO Disconnected from ESPHome API for opentherm.local
WARNING Disconnected from API

Setup

Hi got this flashed a week a go dont have the new boiler yet (@rsciriano thank you so far for solving other questions i have asked) but just getting ahead of the game so that when i do get the boiler (still need to decide which one to get as not all support opentherm and use some kind of interface i am in the UK so if anyone has good experience with a boiler please let me know i was looking at the Viessmann) i have things set up from this end. There are features like set back temp and min and max water temp which i don't see available, is this something i do via Node-Red or do i need to modify the yaml file to pull in these options, would really appreciate your help on this please. Also multi-zoning i assume that we would control the boiler on off from Node Red depending which zone is demanding and we just tell the boiler when there is demand required turn on etc as for the PID Auto climate turned on could you explain what this does as i see you mention it to be turned on.

Thank you for your assistance.

Pump keeps running after thermostat turned off

Hi,

Thanks for the opentherm code, it works mostly like expected. ;)

Sometimes when I turn off the PID thermostat, the heating water pump doesn't stop running.
This causes the hot water thermostat temperature to drop, so the flame turns on, but because the pump is running the hot water temperature never reaches the set temp.
So what's basically happening is that the boiler is heating the heating water forever. The problem occurs on random moments it looks like.
Tried turning off all thermostats, didn't work.
The pump only stops when I reset the boiler.
I'm using a Vaillant vhr 24-28c.
Is there a way to stop the boiler pump manually?

Edit: it happens every time when the heating has been turned on once, looks like it cant switch from heatingwater to hotwater properly.

Thanks

Climate Preset

Thanks for your great effort in this platform, it is really useful.

How could I add a preset to the PID controller? I have tried to add it under the climate component and via customization within ha, but both do not work unfortunately.

Does not remember the last state after a reboot

esp does not remember the last state after a reboot,
I live in a place where the lights are often turned off, so if the ESP gets clogged at night, the house will be very cold in the morning.
sorry for english, translated by google translate

hot water BAXI

I can't set the temperature of hot water, the hot water heating mode is turned on but the water is not heated

OpenTherm.h: No such file or directory

Hi group!
Had someone an error during instalation?

"In file included from src/main.cpp:51:src/opentherm_component.h:3:10: fatal error: OpenTherm.h: No such file or directory"

I copied 0.5 version to config->esphome-> (there is opentherm.yaml and esphome-opentherm)

Heating water Viessman 100w combi boiler

Hi,

maybe someone will help me or will give me some hints.

Iam using OT gatway and rsciriano ESPHome-OT with Viessman 100w combi boiler.

Ive tried v0.1 to v0.3.

Iam using node-red and call service nodes.

I can feed set_temperature via climate.heating_water and climate.hot_water.

Hot water is activeted by water flow sensor in the boiler (water heating is staring).

I got issue with heating water.

Whaen I call service - turn_on via climate.heating_water only circulation water pump is starting.

Water is not being heated.

Guys maybe someone could help me with getting it work.

Thanks.

Feature Request - Opentherm GATEWAY functionality

Hi, based on the same library it seems to be possible to manage also the Gateway Functionality.
The hw needed is available from Diyless .

The arduino code is available, but non integrated in HA. It would be very nice to import the functionality in ESPHOME environment but i'm not able to write the code.

The main advantage is that instead of "sobstitute" the actual thermostats you can keep them working and just override the command when needed.

Can you try to support it?

Installing in HA

I have an issue loading the firmware with the dependency ESP Async WebServer saying fatal error: ESP8266WiFi.h: No such file or directory, removing this dependency loads the firmware fine. I downloaded the code from Github today 24/12/21

I am using ESP8266 D1 mini.

Am i missing something?

De Dietrich - boiler heating control problems

Next problem on my boiler.

I can't change temperature and change state of heating (on/off). This climate module not working. Only working climate for Hot water - I can change temperature and change a state for heating usage water.

Does not work.

The device itself is visible in the home assistant, but the internal items are not visible
Точечный рисунок

Lack of documentation

Hi, let me start by saying THANKS for your work! I was looking for an ESPhome based system to use with OpenTherm and this seems to be the one.

Honestly, I'm not sure how often you read these, so my hopes are not that high :)

I need to address this issue with the lack of documentation of this whole program. I'd consider myself an advanced beginner when it comes to code, but figuring out how this works was a chore and a half.

My main issue is that I still haven't figures out how to properly control the boiler after everything has been connected.
In my case, my Viessmann boiler does not support 'Returning temperarure' nor 'Heating water pressure.' But I imagnine that some parameters are crucial for the thing to work and some are not...

The three climate controls

So how exactly am I supposed to know the difference between 'Heating water' 'How water' and 'PID Climate control' ?
Through testing I did figure the most basic things out, but not really with a lot of details.

In the end, my hope would be that after setting the PID Climate Control, stuff would begin to happen. But no, I had to figure out that you can change the entity ID of the actual temperature to a one from Home Assistant - but even then, nothing happened.

Disable PID and Autotune

No idea what disable PID does (from my testing - nothing)
And I had to learn about the Autotune from ESPhome documentation - which, fair enough, but there's no reference to it anywhere.

Summary

In the end, I'm just frustrated. I WANT this to work so badly but with no real documentation I don't know how.
And with my limited knowledge in coding it's virtually impossible to find this out on my own.

Home Assistant Integration (LoveLace)

Hi so i have flashed my esp8266 and all looks ok (FYI i dont have the opentherm connected as i have not received it yet) I can add the device to my integrations but i don't see the additional properties see below

image
image

Is it because there is no opentherm connected which i find hard to believe or is there something missing?

Also on a separate note i am looking to upgrade my heating any advice on a boiler system / brand that will be compatible with this?

Boiler temperature fixed on 35 degrees and keeps heating even though the PID is at -300%

The main problem is that my heating is still using gas to heat up the heating water even though the PID is -100% or lower; I see heating going on (no hot water being used). Why is that? I can only stop my house from heating up by turning off the heating PID. Boiler modulation is also not working. It looks like the heating always has a maximum time for being off before starting to heat the water again and therefore still heating up my floor (and temperatures still going up).

I have now set an automation in Home Assistant which set the heating on or off, that shouldn't be the way to do this.

My return temperature is -1 (Intergas HRE 36), but i've read that thats something the boiler doesn't return (so no problem?)

I have two circuits (floor heating and radiator heating). The radiator heating has a seperate wireless thermostat which is set at a very low temperature so it should not interfere with the OpenTherm adapter.

What am I missing?

In short, this is what happens:
Screenshot 2022-10-12 152801

Viessmann - long time for an operation

[14:14:12][W][component:204]: Component custom_component took a long time for an operation (2.31 s).
[14:14:12][W][component:205]: Components should block for at most 20-30ms

How can I fix it?

OpenthermComponent(): PollingComponent(3000) > OpenthermComponent(): PollingComponent(10000) is not working

Temperature on DeDietrich Bolier

Hi,

Today I install your code to ESP8266 and connect to the boiler. There is any option to send current room temperature to the boiler via OpenTherm standard?
On DeDietrich screen I have message that CIRCA controlled via Opentherm module but I have "-----" in place where should be current room temperature.

THX for your work!

Tracking boiler error codes

Hi, it would be advisable to detect when the boiler is blocked and the block code, plus a button should be added to reset the problem

Crash and reboot when opentherm bus isn't connected

after flash i got this in logs view
i using wemos d1 mini and esphome flasher

Hard Resetting...
Done! Flashing is complete!

Showing logs:
[22:48:11][I][logger:170]: Log initialized
[22:48:11][C][ota:366]: There have been 0 suspected unsuccessful boot attempts.
[22:48:11]
[22:48:11]--------------- CUT HERE FOR EXCEPTION DECODER ---------------
[22:48:11]
[22:48:11]Exception (28):
[22:48:11]epc1=0x402170fb epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000024 depc=0x00000000
[22:48:11]
[22:48:11]>>>stack>>>
[22:48:11]
[22:48:11]ctx: cont
[22:48:11]sp: 3ffffc70 end: 3fffffc0 offset: 0190
[22:48:11]3ffffe00:  3fff19ac 40217f9c 00000020 401011ee  
[22:48:11]3ffffe10:  3fff19ac 3ffffed0 3fff43b4 4024cf0e  
[22:48:11]3ffffe20:  3ffffe01 3fff2dac 00000001 4022a52c  
[22:48:11]3ffffe30:  3fff3e14 3fff1958 00000000 40217fb8  
[22:48:11]3ffffe40:  3fff4070 00000000 00000000 3fff2dac  
[22:48:11]3ffffe50:  00000000 00000000 00000000 4022fce0  
[22:48:11]3ffffe60:  00000000 4022fce0 00000000 4022fce0  
[22:48:11]3ffffe70:  00000000 4022fce0 00000000 4022fce0  
[22:48:11]3ffffe80:  00000000 00000000 3fff3fe8 00000000  
[22:48:11]3ffffe90:  00000000 3fff4000 00000000 00000000  
[22:48:11]3ffffea0:  00000000 4022fce0 00000000 4022fce0  
[22:48:11]3ffffeb0:  00000000 4022fce0 00000000 4022fce0  
[22:48:11]3ffffec0:  00000000 4022fce0 00000000 00000000  
[22:48:11]3ffffed0:  3fff3e0c 0073746e 402167b8 402170e8  
[22:48:11]3ffffee0:  feefeffe feefeffe feefeffe feefeffe  
[22:48:11]3ffffef0:  feefeffe feefeffe feefeffe feefeffe  
[22:48:12]3fffff00:  feefeffe feefeffe feefeffe feefeffe  
[22:48:12]3fffff10:  feefeffe feefeffe feefeffe feefeffe  
[22:48:12]3fffff20:  feefeffe feefeffe feefeffe feefeffe  
[22:48:12]3fffff30:  feefeffe feefeffe feefeffe feefeffe  
[22:48:12]3fffff40:  feefeffe feefeffe feefeffe feefeffe  
[22:48:12]3fffff50:  feefeffe feefeffe feefeffe 3fff43b4  
[22:48:12]3fffff60:  3fff427c feefeffe feefeffe feefeffe  
[22:48:12]3fffff70:  feefeffe feefeffe feefeffe 3fff4410  
[22:48:12]3fffff80:  3fff43b4 feefeffe feefeffe feefeffe  
[22:48:12]3fffff90:  feefeffe feefeffe feefeffe 3fff1d54  
[22:48:12]3fffffa0:  3fffdad0 00000000 3fff1d14 4022a9b8  
[22:48:12]3fffffb0:  feefeffe feefeffe 3ffe8640 40100731  
[22:48:12]<<<stack<<<
[22:48:12]
[22:48:12]--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Can't change the state

Hi @rsciriano ,
I tried yuor code, compiled and uploaded on a D1 mini. When the d1 starts, the boiler starts to heat but if I switch it off, the boiler set the heat water on 10°C and I can't do anything anymore. I tried to set a different temperature on the climate entity, tried to switch off and on.
Where do I make a mistake?

Thanks

Boiler setup question - ESP8266 + eTwist thermostat

Hi, I have a question about the correct setup.
I have a boiler Remeha Tzerra Ace 39c with eTwist thermostat.
And I would like to control the boiler thru Home Assistant next to eTwist thermostat.

I bought this adapter and checked example this.
As far as I understand we need 4 pins to communicate. 2 for master mode and 2 for slave mode.
Is it possible to connect this device with your ESPHome firmware to the boiler and still have the possibility to control it via eTwist thermostat in case if needed? Or it's designed to work only in Master mode and replace the thermostat at all?

does this one work as a climate or can I also use it as a switch only?

maybe a dumb question, But I can't really tell form the description, I see the external component doesn't yet.

I'm planning to replace my tasmota Opentherm with ESPHome.
I have climate configured in home assistant

So I need just only a switch to set ot_ch to 1 or 0, on/off
is this possible using this component? or does this only work if you use the full climate control in ESPHome?

the pump is still running

Hi,
I have a baxi nuvola duo-tec ht16 boiler.
in the settings, I set parameter P10 to 02 - OT controls only operating temperatures and I have to use on/off to activate it, and parameter P67 to the value 02 - OT standard protocol.
All data on temperatures, pressure, flame ... shows correctly

I want to ask about the problem with the constantly running pump.
if climate.heating_water is in the off state and I only have hot domestic water heating on, the boiler will heat the water and the pump will stop.
But if the heating is turned on, the house is heated, the flame goes out, but the pump continues to run.
I noticed that when I set the temperature of the domestic water, the temperature is also displayed on the boiler.
If I set the heating water temperature, the temperature is always the same as the boiler was set.
excuse my english.
Thank you for your response

Error while compiling; simple fix

I got an error while compiling an update in ESPhome. In opentherm_component.h

ICACHE_RAM_ATTR void handleInterrupt() {
	ot.handleInterrupt();
}

should be changed to

IRAM_ATTR void handleInterrupt() {
	ot.handleInterrupt();
}

The above did not throw any errors.

No interlock hot water and PID climate controller

Hi,

When PID climate controller is in "heating" mode, the pump is circulating water in the radiators.
When hot water is required, the three way valve shuts but the pump is still running.
So there is a bang, aka water hammer.
There should be a sort of interlock that turns off the pump before changing the three way valve to hot water.

Hope the problem description is clear to you.

Thanks.

OT Not communicating

Hello @rsciriano ,

I've successfully uploaded bin file, but there's no opentherm communication with boiler. May be a pin configuration issue?

I'm using Ihor's adapter
Screen Shot 2021-03-29 at 12 09 11

Info

Hi this component is finalised or still in the making ?

Task watchdog got triggered

Can't flash esp wroom 32 via ESP Home. How to resolve the following errors?

INFO ESPHome 2023.6.5
INFO Reading configuration /config/esphome/opentherm.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing opentherm (board: esp32dev; framework: arduino; platform: platformio/[email protected])

[12:38:14]E (12730) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[12:38:14]E (12730) task_wdt: - loopTask (CPU 1)
[12:38:14]E (12730) task_wdt: Tasks currently running:
[12:38:14]E (12730) task_wdt: CPU 0: IDLE
[12:38:14]E (12730) task_wdt: CPU 1: loopTask
[12:38:14]E (12730) task_wdt: Aborting.
[12:38:14]
[12:38:14]abort() was called at PC 0x400fa9b4 on core 0
[12:38:14]
[12:38:14]
[12:38:14]Backtrace:0x400838d9:0x3ffbe9bc |<-CORRUPTED
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x400838d9: panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:402

Fundamental UX Problem

Hello @rsciriano ,

I think we have a fundamental UX problem here. As is, controls are too complicated for everyday use/automations.
Why do we have "Heating Water" thermostat? The only need for that, is to set max/min setpoints for boiler temp, which could be handled by https://esphome.io/components/number/index.html even better, outside temp from boiler or from weather data from HA(max boiler temp). In most cases, setting minimum boiler temp is not needed as most boiler start heating after 25-30 degrees. Also, turning off PID thermostat does nothing. It can turn on/off CH instead of using heating water thermostat power. What do you think?
Best

noob starting out: nothing shows up

Hello,
today I received the DIYLESS opentherm shield, attached it to my D1 mini and started experimenting.
I tried both the version in the master branch as well as the experimental external-component one, but nothing happens 😶
HA found a new ESP device to add, tho once I add it and go to the device page this is what I get:
Screenshot 2023-02-03 at 19 24 14
I wasn't expecting it to work on the 1st try, but I was expecting to see at least some sensors with no-value or weird values.
I really don't know where to go form here so if some one can kindly point me in the right direction it would be awesome.

I went and check the logs, and here's what I get:

[19:25:09][I][app:102]: ESPHome version 2022.12.8 compiled on Feb  3 2023, 18:12:31
[19:25:09][C][wifi:504]: WiFi:
[19:25:09][C][wifi:362]:   Local MAC: 8C:AA:B5:CF:A6:E7
[19:25:09][C][wifi:363]:   SSID: [redacted]
[19:25:09][C][wifi:364]:   IP Address: 10.6.9.95
[19:25:09][C][wifi:365]:   BSSID: [redacted]
[19:25:09][C][wifi:367]:   Hostname: 'boiler'
[19:25:09][C][wifi:369]:   Signal strength: -47 dB ▂▄▆█
[19:25:09][C][wifi:373]:   Channel: 9
[19:25:09][C][wifi:374]:   Subnet: 255.255.255.0
[19:25:09][C][wifi:375]:   Gateway: 10.6.9.1
[19:25:09][C][wifi:376]:   DNS1: 10.6.9.2
[19:25:09][C][wifi:377]:   DNS2: 0.0.0.0
[19:25:09][D][sensor:126]: 'Actual temperature interval': Sending state nan  with 1 decimals of accuracy
[19:25:09][D][sensor:126]: 'PID Climate Result': Sending state 0.00000 % with 1 decimals of accuracy
[19:25:10][D][sensor:126]: 'PID Climate HEAT': Sending state 0.00000 % with 1 decimals of accuracy
[19:25:10][D][sensor:126]: 'PID Climate ERROR': Sending state 0.00000 % with 1 decimals of accuracy
[19:25:10][D][climate:385]: 'PID Climate Controller' - Sending state:
[19:25:10][D][climate:388]:   Mode: HEAT
[19:25:10][D][climate:390]:   Action: IDLE
[19:25:10][D][climate:408]:   Current Temperature: nan°C
[19:25:10][D][climate:414]:   Target Temperature: 20.00°C
[19:25:10][D][opentherm_component:095]: update heatingWaterClimate: 0
[19:25:10][D][opentherm_component:096]: update hotWaterClimate: 0
[19:25:12][D][opentherm_component:123]: setBoilerTemperature  at 0.000000 °C (from PID Output)

And to be honest I'm nor really sure what to make of it due to lack of experience.

Here's the yaml file I feed to ESPHome:

substitutions:
  devicename: opentherm_basic
  upper_devicename: Opentherm Basic

esphome:
  name: "boiler"
  platformio_options:
    lib_deps: 
    - ihormelnyk/OpenTherm Library @ 1.1.3
  includes:
    - esphome-opentherm/

esp8266:
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "<my key>"

ota:
  password: "<my key>"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Test Fallback Hotspot"
    password: "<my password>"

captive_portal:

custom_component:
  - lambda: |-
      auto opentherm = new OpenthermComponent();
      return {opentherm};
    components:
      - id: opentherm
output:
  - platform: custom
    type: float
    lambda: |-
      OpenthermComponent *openthermComp = (OpenthermComponent*) id(opentherm);
      auto opentherm_pid_output = new OpenthermFloatOutput();
      openthermComp->set_pid_output(opentherm_pid_output);
      App.register_component(opentherm_pid_output);     
      return {opentherm_pid_output};
    outputs:
      id: pid_output

sensor:
  - platform: custom
    lambda: |-    
      OpenthermComponent *openthermComp = (OpenthermComponent*) id(opentherm);
      return { 
        openthermComp->boiler_temperature, 
        openthermComp->external_temperature_sensor, 
        openthermComp->return_temperature_sensor, 
        openthermComp->pressure_sensor,
        openthermComp->modulation_sensor,
        openthermComp->heating_target_temperature_sensor
      };
    sensors:
    - name: "Boiler Temperature"
      unit_of_measurement: °C
      accuracy_decimals: 1
    - name: "External Temperature"
      unit_of_measurement: °C
      accuracy_decimals: 0  
    - name: "Return Temperature"
      unit_of_measurement: °C
      accuracy_decimals: 1
    - name: "Heating Water Pressure"
      unit_of_measurement: hPa
      accuracy_decimals: 1
    - name: "Boiler Modulation"
      unit_of_measurement: "%"
      accuracy_decimals: 0
    - name: "Heating Target Temperature"
      unit_of_measurement: °C
      accuracy_decimals: 1
      
  - platform: homeassistant
    id: temperature_sensor
    entity_id: sensor.temperature_sensor
    name: "Actual temperature"
    unit_of_measurement: °C
  - platform: template
    id: temperature_sensor_interval
    name: "Actual temperature interval"
    lambda: |-
      return id(temperature_sensor).state;
    update_interval: 1s
  - platform: pid
    name: "PID Climate Result"
    type: RESULT    
  - platform: pid
    name: "PID Climate HEAT"
    type: HEAT    
  - platform: pid
    name: "PID Climate ERROR"
    type: ERROR    

binary_sensor:
  - platform: custom
    lambda: |-
      OpenthermComponent *openthermComp = (OpenthermComponent*) id(opentherm);
      return {openthermComp->flame};
    binary_sensors:
    - name: "Flame"
      #device_class: heat

switch:
  - platform: custom
    lambda: |-
      OpenthermComponent *openthermComp = (OpenthermComponent*) id(opentherm);
      return {openthermComp->thermostatSwitch};
    switches:
      name: "Disable PID"
  - platform: template
    name: "PID Climate Autotune"
    turn_on_action:
      - climate.pid.autotune: pid_climate      

climate:
  - platform: custom
    lambda: |-
      OpenthermComponent *openthermComp = (OpenthermComponent*) id(opentherm);
      return {
        openthermComp->hotWaterClimate, 
        openthermComp->heatingWaterClimate
      };
    climates:
      - id: hot_water
        name: "Hot water"
      - id: heating_water
        name: "Heating water"
  - platform: pid
    id: pid_climate
    name: "PID Climate Controller"
    visual:
      min_temperature: 16 °C
      max_temperature: 28 °C
      temperature_step: 0.5 °C
    sensor: temperature_sensor_interval
    default_target_temperature: 20°C
    heat_output: pid_output
    control_parameters:
      kp: 0.38197
      ki: 0.01012
      kd: 3.60387

DIYLESS's page says "polarity does not matter" but just in case it does, here's how I connected mine
B1 -> ground
B2 -> VCC

My boiler is a "Riello Condens" for both central heating and hot water. I checked with my technician and he's positive this thing speaks opentherm.

PINS: I used the included pins to connect the shield to the D1 so they're still be D1 and D2 as per sourcecode.

If I test the voltage across the opentherm adapter I get 36V, so at least that should be connected (even tho I read it should be more around 20V, so 36 might be a bit on the high side?)

Hot water current temperature is 0

In HA hot water current temp is 0 while I can see the correct temperature from the service menu on my boiler (Buderus Logamax U072)
Please advise how to fix it
image

Hot water pressure -1

On my installation the sensor Heating Water Pressure mark always -1.
As my understanding from the code is because the reading get a non valid response.
It would be possible that on my boiler the data have a different MessageID ?
Or more simply my boiler doesn't send this value to the opentherm bus ?

Compile error Extensa

Hello,

I'm working on/with the Opentherm sketch on a ESPHome Wemosd1. I'd like to recompile the sketch, BUT... I get these errors. Does anyone have a clue how to fix it?

Kind regards!

/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld: .pioenvs/opentherm/src/src/OpenTherm.cpp.o: in function _ZN9OpenTherm8getFaultEv':
OpenTherm.cpp:(.text._ZN9OpenTherm8getFaultEv+0x8): multiple definition of _ZN9OpenTherm8getFaultEv'; .pioenvs/opentherm/src/OpenTherm.cpp.o:OpenTherm.cpp:(.text._ZN9OpenTherm8getFaultEv+0x8): first defined here

Future recommendations / wishes

Hi @rsciriano,

I wanted to take time to write down the couple things I would like to see improved in your new external component. I love how you are implementing this, but there are couple of quality of life improvements that I think would help a lot.

1. PID calculations only on temperature change

In my eyes, this should be happening either on a state change of the PID controller, or on a set loop (i.e. every 10 seconds).
This is mainly due to the fact that I'm using Zigbee temperature sensors around the house and they are very slow to update.
And can stay on a same level for a long time. This way, when you start feeling chilly, you have to wait for the change to happen.

2. Interlocking that PID controller and Heating water elements.

I know you've already talked about is in issue #27 but I would like to emphasise that.
Letting the user be responsible for turning on/off the heating element is not really a good idea (even though it can be solved by a simple automation.
What I would like to say is keeping the water flowing through the radiators even after the flame is off is a GOOD IDEA.
Yes, the boiler is used to these temperatures, but it's so much better for the chamber to not keep heating up from that residual heat. If you can circulate the water for let's say 10 minutes, that's a win in my book!

3. Non-valid states reported as -1

The main reason being, -1 is a valid state Home Assistant understands. That means you get these spikes in the graph (shown below).
I tried increasing the polling time in component.h file, which helped but only marginally.
HA 2022.11 introduces a very simple Statistics sensor, which can easily give you a min/max values for a given day.
That would be perfect, but my minimum is now -1 because of that :)
Not really sure how best to implement this, but the best way in my opinion would be to have the sensor go Unavailable in HA.
That way, you would just get a gap in the data, rather than a wrong value.

image

4. Prepare for HA statistics on the external temperature sensor

This is a "problem" I don't even consider a problem but ... Home Assistant has a great databse for long-term statistics, which your sketch does not utilize, as you don't have a state_class and device_class defined. It is VERY easy to add by anyone but I did have to search for the solution as it was not obvious why there are no statistics for the sensor :) Here's how that looks:

    - name: "External Temperature"
      unit_of_measurement: °C
      accuracy_decimals: 1
      state_class: measurement
      device_class: temperature

I'll update the the thread if I come up with something else.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.