DIY OpenTherm Thermostat?

Having looked over and over and over the available thermostat options available to me I am leaning heavily on the DIY kit available here: http://ihormelnyk.com/
(There is also a video demoing it (in quite good detail!) on youtube).

I believe I could use the MQTT version on the site.

My boiler is housed in the utility room right at the back of the house, I would need to be able to use the temperature from my lounge to control the boiler instead.

Not being up to speed with the use of MQTT (it’s my plan over Christmas) could I alter the sketch on the site to take the temperature from a second ESP8266 instead?

I also plan on creating my own TRV system to create heating zones, also using MQTT, I presume that by having the TRVs and Boiler control all tied into MQTT then expanding this system out to additional zones should be relatively easy?

The only downside I can see so far is that my boiler would be reliant on my Wifi. Could I add a button to the OpenTherm 8266 to over-ride the setting for an hour? (Also not up to speed with sketches…)
Or if the ESP8266 loses Wifi will it be completely inoperable including local control?

To display and adjust the temperature from the living room (like a traditional thermostat to keep the wife happy) I plan on setting up a tablet on the wall in kiosk mode with Node-Red thermostat (or lovelace) set up.

Feel free to point out any glaring issues you may spot that I’m not aware of…

4 Likes

Hello!
I have gas boiler and plan to buy this DIY kit too.
Do you have yaml config code so I can see how your integration with Home Assistant?
Thanks.

Still no progress I’m afraid,
I was told circuit boards aren’t good Christmas presents
so I wasn’t allowed to order the opentherm kit and my 10month old took all my time so I couldn’t tinker with the trv set up.
If I’m honest I doubt I’ll get time until the summer as it’s back to back birthdays in my family until then :frowning:

Hello!
How is your project doing?
I am in kind of a same boat. I want to use the same project. I already built the parts needed. I also want to use smart valves to control different rooms’ temperature.
The problem i see is that it may be harder to use temperatures from other aensors, as this would need modifications on the esp software.
What i was thinking of doing, was to use a trick. Use the opentherm esp’s temperature setpoint as a switch. Make an automation. The trigger would be the modification of a room’s temperature. If you want that room to be warmer, and set the heat higher, that triggers the setpoint of the opentherm controller 1 or 2 degrees higher than its temperature. This will have no effect on the room where the esp is placed, but it will start heating the required room.

I’m interested in all of your setups.
I’m getting frustrated by my Nest thermostat, and looking to do it myself.

I already have smart TRVs and temperature sensors throughout the house. And would like to combine it with smart room climate control. Functionality you find in Evohome or Tado, but I’m not going for another cloud provider again. I might as well stay with Nest (even though the API is currently not working).

This time it is local, with HA and MQTT. I’m even interested in building an integration for HA to manage this easily, and open-source the whole thing.

Hi
I’ve done a sample setup of mqtt thermostat and a simple integration into HA.
Here’s details:
https://diyless.com/blog/home-assistant-opentherm-thermostat


It has an option to take the temperature from an external sensor (currently im using xiaomi-aqara and bluetooth ones, located in different rooms). Sketch can be easily modified to add wifi-loss case handling.
5 Likes

Also there’s tasmota support and custom HA integration for Ihor’s hardware:
https://tasmota.github.io/docs/OpenTherm/

1 Like

Sick! Thank you very much for this. Does this setup allow your boiler to modulate the gas it uses instead of it simply being ‘on’ or ‘off’?

Modulation level is always handled by boiler according to difference between target and current water temperature. And you can only set the target water temperature. In my setup target [water] temperature is calculated with a simple PI algorithm according to the current room temperature, so there is kind ‘smart’ regulation, not dumb ‘on-off’.
However if your current heat consumption is far less than a minimal boiler power, you’ll see ‘on-off’ effect due to very fast water heating.

Looking for a new thermostat I ran into this very nice looking solution. I do wonder what the Slave opentherm shield is for…?

Hi @shcherban,
Thank you for your solution on the software side.
I want to ask you if we could use the room temperature from another sensor. I also use Aqara sensors around the house, and I would like to use one of those in the climate integration, so I won’t have to pull wires to a certain room.

Could you not do that via automations?
IF sensor < setpoint THEN turn on heating

@Coedy Be more specific please. if the temperature and setpoint from the climate integration are from one room, how will i command it to heart another room?

Do you not have access to a switch for the boiler by integrating this?

IF aquara sensor < setpoint (an input number, not the integration) THEN turn on heating (either flip the boiler control switch, or, set the setpoint to 50c to ensure the heating comes on-then when it’s over your input number it will turn off)

The other far less messy option may be to create a generic climate, set the climate switch to be the switch that fires the boiler, but set the sensor to your aquara. All the logic is controlled by generic thermostat then.

I’m speaking hypothetically as I am no longer living in my house with the opentherm boiler (have had to move back with my parents to keep an eye on them) and never got the system installed as couldn’t get my wife’s buy in

Hi @Coedy, The idea is to use the opentherm adapter. Thus, the boiler will not work as an on/off switch.

1 Like

My understanding was that the opentherm controller could trigger as the on/off switch.
The modulation would then be controlled by the opentherm controller.

My code sample already can use the temperature readings from external sensor. Currently this is done via MQTT. ESP will listen to ‘external_temp_topic’ and use it as ‘current temperature’ reading. If no external temperature for more than 60 sec - ESP switches to internal DS18B20.

2 Likes

Thank you @shcherban.

How should this be done? make an automation to publish current temperature from the aqara sensor to external_temp_topic topic?
At this moment I flashed only tasmota with opentherm enabled on the esp chip. I guess I should use your sketch for this?

Please advise :slight_smile:

Opentherm controller is not for on-off only, but for regulation. Regulation is setting water temperature, and modulation is flame level needed to achieve this temperature. You set the reguation and boiler sets the modulation.
You can use different algorithms to achieve either gas economy of maximum room comfort.
One [simple] options is:

  • room temperature goes down - you set water temperature higher
  • room temperature goes up - you set water temperature lower
  • room temperature over setpoint - switch off heating
  • room temperature far below setpoint (i.e. you just switched heating after a vacation) - set water temperature to maximum to heat your home faster

In that case depending on how much water temperature is added to room change by 1 degree you’ll get faster or lower reactions for thermostat setpoint change.

For gas economy you can emulate dumb switch algorithm, turning heating on only when room temperature falls below setpoint more than 0.5 or 1.0 degree. Even further you can lower temperature for night time, or regulate by coldest/hottest room in your house. And use open-therm for setting water temperature depending on outside conditions.
Almost every boiler manufacturer has a heating curves. They describe how much degrees you should pump into radiators depending on outside temperature, so you dont overheat them when i.e. theres sunny day and your house needs less heating energy.
Heres example:
image
X is outside temperature, and Y is water temperature. Depending on your house you select one of theese curves, and forget about boiler, because starting from this point it will adjust water temp according to outside temp. And you can get idea from those curves to work with opentherm.
P.S. currently (in my setup) Home Assistant is not responsible for heating switching, it only displays actual status, allows you to set the target temperature and optionally provides external temperature sensor. And all logic is inside ESPs firmware, because HA is capable only for ‘on-off’ heating, and open-therm is capable of smoothly adjust needed heating.

3 Likes

Yep, you should flash my sketch and then setup an automation to publish room temperature to the highlighted topic. I’ve done this via node-red on every 30 seconds basis.


You can grab the code either from an article or from the github repo (second is preferred, there are some comments with explanations there).
Getter topic is a return from ESP itself. It represents the same value you’ve published to a setter or an internal ESPs readings, if setter was not used.

1 Like