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

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:

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