DIY OpenTherm Thermostat?

You could average multiple sensors across multiple rooms and heating types and use that average to feed the opentherm modulation? But that would risk overheating the room with the underfloor heating for a period until the radiators are up to temperature…

You cant just average or control by just floor temp. It would over or underheat. For maximal comfort you need separate control loops for floor and boiler and hidraulic separation for floor loop.So boiler feeds radiators with higher temperature and floor via hidraulic separator takes exact amount of heat it needs.

1 Like

I’m aware of that, hence I said it will overheat.
But if he doesn’t want the hassle of replumbing then it’s AN option.
As you say best option is separating it all out (I plan on doing this with thermal actuators on each rad instead of replumbing)

The different heating modes and complexity with controlling with HA is what put me off putting in underfloor heating while I’m tearing up the floors in my new house.

Thanks a lot Taras. You’re right. Actually I have all of this in place already. Floor heating loops are separated from radiators loop. I can manually (no electric valves yet) decrease water flow for floor heating and that should help me to keep boiler temperature high enough to hit my radiators. Of course that will take some testing from my end, but I guess it’s to be done. I can already control my radiators through zigbee thermostats and later I will install electric valves to control floor loops. On the top of everything there is Home Assistant to control all elements.

Excited to see the progress on this. I’m just waiting on a few different kinds of zigbee trvs to arrive from Aliexpress and I’ll be looking at a solution like this.

Ron did you ever amend the sketch to include this? Might save me some time working it out.

@shcherban I’ve just moved over to the Master OpenTherm Shield and everything is working as described in your posts and sketch but my knowledge at the moment is lacking on boilers and opentherm.

If I set the temp to 12C on climate card my boiler target temperature will stick at 20C. The boiler target temp will not drop below 20C, it will go above this no problem but not below, is this likely by design of the boiler? It’s an IDEAL LOGIC+ COMBI C30, I’ve reviewed a few of the manuals but can’t see anything that says 20C is lowest it can be set, any other ideas?

Thats the target of the Boiler Temp and it defaults to 20 degrees what is the normal standby temp.
Unless you have a buffer next to your boiler it wont matter.

Depending on your actual temp and setpoint the PID calculation will decide how high the target temp will be. So if the actual temp is 19 and your setpoint is 20 it will prob do something like 45 degrees as target. If the difference is higher it will go hotter, but thats the temp of water going through your radiators.

Tldr: target temp is how hot the water is in your radiator. Its not the setpoint.

The 20 degrees should be set in the sketch if you wanted to change it. But unless you have a good reason, dont.

1 Like

It is by ‘design’ of thermostat. I’ve been doing all the development and testing of Master/Thermostat shield on my heating system, and my boiler (ViessMann some condensing unit) does not allow set temp below 20. Also there is no reason going below this temp, better is to shut off boiler and pump completely to save electricity rather than circulating 15-20 degrees water over pipes.
I have not implemented full shutdown for a security reasons. If something goes wrong (MQTT/HomeAssistant hangs, PID calculation fails, thermometer sends incorrect data) boiler would kept at minimum temperature to avoid freezing (for a cases when boiler and thermostat are left in some remote environment where you cant keep an eye on it).
But again, this is more for ‘conventional’ heating system with radiators and floors. If you have some tricky setup that can utilize heat from such a low water temperature - you can easily edit sketch to allow boiler target below 20.
Here’s the code:
image

Thank you for the breakdown, that makes a lot more sense to me now. I really should of read more about standard boiler operation before migrating across. Just excited to get away from my unreliable Tado setup.

@shcherban

Thank you for the explanation and I understand the rational on why the sketch doesn’t include a “full shutdown” as standard when you factor in potential MQTT/HA disconnects etc.

I have conventional heating (combi boiler) and radiators, nothing fancy, I was confused between target temp and setpoint (RTFM moment from myself).

I’ve been using the Tado system for a few years and I’m just getting my head around the differences and the changes I’m seeing in gas usage. I’m assuming Tado implemented a “full shutdown” when the setpoint was reached as I’d use no gas when the Tado was manually “turned off” or when setpoint was reached.

Since implementing this solution I’m seeing gas usage (not a lot) even if the climate card is off or setpoint is reached, I understand this now from your explanation above and in a few previous comments. However it was a difference in data and I was ignorant to the facts but just to confirm if I wanted to implement a similar system to the Tado I’d need to build in the “full shutdown” into the sketch like you advised @Ron365 ?

