rvdbreemen / OTGW-firmware

A ESP8266 devkit firmware for the Nodoshop version of the Opentherm Gateway (OTGW)
MIT License
145 stars 34 forks source link

Report return water temperature from OTGW using MQTT #235

Closed Pistoletjes closed 6 months ago

Pistoletjes commented 6 months ago

Hi,

I recently added a Dallas-compatible temperature sensor to the GPIOA/B connections of the OTGW. The sensor works, and reports the (more or less) correct temperature as 'Return water temperature' (visible using otmonitor). The information however is not reported in MQTT messages. The value in otmonitor is only updated when I explicitly ask for it using PS=1.

2023-12-06_21h21_53

2023-12-06_21h23_41

Question: is it possible to get the temperature information from OTGW and report it in MQTT messages?

rlagerweij commented 6 months ago

I think you may be able to enable regular reporting of this value by issuing the AA=28 command in to the OTGW. I'm going from memory here but this tells OTGW to add msgid 28 to its regular round of reporting.

To check whether this might work, start with issueing a PM=28 command. If this returns the temperature, I think the above solution will work.

Pistoletjes commented 6 months ago

Hi,

Thanks for your response! Unfortunately, it didn't help. Issuing a PM=28 results in the following:

20:29:34.376959 PM: 28 20:29:36.328240 R801C0000 Read-Data Return water temperature: 0.00 20:29:36.497301 B701C0000 Unk-DataId Return water temperature: 0.00

OpenTherm Monitor's response: 2023-12-18_20h35_04

So it seems that the boiler doesn't support the message. But I shouldn't ask the boiler, because I installed the sensor onto the OTGW board.

When I ask for all the status using the PS=1 command, it returns the correct value:

20:30:09.411825 PS: 1 20:30:09.589351 00000001/00000010,60.00,00000000/00000000,0.00,0.00,100.00,0/0,0.00,0.00,6.00,0.00,0.00,0.00,59.00,0.00,-31.00,22.38,0.00,0,0/0,0/0,50.00,60.00,00000000/00000000,0,0,198,0,0,0,29,0,0,7

And OpenTherm Monitor responds by showing the correct temperature as well: 2023-12-18_20h33_53

So it seems that OTGW is able to report the return water temperature measured from the GPIO pins, and OpenTherm Monitor reports it correctly. But unfortunately, the information is not relayed to or picked up by the ESP8266 -> MQTT.

rvdbreemen commented 6 months ago

This way it will not work. If you just want to monitor your return temperature you need to connect the DS18B20 to the Wemos (see wiki).

The PM=28 will report the boiler information, which is still 0.0. As the sensor is actually measured using the PIC, and the PS=1 is the only way to report it.

This is by design, not a bug.

Find out on this thread why:

https://www.domoticaforum.eu/viewtopic.php?t=14171

Greetings Robert

Pistoletjes commented 6 months ago

Thanks Robert, I overlook this crucial comment on the forum:

Temperature sensors connected to the OTGW are only used to report either the outside temperature or the return water temperature **to a connected opentherm thermostat**.

Thanks again.