arthurrump / esphome-opentherm Goto Github PK
View Code? Open in Web Editor NEWCreate your own smart modulating thermostat using the OpenTherm component for ESPHome
License: BSD 2-Clause "Simplified" License
Create your own smart modulating thermostat using the OpenTherm component for ESPHome
License: BSD 2-Clause "Simplified" License
Python 3.11.2 venv, esphome 2023.9.3, running on Debian 12.
When I change the switch block from this:
switch:
- platform: opentherm
ch_enable:
name: "Boiler Central Heating enabled"
mode: restore_default_on
into this:
switch:
- platform: opentherm
ch_enable:
name: "Boiler Central Heating enabled"
mode: restore_default_on
- platform: opentherm
dhw_enable:
name: "Domestic Hot Water enabled"
mode: restore_default_off
esphome run opentherm-thermostat.yml
fails, whereas before the change, it did not fail.
Compiling .pioenvs/cv-ketel-thermostaat/src/esphome/components/ota/ota_component.cpp.o
src/esphome/components/opentherm/hub.cpp: In member function 'unsigned int esphome::opentherm::OpenthermHub::build_request(OpenThermMessageID)':
src/esphome/core/defines.h:21:40: error: 'class esphome::opentherm::OpenthermHub' has no member named 'ch_enable_switch'; did you mean 'dhw_enable_switch'?
#define OPENTHERM_READ_ch_enable this->ch_enable_switch->state
^~~~~~~~~~~~~~~~
src/esphome/components/opentherm/hub.cpp:80:17: note: in expansion of macro 'OPENTHERM_READ_ch_enable'
OPENTHERM_READ_ch_enable
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/esphome/components/socket/headers.h:2,
from src/esphome/components/socket/socket.h:6,
from src/esphome/components/ota/ota_component.h:3,
from src/esphome/components/ota/ota_component.cpp:1:
src/esphome/core/defines.h:27: warning: "OPENTHERM_SWITCH_LIST" redefined
#define OPENTHERM_SWITCH_LIST(F, sep) F(dhw_enable_switch)
src/esphome/core/defines.h:26: note: this is the location of the previous definition
#define OPENTHERM_SWITCH_LIST(F, sep) F(ch_enable_switch)
src/esphome/core/defines.h:29: warning: "OPENTHERM_SWITCH_MESSAGE_HANDLERS" redefined
#define OPENTHERM_SWITCH_MESSAGE_HANDLERS(MESSAGE, ENTITY, entity_sep, postscript, msg_sep) MESSAGE(Status) ENTITY(dhw_enable_switch, flag8_hb_1) postscript
src/esphome/core/defines.h:28: note: this is the location of the previous definition
#define OPENTHERM_SWITCH_MESSAGE_HANDLERS(MESSAGE, ENTITY, entity_sep, postscript, msg_sep) MESSAGE(Status) ENTITY(ch_enable_switch, flag8_hb_0) postscript
*** [.pioenvs/cv-ketel-thermostaat/src/esphome/components/opentherm/hub.cpp.o] Error 1
========================================= [FAILED] Took 16.29 seconds =========================================
# A basic thremostat for a boiler with a single central heating circuit and
# domestic hot water. It reports the flame, CH and DHW status, similar to what
# you would expect to see on a thermostat and also reports the internal boiler
# temperatures and the current modulation level. The temperature is regulated
# through a PID Climate controller and the current room temperature is retrieved
# from a sensor in Home Asisstant.
# This configuration should meet most needs and is the recommended starting
# point if you just want a thermostat with an external temperature sensor.
esphome:
name: cv-ketel-thermostaat
external_components:
- source: github://arthurrump/esphome-opentherm@main
esp32:
board: nodemcu-32s
logger:
api:
ota:
wifi:
ssid: REDACTED
password: REDACTED
captive_portal:
opentherm:
ch_enable: true
dhw_enable: true
in_pin: 21
out_pin: 22
output:
- platform: opentherm
t_set:
id: t_set
min_value: 20
max_value: 65
zero_means_zero: true
dallas:
- pin: 18
sensor:
- platform: opentherm
rel_mod_level:
name: "Boiler Relative modulation level"
t_boiler:
name: "Boiler water temperature"
t_ret:
name: "Boiler Return water temperature"
- platform: dallas
address: 0x363c01f0956a1528
name: Temp living
id: templiving
filters:
- heartbeat: 1s
# - platform: homeassistant
# id: ch_room_temperature
# entity_id: sensor.temperature
# filters:
# # Push room temperature every second to update PID parameters
# - heartbeat: 1s
binary_sensor:
- platform: opentherm
ch_active:
name: "Boiler Central Heating active"
dhw_active:
name: "Boiler Domestic Hot Water active"
flame_on:
name: "Boiler Flame on"
fault_indication:
name: "Boiler Fault indication"
entity_category: diagnostic
diagnostic_indication:
name: "Boiler Diagnostic event"
entity_category: diagnostic
switch:
- platform: opentherm
ch_enable:
name: "Boiler Central Heating enabled"
mode: restore_default_on
- platform: opentherm
dhw_enable:
name: "Domestic Hot Water enabled"
mode: restore_default_off
climate:
- platform: pid
name: "Central heating"
heat_output: t_set
default_target_temperature: 20.5
sensor: templiving
control_parameters:
kp: 0.4
ki: 0.004
ESPHome config
number:
- platform: opentherm
t_dhw_set:
name: "Boiler DHW Setpoint"
max_t_set:
name: "Boiler Max Setpoint"
ESPHome output
INFO ESPHome 2023.10.0
INFO Reading configuration /config/esphome/heating-controller.yaml...
INFO Generating C++ source...
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 33, in <module>
sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')())
File "/esphome/esphome/__main__.py", line 1036, in main
return run_esphome(sys.argv)
File "/esphome/esphome/__main__.py", line 1023, in run_esphome
rc = POST_CONFIG_ACTIONS[args.command](args, config)
File "/esphome/esphome/__main__.py", line 454, in command_run
exit_code = write_cpp(config)
File "/esphome/esphome/__main__.py", line 189, in write_cpp
generate_cpp_contents(config)
File "/esphome/esphome/__main__.py", line 201, in generate_cpp_contents
CORE.flush_tasks()
File "/esphome/esphome/core/__init__.py", line 650, in flush_tasks
self.event_loop.flush_tasks()
File "/esphome/esphome/coroutine.py", line 246, in flush_tasks
next(task.iterator)
File "/esphome/esphome/__main__.py", line 181, in wrapped
await coro(conf)
File "/data/external_components/f21ab308/components/opentherm/number.py", line 34, in to_code
keys = await generate.component_to_code(
File "/data/external_components/f21ab308/components/opentherm/generate.py", line 107, in component_to_code
entity = await create(conf, key, hub)
File "/data/external_components/f21ab308/components/opentherm/number.py", line 18, in new_openthermnumber
await number.register_number(var, config, min_value = config[input.CONF_min_value], max_value = config[input.CONF_max_value])
TypeError: register_number() missing 1 required keyword-only argument: 'step'
Not sure what I'm doing wrong but can't get this working:
when I run: esphome -v run thermostat-number-minimal.yaml
I get below
INFO Reading configuration thermostat-number-minimal.yaml...
Failed config
opentherm: [source thermostat-number-minimal.yaml:25]
Component not found: opentherm.
number.opentherm: [source thermostat-number-minimal.yaml:28]
Platform not found: 'number.opentherm'.
platform: opentherm
t_set:
name: Boiler Control setpoint
Whatever I do, can't get opentherm to be found.
In the same folder as my thermostat-number-minimal.yaml
there is also this tree folder with stuff brought in from git:
.esphome\external_components\e2aecb28\components\opentherm\
So git kinda works to bring in the repo source, but after that don't know why it still complains about opentherm not being found.
Good work! Brilliant.
Can your add to list senors one small, but very needed sensor - "t_set"?
Now, im cant see, whot make PID, its no good.
Thanks!
These are the Burner starts, CH pump starts, ..., DHW burner operation hours messages in the protocol. Their value can be reset by sending a WRITE_DATA message with data 00 (though support for this is optional for the slave). We should add a button for each of these to reset the counter.
Note that this will require a rework of the build_request
logic and probably the schema, because now we have both read and write support on the same message. This was already the case for t_dhw_set
and max_t_set
, but there we simply preferred the write request. That won't work here...
Since the button press is handled asynchronously in the message loop anyway, it might be solvable by checking if the button was pressed and then using the write request version.
Hi,
First of all I would like to thanks for you work.
I'm trying to use it with my Immergas Victrix Tera 28 1 but it looks like CH max water point cannot be changed.
I've underfloor heating system and I wanted to change maximum water temperature in CH. It should be 40 degrees but this limit doesn't work. How can I set a max water temperature? Is it possible without recompilation of Opentherm library?
Thanks,
Seba
There is a problem when i try to compil.
THNKS
INFO Reading configuration /config/esphome/d1_mini_2.yaml...
WARNING 'd1_mini_2': Using the '_' (underscore) character in the hostname is discouraged as it can cause problems with some DHCP and local name services. For more information, see https://esphome.io/guides/faq.html#why-shouldn-t-i-use-underscores-in-my-device-name
INFO Generating C++ source...
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 33, in
sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')())
File "/esphome/esphome/main.py", line 965, in main
return run_esphome(sys.argv)
File "/esphome/esphome/main.py", line 952, in run_esphome
rc = POST_CONFIG_ACTIONS[args.command](args, config)
File "/esphome/esphome/main.py", line 397, in command_run
exit_code = write_cpp(config)
File "/esphome/esphome/main.py", line 178, in write_cpp
generate_cpp_contents(config)
File "/esphome/esphome/main.py", line 190, in generate_cpp_contents
CORE.flush_tasks()
File "/esphome/esphome/core/init.py", line 622, in flush_tasks
self.event_loop.flush_tasks()
File "/esphome/esphome/coroutine.py", line 246, in flush_tasks
next(task.iterator)
File "/esphome/esphome/main.py", line 170, in wrapped
await coro(conf)
File "/config/esphome/.esphome/external_components/d4d3a138/components/opentherm/number.py", line 34, in to_code
keys = await generate.component_to_code(
File "/config/esphome/.esphome/external_components/d4d3a138/components/opentherm/generate.py", line 107, in component_to_code
entity = await create(conf, key, hub)
File "/config/esphome/.esphome/external_components/d4d3a138/components/opentherm/number.py", line 18, in new_openthermnumber
await number.register_number(var, config, min_value = config[input.CONF_min_value], max_value = config[input.CONF_max_value])
TypeError: register_number() missing 1 required keyword-only argument: 'step'
Some prework in terms of configuration is already done, but still needs to be implemented in the message handling code.
Hi,
I'm use DIYLESS master shield. This shield have a temperature sensor connect to pin 14. How I can set it in yaml instead of HA sensor?
thanks
Not sure if it's an ESPHome bug, but I get this only with esphome-opentherm. After I restart Home Assistant, the integration fails with this error:
Error setting up entry opentherm for esphome
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 382, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/esphome/__init__.py", line 370, in async_setup_entry
infos, services = await entry_data.async_load_from_store()
File "/usr/src/homeassistant/homeassistant/components/esphome/entry_data.py", line 228, in async_load_from_store
infos.append(cls.from_dict(info))
File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/model.py", line 87, in from_dict
return cls(**init_args)
File "<string>", line 16, in __init__
File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/model.py", line 73, in __post_init__
super().__setattr__(field_.name, convert(val))
File "/usr/local/lib/python3.10/site-packages/aioesphomeapi/util.py", line 49, in fix_float_single_double_conversion
if value == 0 or not math.isfinite(value):
TypeError: must be real number, not NoneType
This is the yaml configuration:
substitutions:
devicename: opentherm
upper_devicename: Opentherm
esphome:
name: $devicename
platform: ESP8266
board: d1_mini
esp8266_restore_from_flash: true
external_components:
source: github://arthurrump/esphome-opentherm@main
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "${devicename} Fallback"
password: !secret wifi_password
web_server:
port: 80
captive_portal:
logger:
api:
encryption:
key: <redacted>
ota:
password: <redacted>
opentherm:
in_pin: 12
out_pin: 14
ch_enable: true
dhw_enable: true
output:
- platform: opentherm
t_set:
id: t_set
min_value: 15
auto_max_value: true
zero_means_zero: true
number:
- platform: opentherm
t_dhw_set:
name: "Boiler DHW Setpoint"
auto_min_value: true
auto_max_value: true
max_t_set:
name: "Maximum allowable CH water setpoint"
sensor:
- platform: opentherm
rel_mod_level:
name: "Boiler Relative modulation level"
t_boiler:
name: "Boiler water temperature"
ch_pressure:
name: "Boiler Water pressure in CH circuit"
t_dhw:
name: "DHW temperature"
t_dhw_set:
name: "Domestic hot water temperature setpoint"
- platform: homeassistant
id: ch_room_temperature
entity_id: sensor.ble_temperature_a4c1384e0601
filters:
# Push room temperature every second to update PID parameters
- heartbeat: 1s
binary_sensor:
- platform: opentherm
ch_active:
name: "Boiler Central Heating active"
dhw_active:
name: "Boiler Domestic Hot Water active"
flame_on:
name: "Boiler Flame on"
fault_indication:
name: "Boiler Fault indication"
entity_category: diagnostic
diagnostic_indication:
name: "Boiler Diagnostic event"
entity_category: diagnostic
dhw_present:
name: "Configuration: DHW present"
entity_category: diagnostic
ch2_present:
name: "Configuration: CH2 present"
switch:
- platform: opentherm
ch_enable:
name: "Boiler Central Heating enabled"
mode: restore_default_on
climate:
- platform: pid
name: "Central heating"
heat_output: t_set
default_target_temperature: 20
sensor: ch_room_temperature
control_parameters:
kp: 0.4
ki: 0.004
deadband_parameters:
threshold_high: 0.3°C # deadband within +/-0.5°C of target_temperature
threshold_low: -0.3°C
visual:
temperature_step: 0.5 °C
This happens with ESPHome 2023.2.4. Any idea what could trigger that error?
For some features the boiler can indicate support through special messages, currently exposed as binary sensors:
dhw_present
for Status(dhw_enable) and dhw related messagescooling_supported
for Status(cooling_enable) and cooling_controlch2_present
for Status(ch2_active) and ch2 related messagesdhw_setpoint_transfer_enabled
for reading t_dhw_set
dhw_setpoint_rw
for writing t_dhw_setmax_ch_setpoint_transfer_enabled
for reading max_t_set
max_ch_setpoint_rw
for writing max_t_setIf one of the messages is being sent that has a support indicator, we should query support at startup and automatically disable all unsupported messages. This information should probably be included in the schema, either in the binary sensors as an indicates_support_for
or in the entity's with some support_indicated_by
with a format similar to auto_min/max_value.
Clear logging is required, so useful to do this on startup as users are more likely to see the logs at that point.
Managed to compile and install this integration. The I get the following error as a loop:
[06:04:48][W][opentherm:195]: Received invalid OpenTherm response: 0, status=3
[06:04:48][D][opentherm:159]: Building TSet write request
[06:04:48][D][opentherm:251]: Sent OpenTherm request: ffffffff
Any thoughts?
For some reason, my boiler ends up with a max_t_set value set at 0. This is an "invalid" value anyway, because my boiler should only allow values like 40-80 (lower and higher bounds).
But because my boiler setting is override from ESP OpenTherm, I end up with max_t_set as a zero value.
number:
- platform: opentherm
max_t_set:
name: "Boiler Max Setpoint"
min_value : 40
max_value : 80
Even if I remove this from the config file I still get the problem.
Because of that my boiler is "stuck"/bugged, like the max temperature allowed is 0 so the boiler will never/ever heat water again. I feel a bit lucky because I found this very fast. I can fix this by going in the complicated/hard to access secret menu of my boiler and setting up the parameter to the right value. As soon as I touch the wheel it jumps from 0 back to the minimum 40 value, and I can go up to 80.
This issue can also be fixed by setting the value in the HomeAssistant interface by setting the value manually at something higher than 40, like 80. After that my boiler will happily start heating water.
I tried also:
auto_min_value: true
auto_max_value: true
and still get the issue.
Not sure what zero_means_zero: true
is supposed to do.
I don't know how to exclude it or prevent the ESP code to touch this parameter, it seems to always affect me even if I remove the code from the yaml config file.
May I first thank you endlessly for this custom component! I've been wanting this for a very long time. I ordered the opentherm thermostat 2 years ago and didn't use it yet. Now I took it from under the dust and to my big surprise, there was an esphome integration. This is gold!!
But my issue I have:
I use the yml file at the bottom (copy paste from an example I took here). I didn't change anything except for the external_components block.
I use esphome 2023.9.3, with Python 3.11.2 in a venv which I activate when I want to do something with esphome. I'm not that big a user but so far it has worked very well for me on other projects.
But when I check the config of the yml file at the bottom, I get this:
(esphome) user@macbookuser:~/Documents/smarthome/esphome$ esphome config opentherm-esphome.yml
INFO ESPHome 2023.9.3
INFO Reading configuration opentherm-esphome.yml...
INFO Cloning github://arthurrump/esphome-opentherm@main@None
Failed config
external_components: [source opentherm-esphome.yml:15]
-
Cloning into '.esphome/external_components/8cae1e12'...
git: 'remote-github' is not a git command. See 'git --help'.
source:
type: git
url: github://arthurrump/esphome-opentherm@main
(esphome) user@user:~/Documents/smarthome/esphome$
Before I also ran into no such compontent, then I read that you have to have a recent version of python (which seems to be so), so it can't be that problem I guess, or maybe too recent?
My yml file:
esphome:
name: thermostat-pid-complete
external_components:
- source:
type: git
url: github://arthurrump/esphome-opentherm@main
esp8266:
board: d1_mini
logger:
api:
ota:
wifi:
ap:
ssid: "Thermostat"
password: "MySecretThemostat"
captive_portal:
opentherm:
ch_enable: true
dhw_enable: true
output:
- platform: opentherm
t_set:
id: t_set
min_value: 20
max_value: 65
zero_means_zero: true
sensor:
- platform: opentherm
rel_mod_level:
name: "Boiler Relative modulation level"
t_boiler:
name: "Boiler water temperature"
t_ret:
name: "Boiler Return water temperature"
- platform: homeassistant
id: ch_room_temperature
entity_id: sensor.temperature
filters:
# Push room temperature every second to update PID parameters
- heartbeat: 1s
binary_sensor:
- platform: opentherm
ch_active:
name: "Boiler Central Heating active"
dhw_active:
name: "Boiler Domestic Hot Water active"
flame_on:
name: "Boiler Flame on"
fault_indication:
name: "Boiler Fault indication"
entity_category: diagnostic
diagnostic_indication:
name: "Boiler Diagnostic event"
entity_category: diagnostic
switch:
- platform: opentherm
ch_enable:
name: "Boiler Central Heating enabled"
mode: restore_default_on
climate:
- platform: pid
name: "Central heating"
heat_output: t_set
default_target_temperature: 20
sensor: ch_room_temperature
control_parameters:
kp: 0.4
ki: 0.004
</code>
Hi,
Firstly thanks for your hard work; but this is really helping optimise my heating.
Unfortunately I have an issue with my boiler Short Cycling. I'm pretty sure it's due to the boiler now being oversized having shifted to full UFH.
That said, reading Opentherm Specification v2.2 Section 5.3.8.2 Boiler Sequencer Control - I think message IDs 14 and 15 would be really useful ( at least for me!). They are included in Ihors library as MaxRelModLevelSetting and MaxCapacityMinModLevel respectively.
Would this be possible to be added to your component? Or is it as simple as copy / paste / modify a suitable section of schema.py?
Thanks!
OpenThermMessageID::ASFflags:
flags = (response & 0xFFFF) >> 8;
vars.service_required.value = flags & 0x01;
vars.lockout_reset.value = flags & 0x02;
vars.low_water_pressure.value = flags & 0x04;
vars.gas_fault.value = flags & 0x08;
vars.air_fault.value = flags & 0x10;
vars.water_overtemp.value = flags & 0x20;
vars.fault_code.value = response & 0xFF;
when i try to install i get this error
In file included from src/opentherm_gw_climate.cpp:1:
src/opentherm_gw_climate.h:10:10: fatal error: esphome/components/custom/climate/custom_climate.h: No such file or directory
10 | #include "esphome/components/custom/climate/custom_climate.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [/data/opentherm/.pioenvs/opentherm/src/opentherm_gw_climate.cpp.o] Error 1
If the response is of type UNKNOWN_DATA_ID
, the boiler does not recognize this type of message and we can immediately stop sending it. If the response has type DATA_INVALID
then the requested data is not available or invalid (in the case of a read request). If that happens consistently, say 10 times in a row with backoff, then we should assume that the message is not supported and stop sending it.
If DATA_INVALID
is sent as response to a write request, we sent some invalid data. That should not happen and warrants opening an issue here, so that should be included in the log message. If it also happens repeatedly, disabling still seems reasonable.
It's not great if people depend on the main branch if there will be breaking changes. So we should set up a versioning scheme with tags for each version and some release notes (CHANGELOG.md). Each release has three tags: vX.Y.Z, vX.Y and vX. The latter two roll forward for each new patch release. This is how GitHub Actions are also typically versioned, e.g. actions/checkout has a v3.0.2 and a v3 tag, the latter of which formerly pointed to v3.0.1 and v3.0.0. Only vX.Y.Z tags are promoted to a release.
I'm not sure how this could be accomplished in the schema, but it would be helpful to prevent having both a t_set_number
and a t_set_output
, because behaviour in that case is undefined and an update to one does not change the value in the other. (That wouldn't make sense: there is no way in which an output can report back.)
Right now this will likely result in a warning about duplicate defines, which is something but not great. This should be validated at the Python stage if at all possible.
Validation OK but...
INFO ESPHome 2023.10.3 INFO Reading configuration /config/esphome/thermostat-pid-complete.yaml... INFO Generating C++ source... Traceback (most recent call last): File "/usr/local/bin/esphome", line 33, in <module> sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')()) File "/esphome/esphome/__main__.py", line 1036, in main return run_esphome(sys.argv) File "/esphome/esphome/__main__.py", line 1023, in run_esphome rc = POST_CONFIG_ACTIONS[args.command](args, config) File "/esphome/esphome/__main__.py", line 403, in command_compile exit_code = write_cpp(config) File "/esphome/esphome/__main__.py", line 189, in write_cpp generate_cpp_contents(config) File "/esphome/esphome/__main__.py", line 201, in generate_cpp_contents CORE.flush_tasks() File "/esphome/esphome/core/__init__.py", line 650, in flush_tasks self.event_loop.flush_tasks() File "/esphome/esphome/coroutine.py", line 246, in flush_tasks next(task.iterator) File "/esphome/esphome/__main__.py", line 181, in wrapped await coro(conf) File "/data/external_components/d4d3a138/components/opentherm/number.py", line 34, in to_code keys = await generate.component_to_code( File "/data/external_components/d4d3a138/components/opentherm/generate.py", line 107, in component_to_code entity = await create(conf, key, hub) File "/data/external_components/d4d3a138/components/opentherm/number.py", line 18, in new_openthermnumber await number.register_number(var, config, min_value = config[input.CONF_min_value], max_value = config[input.CONF_max_value]) TypeError: register_number() missing 1 required keyword-only argument: 'step'
When installing the example yaml structure, I get the following message.
Source defined at: github://arthurrump/esphome-opentherm@main
INFO ESPHome 2023.10.6
INFO Reading configuration /config/esphome/bramka-ot.yaml...
INFO Generating C++ source...
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 33, in
sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')())
File "/esphome/esphome/main.py", line 1036, in main
return run_esphome(sys.argv)
File "/esphome/esphome/main.py", line 1023, in run_esphome
rc = POST_CONFIG_ACTIONS[args.command](args, config)
File "/esphome/esphome/main.py", line 454, in command_run
exit_code = write_cpp(config)
File "/esphome/esphome/main.py", line 189, in write_cpp
generate_cpp_contents(config)
File "/esphome/esphome/main.py", line 201, in generate_cpp_contents
CORE.flush_tasks()
File "/esphome/esphome/core/init.py", line 650, in flush_tasks
self.event_loop.flush_tasks()
File "/esphome/esphome/coroutine.py", line 246, in flush_tasks
next(task.iterator)
File "/esphome/esphome/main.py", line 181, in wrapped
await coro(conf)
File "/data/external_components/d4d3a138/components/opentherm/number.py", line 34, in to_code
keys = await generate.component_to_code(
File "/data/external_components/d4d3a138/components/opentherm/generate.py", line 107, in component_to_code
entity = await create(conf, key, hub)
File "/data/external_components/d4d3a138/components/opentherm/number.py", line 18, in new_openthermnumber
await number.register_number(var, config, min_value = config[input.CONF_min_value], max_value = config[input.CONF_max_value])
TypeError: register_number() missing 1 required keyword-only argument: 'step'
We should set ch_enable to true only if there is actually a non-zero setpoint temperature. This is especially important for use with the PID climate, as that is how it indicates that the heating should be enabled.
Proposed logic: Status(ch_enable) = ch_enable && ch_enable_switch->state && t_set_{input}->state > 0.0
If the switch or t_set is not configured, that part should default to true. This setup works well with an output for PID control, either with min_value = 0 (default) or zero_means_zero = true.
This makes sure that we only enable heating if there is actually a request for heating as indicated by the requested boiler set temperature. The same should apply for cooling_enable and ch2_active.
Some considerations:
Would it be possible to have a PID controller which changes based on the outside temperature?
something like:
if T_out<0 and T_out>-5
kp: x.x
ki: x.x
if T_out<5 and T_out>0
kp: x.x
ki: x.x
if T_out<5and T_out>30
kp: x.x
ki: x.x
I'm using this project to control my boiler.
for the CH temperature I'm using PID which works great.
for DHW I want to simply use a number to a set temperature but every time the ESP reboots, I have to set it again.
I didn't find a way to specify a default value. Am I missing something or could it be added as an option?
It looks like
in_pin:
out_pin:
works only in arduino framework.
This is the part of my YAML file:
esphome:
name: opentherm
friendly_name: OpenTherm
platformio_options:
board_build.f_flash: 40000000L
board_build.flash_mode: dio
board_build.flash_size: 4MB
board_build.mcu: esp32c3
board_build.variant: esp32c3
board_build.f_cpu: 160000000L
esp32:
board: lolin_c3_mini
framework:
type: esp-idf
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
CONFIG_ESP32_DEFAULT_CPU_FREQ_160: y
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ: "160"
COMPILER_OPTIMIZATION_SIZE: y
CONFIG_BT_BLE_50_FEATURES_SUPPORTED: y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
CONFIG_ESP_TASK_WDT: y
CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10"
advanced:
ignore_efuse_mac_crc: false
variant: esp32c3
Can you correct it?
Add support for shield mounted ds18b20 temperature sensor. Marked T on the OpenTherm Master Shield.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.