Directly control water temperature

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

Moderator: hvxl

Wavemaker
Starting Member
Starting Member
Posts: 3
Joined: Sun Apr 01, 2018 12:59 am

Directly control water temperature

Post by Wavemaker »

I have a set-up where all my heaters are equipped with Max EQ3 automatic thermostatic valves and I have the OTGW monitoring my Intergas Kombi Kompakt HRE A 28/24 boiler and Honewell Round Modulation thermostat. The temperature override is working properly.

The (obviously) Honeywell only controls the temperature in one location (the living room). I would like to let the OTGW control the boiler such that it keeps ALL rooms to their minimum temperature as set on the Max EQ3 units. And I would still like to use the Honeywell thermostat in the living room to control just the living room.

I understand this is not basic functionality of the OTGW. So I expect that I will need to write my own script with PID control to do this, to read time traces from influxdb and to control the OTGW through serial or MQTT.

But my main question is: are there any serial/MQTT commands/topics that I can already use to directly control the boiler water temperature? Where to make edits in the otmonitor code (if applicable). Did anybody do this before...?
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Directly control water temperature

Post by hvxl »

The serial commands to control the boiler water temperature have been available for a long time. Check out the CS, CH, and MM commands.

It wasn't yet possible to issue these commands through MQTT, so I have added some more actions to the OTmonitor source code. With this version, the available MQTT action topics are:
  • actions/otmonitor/setpoint (Temporarily change the thermostat setpoint)
  • actions/otmonitor/constant (Permanently change the thermostat setpoint)
  • actions/otmonitor/outside (Set outside temperature)
  • actions/otmonitor/hotwater (Domestic hot water enable)
  • actions/otmonitor/gatewaymode (Switch between gateway and monitor mode)
  • actions/otmonitor/setback (Configure the setback temperature)
  • actions/otmonitor/maxchsetpt (Set the maximum central heating setpoint)
  • actions/otmonitor/maxdhwsetpt (Set the domestic hot water setpoint)
  • actions/otmonitor/maxmodulation (Override the maximum relative modulation)
  • actions/otmonitor/ctrlsetpt (Override the control setpoint)
  • actions/otmonitor/chenable (Control the CH enable status bit)
  • actions/otmonitor/ventsetpt (Configure a ventilation setpoint override value)
Note: I also noticed that the code failed to correctly determine the data format and always interpreted the actions data as "unformatted". That has been fixed. So, if you have the data format set to one of the JSON flavors, you should now also send the data as JSON.
Schelte
Wavemaker
Starting Member
Starting Member
Posts: 3
Joined: Sun Apr 01, 2018 12:59 am

Re: Directly control water temperature

Post by Wavemaker »

My bad, I never sufficiently looked at the total list of serial commands on the firmware page. Didn't expect it there... So yes, everything is there to get started and support from MQTT even makes things more elegant. Thanks for a great tool! I'll report here when I have things working (that may take a while).
umtauscher
Starting Member
Starting Member
Posts: 9
Joined: Sun Feb 26, 2017 2:48 pm

Re: Directly control water temperature

Post by umtauscher »

Hi hvxl,

thanks, thats exacly what I was searching for today.
Is there a binary for Raspberry Pi already built with the changes?
If I am correct, the last binary is older than the new additions?
Thanks

Wilhelm
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Directly control water temperature

Post by hvxl »

Correct. If you want to have a single file executable containing the latest updates, you have to follow a few steps yourself to create the binary.
Schelte
aengen
Starting Member
Starting Member
Posts: 12
Joined: Thu Oct 28, 2021 10:03 pm

Re: Directly control water temperature

Post by aengen »

Hi,
This is my first post on this forum, but so far it has been useful reading about all kind of advices and projects.

But I am completely stuck on publishing MQTT actions for otmonitor that actually have an effect on Otmonitor settings. This is what I have done:
I have a working system including Node Red, Mosquitto (both on the same Pi4), Otmonitor (on a Pi Zero), and an operational OTWG. Everything works fine.

Now I publish a commands from Node Red and this is indeed handled by Mosquitto:
actions/otmonitor/maxchsetpt {"type":"float","value":60}
actions/otmonitor/maxchsetpt {"type":"float","value":60}
actions/otmonitor/hotwater {"type":"boolean","value":true}
actions/otmonitor/maxchsetpt {"value":60}
actions/otmonitor/hotwater {"value":true}
actions/otmonitor/hotwater true
actions/otmonitor/outside 6
actions/otmonitor/outside {"value":6}
actions/otmonitor/outside {"value":6,"type":" float"}


