Opentherm gateway/thermostat with full integration for Home Assistant

That’s right. In the “Manual” mode, a number entity will appear; the value can be changed manually or in automation.

ok, I thought if I switch to manual, the value 22.2 is ds18b20 on the wemos board, so the temperature of the sensor in the room will be displayed

No, there is no point in creating a sensor when the manual type is set, because it is assumed that the value will be set from HA by editing the number entity.

Awesome project LazyDev! I’ve been looking for something like this and I got to test out whether there’s any possibility of my Rinnai M060SN (United States) boiler working with OpenTherm (they never say anywhere that it can…). But there was evidence to support it would.

This post is to document this software on an ESP32 with a Rinnai M060SN (probably similar for M090SN, M060CN and M090CN).

I hooked it up (address 0) and a lot is working well.
Here is what is working:

It showed up in the device list as “eBUS CronoThermostat” (kinda strange, cause eBUS as I understand it, is a different protocol than Opentherm). “OpenTherm Gateway” has already been shown since I installed the boiler… It is almost as if the display/controller behave as separate components.

Note that when disconnecting Opentherm/returning to normal, if you are using outdoor reset, it must be re-enabled.

  • Flame Feedback
  • Indoor Temp (Via 1-wire) Feedback
  • Outdoor Temp (Via OpenTherm) Feedback
  • Fluid Temperature Feedback
  • Modulation Level Feedback
  • Pressure Feedback
  • Boiler On/Off Command
  • I think fluid temperature command, it is being limited by the programmed maximum for “zone 1” in the boiler’s config.
  • I think it set the time and date for the boiler.

Here is what is not working:

  • Setpoint can only go from 80 deg C to 90 deg C.

  • “Current temp” seems to be mapped to the current fluid temperature.

  • “Boiler Heating Max Temp” and “Boiler Heating Min Temp” seem to actually be “Boiler Heating Max-- Max temp” and “Boiler Heating Minimum Max Temp”… i.e. The highest and lowest the maximum can be set.

  • I can’t really tell, by title, whether “Heating Max Temp,” “Heating Min Temp,” are referring to fluid temp or room temp.

  • “Heating target” seems to be room temp target, it only allows me to raise and lower it to between 80 and 82 deg C… even though the “dial” in the screenshot above allows for 80 to 90 deg C.

I attempted to change the boiler and HA to units of deg C, but it didn’t seem to improve. But, I haven’t completely discounted that there could be a problem with deg C and deg F mismatches.

My guess is the issue is in the addresses being used, so now my plan is to poke around in the code. (It’s quite involved! So I don’t expect success, but going to try nonetheless. I’ll let you know if I have success.)

Edit: What seems odd, is that the “current temperature” value displayed here, doesn’t match the indoor value from the 1-wire temp sensor. The 1-wire temp sensor reads correctly and is shown in the http interface.

image

image

I can’t tell whether the “controls” are really designed to control fluid temp, or room temp. If it is fluid temp, then I can’t tell where you set the room temp.

The issue with heating max temp and heating min temp could possibly just be solved with hard-coding a value there. The boiler seems to be accepting a fluid setpoint and on/off command. But when the max and min are read in, it prevents me from setting the fluid temp correctly.

Hi,
Thanks for your feedback!
Yes, eBUS is a completely different protocol, it is not compatible with opentherm.

The date and time are not sent to the boiler; if it has changed, it is strange.
Current temp is the coolant temperature if PID/Equitherm is not enabled.
“Boiler Heating Max Temp” and “Boiler Heating Min Temp” - boiler restrictions.

Here’s something to try:

  1. Change the “Master MemberID code”, on rc17 after the change you do not need to reboot the ESP
  2. Comment out this part and try to build the firmware from the sources:
    OTGateway/src/OpenThermTask.h at 9e3ef7a465c606630d7f812c19dd3badb23ae376 · Laxilef/OTGateway · GitHub
    After that, manually change the values of “Heating min temp” and “Heating max temp” in HA
1 Like

Thanks for the suggestions!

I commented out that section of code, built it and installed. HA is set to US units. Master ID: 0 (I left it at zero because the boiler does respond to commands.)

tl;dr: Commenting out that portion of the code helped things significantly. Then I changed each parameter to deg C individually which also improved things significantly. The only remaining question I am trying to figure out is why with PID the heating setpoint is pegged high when setpoint > air temperature and why Equitherm factor T is grayed out.


Referring to the photo below

  • Heating Max now accepts new values that are manually entered!

  • Heating Min now accepts new values that are manually entered!

