Home Assistant: service to set Maximum CH Setpoint

This Forum is about the Opentherm gateway (OTGW) from Schelte

Moderator: hvxl

Post Reply
javl
Starting Member
Starting Member
Posts: 2
Joined: Tue Dec 21, 2021 6:54 pm

Home Assistant: service to set Maximum CH Setpoint

Post by javl »

I use the OpenTherm Gateway integration in Home Assistant and it works perfectly fine. The only thing that is missing for me is a service to set the Maximum Central Heating Setpoint.

There are sensors (amongst others) for:
sensor.max_ch_setpoint_boiler_opentherm
sensor.control_setpoint_boiler_opentherm
sensor.slave_max_relative_modulation_boiler_opentherm

and services for:
set_control_setpoint
set_max_modulation

I cannot find a service though for setting the Maximum Central Heating Setpoint (so a service that would be called set_max_ch_setpoint_boiler for instance)

The OpenTherm Monitor program does allow me to set the Maximum Central Heating Setpoint on my boiler through the OpenTherm Gateway, but I would like to have this option in Home Assistant too.

Am I overlooking something or is there a particular reason why this service is not implemented in the Home Assistant OpenTherm Gateway integration?
javl
Starting Member
Starting Member
Posts: 2
Joined: Tue Dec 21, 2021 6:54 pm

Re: Home Assistant: service to set Maximum CH Setpoint

Post by javl »

@Robert: Thanks for your DM. I looked at your project and I think you have implemented the function I am looking for. I think it is the SH OTGW command.

My problem is that I cannot find that command in the OpenTherm Gateway integration in Home Assistant. I used the OpenTherm Gateway integration that comes with Home Assistant by default. So I simply added it with: "Add Integration" -> Searched for "OpenTherm Gateway" and added and configure with url "socket://openthermgtw.lan:6638". It works great then. I can read sensor values like the ones I mentioned in my opening post and set certain values, but I cannot set the CH max temperature, because there is no service to do so. I looks like that service is not made available in the OpenTherm Gateway integration in Home Assistant.

The device info as reported by Home Assistant is:

OpenTherm Gateway
by Schelte Bron
Firmware: 5.1
rvdbreemen
Starting Member
Starting Member
Posts: 45
Joined: Sun Jan 19, 2020 2:04 pm

Re: Home Assistant: service to set Maximum CH Setpoint

Post by rvdbreemen »

javl wrote:@Robert: Thanks for your DM. I looked at your project and I think you have implemented the function I am looking for. I think it is the SH OTGW command.

My problem is that I cannot find that command in the OpenTherm Gateway integration in Home Assistant. I used the OpenTherm Gateway integration that comes with Home Assistant by default. So I simply added it with: "Add Integration" -> Searched for "OpenTherm Gateway" and added and configure with url "socket://openthermgtw.lan:6638". It works great then. I can read sensor values like the ones I mentioned in my opening post and set certain values, but I cannot set the CH max temperature, because there is no service to do so. I looks like that service is not made available in the OpenTherm Gateway integration in Home Assistant.
The default integration that comes with Home Assistant and some of the other HA projects are all based on the Python library otgwpy, that communicates over serial to the OTGW. And that integration is limited to what it can do, but if you use the firmware I created in combination with MQTT hub. If you have not installed MQTT yet, then it's just an addon for Home Assistant setups. When setting up MQTT integration on the firmware and then rebooting, it will populate you HA integration with entities for the HA.

Some people like the automation way of Home Assistant, using the YAML style integration, others rather use the Node-Red automation (also a plugin). Either way, once you are setup to use MQTT HA integration, then you can also simply set the topic to control your SH. As described here: https://github.com/rvdbreemen/OTGW-firm ... t-commands

There are many ways of getting things done with your OTGW, hope you find one you like for your projects.
fegyosz
Starting Member
Starting Member
Posts: 1
Joined: Thu Oct 07, 2021 10:49 pm

Re: Home Assistant: service to set Maximum CH Setpoint

Post by fegyosz »

I run into exactly the same issue that the service for setting max ch setpoint was missing.
Using MQTT instead is really simple.
I put this into an automation action:

service: mqtt.publish
data:
topic: actions/otmonitor/maxchsetpt
payload_template: >-
{"value":{{(52 -
(states.sensor.openweathermap_forecast_temperature_low.state | float * 0.8))
| round(1)}}}

This calculates the temperature based on openweathermap forecast for low temperature.

I have a standalone system and running on 2 siemens PID thermostats I had already. Those control the 2 zones (levels) in the house, open valves and telling OTGW that heat is needed. I just need to set the water temperature but the siemens thermostats are very flexible and reliable.
This setup is working great for me.

I really like OTGW, it's a professional level solution, programmed with highest quality.
sygys
Starting Member
Starting Member
Posts: 14
Joined: Mon Dec 27, 2021 4:28 pm

Re: Home Assistant: service to set Maximum CH Setpoint

Post by sygys »

Another option if you dont want to use mqtt or dont have the mqtt hub, is to send the sh command with node red over a tcp out node. When using that node you can send every command the otgw supports. its as simple as making a function node with something like this:

msg.payload = ("CS=75" + "\r\n");
return msg;

And behind that node a tcp out node with:

type: connect to
port 20108 (or the port you are using)
at host: (the ip of the otgw)

When you post the msg.payload (in this example to set the setpoint to 75 degrees) the otgw will receive the command and executes the command to the boiler. In your case the CS should be replaced with SH. You can also make a dynamic value and let that value come from a home assistant sensor. The msg.payload then looks like this:

msg.payload = ("CS=" + msg.setpoint.toString() + "\r\n");
return msg;

in which the value you want is set in the msg.setpoint variable.
Post Reply

Return to “Opentherm Gateway Forum”