@shcherban Just one more question. I have followed DYI OpenTherm Thermostat blog, and I found an article on how to use external bluetooth sensor to feed thermostat with room temp data wirelessly. As I understood, in order to build that king of thermostat I need to use Tasmota firmware on my ESP board. The question I have is. How can I get tasmotized thermostat in to my Home assistant installation? There is another great article (on the blog) showing on how to add this thermostat to HA, but that particular one is running your firmware. I understand that in both cases thermostat talks to HA via MQTT so I’m guessing it’s going to be very similar, if not the same, if comes to getting both these thermostat options to HA?

@wzbart im not sure tasmotas thermostat can talk via MQTT. You can integrate tasmota board into HA and find out how can you change setpoint from it. Or you can add bluetooth support to thermostat sketch, if you have programming skills.
Another option is to leave HA thermostat sketch and integrate bluetooth thermometer directly into HA via tasmota or openmqttgateway and then point thermostat temp topic to openmqttgateway’s one. That approach would require another esp32 board for bluetooth scanning purposes.

Actually if you’re using this system at a place where you live full shutdown is not critical problem, since youre always at place and can quickly figure out that something going wrong. We just not included that feature because its not safe for ‘unattended setup’ use cases.
At my house Im doing ‘full shutdown’ if none of my three heating zones requires heat. There was a glitch maybe once or twice, i just fixed the problem and forgot about it for the rest of the time.

Could you give me a bit more details on that third option please? So what you’re suggesting is to make that ble sensor taking via mqtt. I dont really understand however which temp topic i should be pioning to that mqttgateway one.

Official tasmota documentation is actually referring to this AH integration https://www.home-assistant.io/integrations/opentherm_gw/. It might be worth to check this out.

That integration implies OpenTherm gateway plugged to a PC via USB-Serial adapter if i understood correctly

You can use this guide: Home Assistant OpenTherm Thermostat - DIYLESS Electronics

Then in homeassistant you just need to set up an automation which sends whatever your temperature source is to an mqtt publish e.g.

- alias: sendtemp trigger: - platform: time_pattern seconds: "/20" action: service: mqtt.publish data: {"payload": "{{ states('sensor.0x00158d000465809a_temperature') }}", "topic": "opentherm-thermostat/current-temperature/set", "qos": 0, "retain": 0}

Source: Publish current temperature to mqtt topic - #4 by nonyhaha

Edit: As suggested by @Dujith you should use the github link for up to date sketch but the steps in the blog post cover the rest of the setup: https://github.com/diyless/home-assistant-opentherm-thermostat

I personally use esphome to read LYWSD03MMClink but as mentioned above to read these ble sensors you need an esp32. Instructions are in that link.

1 Like

@wzbart @sour_brambles
The blog is outdated, best is to use their github: https://github.com/diyless/home-assistant-opentherm-thermostat

1 Like

Aye, that’s a good point.

@shcherban might be worth amending your blog post to point to up to date source code so there isn’t any confusion for newer users.

Thanks a lot @sour_brambles. I know that blog and this is exactly what I was planning to do. Another esp32 is not a problem, as I’m already using one (with esphome) to read other xiaomi ble sensors I have. The only part, which I’m still not sure about, is that OpenTherm Thermostat sketch for home assistant. I’m lacking this king of programming sills, therefore I don’t really know how does it really works and how to send external temp sensor readings to the thermostat. Now you’re telling me it’s just enough to publish external temp value to opentherm-thermostat/current-temperature/set topic, and if this all that it takes I think I can manage it easily. I will probably go for node red automation, rather than standard HA one.
Once again. Many thanks for your advice !

If I’m understanding what you are trying to do then yes that’s all you need to do.

In terms of the arudino sketch the only thing you need is to add the libraries mentioned in the blog and change the pins if you are using an esp32. You also need to add your WiFi details and mqtt server but that’s it with the sketch.

Once you have that up and running you can use node red to send the ble temperature to opentherm-thermostat/current-temperature/set

There are a few people trying to implement opentherm via esphome and there is a working example using the diyless board if you are more comfortable with esphome but at the same time it is early days.

@shcherban would you be happy to share the sketch you are using? I’m also lacking in the code department and I’d like to implement the full shutdown into the code. Or maybe it could be add to the github source but commented out to allow people to implement if they choose to do so. Sorry for being a pest.