image

  • Minor Issue: I’d like to set this to ~ 68 deg F, and the lowest I can set is 93.2 deg F. (This boiler heats a garage floor with air temp setpoint ~ 40-60 deg F).

Referring to the below screenshot, this number updates target fluid temp correctly!

However, in the screenshot, I set it to 90 deg F. I get a red underline. When I increase/decrease it, it temporarily jumps to the new number and then jumps back to 168.8 deg F:

image

The change is correctly shown here:

image

And the boiler updates fluid temperature setpoint!:


Note: Large number is fluid temp setpoint in deg F. Top right small temperature is outdoor temperature in deg F.


Referring to the screenshot below, these numbers seem to actually be in deg C instead of deg F:

image


Potentially coincidental, but this number seems about correct:

image


When enabling Equitherm, it seems to behave correctly! I notice that “Currently” changes from fluid temperature to room temperature in deg C. The Heating Setpoint seems to change based on difference between air temp and air temp setpoint.


When enabling PID, I notice that “Currently” changes from fluid temperature to room temperature in deg C. When attempting to modify it, it will change on the main display, but does not change when “popped open.”
image

image

When attempting to change the value in the pop-up, it does not retain a change.

The “Heating Setpoint” does not seem to move (possibly the default PID settings are aggressive?)… But, the boiler will turn off if it has reached setpoint.

image


So in summary, so far, I think this is definitely useable in equitherm mode (though the boiler can do this on its own), and PID might work. I need to play with PID a bit more to see and will report back.


Edit: Heating hysteresis cannot be lowered below 32 deg F (makes sense, because if this is limited to a positive number in deg C, 0 deg C = 32 deg F)… So if I can selectively change all of this to deg C, I could convert the setpoint temperature elsewhere. Or just live with deg C.


Edit 2: Changing each value individually to deg C fixed the issue with hysteresis. Then I had this error:

image

Rebooting HA caused some values to swap back to deg F. I changed them back to deg C, rebooted again and now the PID min temp and hysteresis are both working correctly.

The only remaining question I am trying to figure out is why with PID the heating setpoint is pegged high when setpoint > air temperature and why Equitherm factor T is grayed out.

Update: Seems to be working great! Thanks for your great work on this! The integral must’ve just been wound up because the PID did eventually start changing. The only issue is that I’d like to set the target air temp as low as 5 deg C, but i will probably be able to locate that in the code. A couple last questions:

  • Do you happen to know what model of PID is implemented? (Parallel, Ideal, or Series) And/or what the units are for each PID factor? (Examples for integral: Repeats/min, min/repeat, repeats/sec, sec/repeat and others.)

  • Can both Equitherm and PID be used? The reason I ask is because Equitherm basically operates feedforward, and PID operates feedback. The combination allows for great control (similar to 3-element drum level control).

In the firmware code there are limits from 1 to 99 Celsius and from DEFAULT_HEATING_MIN_TEMP=20 to DEFAULT_HEATING_MAX_TEMP=90 (defines.h)
Perhaps problems due to conversion to Fahrenheit, I don’t know.
The right solution would be to add a temperature type selection (Celsius/Fahrenheit) to the firmware, because your boiler seems to accept values in Fahrenheit.

When you use both PID and equitherm, the PID additionally controls the temperature instead of the T factor, so it is disabled in HA.

I used an open source library. I think you can take a look at the code and you will find the answer there :slight_smile:

1 Like

Thanks again for your hard work on the app and assistance helping me getting it going!

Just an FYI for people that @LazyDev was nice enough to update the firmware to include an option to disable reception of the min/max temp from the boiler! So now it is fully compatible with Rinnai M060SN boilers (and also likely M090SN, M060CN, M090CN).

I haven’t had success in anywhere near a decent tune, but I don’t think it is a result of any software issues, just me issues.

Other Notes

LazyDev may correct me if I am wrong, but after playing and reading/translating, I think DT represents delta time for those familiar with PID. And derivatives and integrals aren’t really calc based as delta T is a discrete value, dependent on DT.

Being able to see the input and output temps of the water (in my case water/glycol), as well as flame and modulation feedback helped me gain some more understanding of the thermodynamics involved. My particular boiler tries to maintain a delta temperature between input and output, which i believe mostly translates into efficiency. Higher delta T often comes from lower return temperatures and lower return temperatures = lower exhaust temperature = working in the condensing region = higher efficiency. The downside is that the boiler would lower the duty cycle of the pump to try to achieve this. The result of that is that the boiler supply temperature would start to rise, exceed the water setpoint, and cut the flame. Then the process would start over. Now that I knew this, i reduced the allowable minimum pump duty cycle in the boiler settings which eliminated this cycling.