But no change can be observed in Otmonitor (status summary). I have checked that the topic in the MQTT settings is also actions/otmonitor. (no #)
Since I cannot find any example of a working MQTT message, I have come to the conclusion that I am stuck. I hope some can help me, e.g. with an example of working MQTT message to Otmonitor.
Last edited by aengen on Tue Nov 16, 2021 1:41 pm, edited 1 time in total.
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Directly control water temperature

Post by hvxl »

Is your OTmonitor actually connected to mosquitto (check with netstat -an on either the Pi4 or the PiZero)? Which data format have you configured in OTmonitor for your MQTT messages?

This is an example with Data Format set to Standard JSON:
mosquitto_pub -h mqttserver -t actions/otmonitor/outside -m '{"value":11}'

After sending that, you should see something like the following in the OTmonitor log:

Code: Select all

00:22:03.887626	T10010000	Write-Data	Control setpoint: 0.00
00:22:04.016782	BD0010000	Write-Ack 	Control setpoint: 0.00
00:22:04.053987	Command (via MQTT): OT=11
00:22:04.081080	OT: 11.00
00:22:04.387865	T00000000	Read-Data 	Status: 00000000 00000000
00:22:04.541719	BC0000000	Read-Ack  	Status: 00000000 00000000
Schelte
aengen
Starting Member
Starting Member
Posts: 12
Joined: Thu Oct 28, 2021 10:03 pm

Re: Directly control water temperature

Post by aengen »

Dear Schelte,
thanks for the quick response.

The effect of this command (after localizing it) is the same (none). It executes without errors.
I know my connection works, as I can succesfully subscribe to otmonitor topics and I have a working dashboard in Node Red.

Can I check whether Otmonitor has successfully subscribed to the action topic? (I use Mosquito)

kind regards,
Albert
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Directly control water temperature

Post by hvxl »

If your mosquitto setup did not disable the $SYS hierarchy reports, you can check if the subscription count changes when you start and stop OTmonitor by subscribing to $SYS/broker/subscriptions/count:
  • mosquitto_sub -h mqttserver -t '$SYS/broker/subscriptions/count'
Which version of OTmonitor are you using?
Schelte
aengen
Starting Member
Starting Member
Posts: 12
Joined: Thu Oct 28, 2021 10:03 pm

Re: Directly control water temperature

Post by aengen »

Software
OTMonitor version 5.1
Firmware
The OTGW is currently running the gateway firmware, version 5.1.
aengen
Starting Member
Starting Member
Posts: 12
Joined: Thu Oct 28, 2021 10:03 pm

Re: Directly control water temperature

Post by aengen »

I can also cofirm that I can manually set the outside temp with OT=10; although not first time right (boiler returned OT=0 and unknown data id); Boiler is a Nefit Proline Nxt.
aengen
Starting Member
Starting Member
Posts: 12
Joined: Thu Oct 28, 2021 10:03 pm

Re: Directly control water temperature

Post by aengen »

I see the number of subscriptions going up and down when enabling/disabling MQTT in OTmonitor. So it subscribes correctly to my Mosquito server. Thanks for the command to check this.
But still stuck...
aengen
Starting Member
Starting Member
Posts: 12
Joined: Thu Oct 28, 2021 10:03 pm

Re: Directly control water temperature

Post by aengen »

Weird. I just noticed that I see the change in OT temp in the output messages after sending PS=1, but not in the (refreshed) status window. OT monitor is neither publishing updates on the OT on MQTT. As maybe Otmonitor is of its proper tracks, rebooted I have the machine running otmonitor. And tested again. At first this seemed to have effect: The status window says OT=11. But this value appears frozen in later tests....

It starts weird: the return temp (24) is missing (' --' ) in the status window, although it is available in the PS=1 output (the actual value being bogus).
18:55:56.470267 PS: 1
18:55:56.673821 00000000/00000000,0.00,00000011/00000011,0.00,0.00,0.00,28/25,0.00,0.00,1.60,0.00,0.00,0.00,31.00,0.00,11.00,24.00,0.00,0,60/30,85/0,60.00,70.00,00000000/00000000,0,0,12983,0,0,32537,6509,0,0,687

And it becomes more weird still: When I publish {"value": 6} on the actions/otmonitor/outside MQTT-topic, it shows up in the otmonitor messages (good) but not in the status or summary windows of otmonitor (bad):
19:14:21.934072 Command (via MQTT): OT=6
19:14:21.951377 OT: 6.00
19:14:44.386698 Command (via websocket): PS=1
19:14:44.400983 PS: 1
19:14:44.603443 00000000/00001100,0.00,00000011/00000011,0.00,0.00,0.00,28/25,0.00,0.00,1.60,0.00,0.00,0.00,55.00,0.00,6.00,24.00,0.00,0,60/30,85/0,60.00,70.00,00000000/00000000,0,0,12991,0,0,32541,6509,0,0,687
Status window says: outside temp= 11, return temp = ' --'

Positive: both Outside temp as well as Return temp are published on MQTT by otmonitor again, and when I publish actions in Node Red, they result in correct Opentherm messages. Thanks for the good hints.

case closed? The issue that status and summary window are out of sync with data in the messages is still open. This is still an issue after rebooting. I also noticed that not all datafields were published by otmonitor. This seemed resolved by rebooting.

And thanks for your support and for OTGW and otmonitor, they are great tools!
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Directly control water temperature

Post by hvxl »

This shows that your MQTT command is working. OTmonitor does not receive the information it needs to update the status area if you instruct the OTGW to suppress the Opentherm messages via the PS=1 command. The same is true for reporting the changes via MQTT messages. OTmonitor cannot report information it doesn't receive.
Schelte
aengen
Starting Member
Starting Member
Posts: 12
Joined: Thu Oct 28, 2021 10:03 pm

Re: Directly control water temperature

Post by aengen »

Thank you for the quick response. And yes, I am aware that OTGW stops sending regular updates after PS=1. But it is indeed something that might be confusing.

However, I still notice the Status window of Otmonitor does not pick up every change, however otmonitor published it correctly on MQTT.
Right now:

Status window:
Relative modulation level --- % Central heating water pressure --- bar

MQTT:
otmonitor/events/modulation {"name": "level", "type": "float", "value": 0.00, "timestamp": 1636911172743}
otmonitor/events/returnwatertemperature {"name": "temp", "type": "float", "value": 25.00, "timestamp": 1636916615133}
otmonitor/events/chwaterdeltat {"name": "temp", "type": "float", "value": 0.00, "timestamp": 1636916615139}
otmonitor/events/chwaterpresure {"name": "bar", "type": "float", "value": 1.60, "timestamp": 1636911172746}
...

Any thoughts?

Side remark: I have a feature request that all (key) OTGW commands can be provided via MQTT via Otmonitor. This would enable the use of the advanced features of OTGW via MQTT.
Post Reply

Return to “Opentherm Gateway Forum”