My preference is to minimize boiler cycling and utilize the concrete slab to hold the heat. That coupled with the fact that I don’t mind a few degrees of hysteresis in the garage means the boiler should be able to fire for a couple hours at a time, which I think should help reduce number of thermal cycles in the boiler and increase its life.

The other insight the software provided, is I could determine a typical reasonable delta temperature between water setpoint and ambient temperature. If this delta t becomes too small, the boiler will also have a tendency to cycle as the heat isn’t being pulled off by the concrete fast enough. Generally, it seems like for mild cool outdoor temperatures, descending below 80 deg F on the water setpoint for ambient temperatures of around 58 deg F results in the boiler cycling.

This software also helped me confirm my belief that the boiler is generally just a bit large for my use case. Based on the modulation variable, I confirmed that my use case to keep a ~950 sq ft. garage at ~50-60 deg F in a MN winter will vary between 0 and ~30k BTU depending on the outdoor temperature. This boiler is 60k btu max, and modulates down to 17k BTU. However, this was the smallest gas boiler I could find (in the states anyway), and it is certainly a much better fit than some of the huge boilers I have seen installed for similar situations. (Even people discussing potentially using a 199k btu water heater as a boiler.)

We have now transitioned out of winter here. But when it returns, my thought is that I am going to setup some automations to maintain a minimum delta t between water and ambient. Then, potentially slightly linearly increasing the water temperature when it gets cold enough outside. This winter was pretty mild, so I don’t yet know at what outdoor temperature I want to start increasing boiler water temperature.

1 Like

Dear @LazyDev,

Thank you for all your work. I can’t express how fantastic I find it that you and everyone in this community help people control their Home locally with Home Assistant, away from the cloud.

A brief overview of my situation: I live in the Netherlands, and my boiler is broken. I have now ordered a Vaillant ecoTEC plus VHR 35-40CS/1-5 modulating boiler, but my Nest thermostat does not support this modulating feature. Therefore, I have ordered the kit from DIYless.

What is your advice on the best way to use this within Home Assistant? I want my current Nest to control the Opentherm gateway, which in turn sends a signal to my boiler, which then controls my floorheating.

Thank you in advance for your tips.

Kind regards,
Chad

HI @chadderksen,

The controller does not control the modulation, it only reports via opentherm the required temperature to the boiler, and the boiler itself controls the modulation.

I have no experience with Nest, but I read that it also controls the boiler via the opentherm bus. Since only one master device can be connected to the boiler, it will not be possible to use Nest and another opentherm controller at the same time.

Dear LazyDev,

Ok, all clear, thnx for the reply.

BR

Chad

Vaillant products are usually compatible with ebusd.

Google it, the adapter needed costs no more than 20 euros but it’s a nice piece of electronics and firmware.

thanks [LazyDev] the explanation provided are clear and easy to follow. :slight_smile:
I have probably an easy question for many of you. according to the explanation, the system will be automatically added in homeassistant.
I’ve bought a openthermgateway from DIYLESS, the Wemos D1 mini reconize the data coming from my heating system (Remeha Tzerra) but homeassistant doesn’t seem to add the device automatically.
MQTT is well configured as homeassistant receives the data.
thanks

edit1: never mind :smiley: I found my mistakes. I don’t know why I was expecting a device but it’s entities which are now added in my dashboard. :smiley:

edit2: I’m now checking what could be the message I need to send to modify the status of the heating system.
with my old heating system, I had a thermostat with schedule [on at 6h30 - off at 22h] and other conditions like vacation (stay at 15°) or home (use schedule). This is done through node-red.
I’ve looked at the different website but I don’t really get what would be the topic and payload for, for instance, change the temperature to xx. it’s with setpoint I guess and also where should it be sent too?
thanks

Boss, do you have a regular circuit diagram? I don’t need to install it on a DIN rail

How can I obtain manufacturing drawings and BOM tables? I want to create them myself

There is a part list on the product page.

The device should have been automatically added to the Home Assistant. The device contains all the device entities.

You can change the temperature through automation, for this there is an entity climate.opentherm_heating

opentherm_adapter_schematic_o1

thanks LazyDev.

mmhh didn’t really think about the automation. I’ll look into this.
for the device being added automatically, didn’t work for me but found an alternative solution.