Page 1 of 3

OTGW with MQTT and Node Red.

Posted: Sat Dec 31, 2022 4:58 pm
by mwtheplumber
I am using and OTGW with the Opentherm monitor software 4.3.0.2. I would like to use the MQTT function to output to a Nodered dashboard which I use for other projects. I don't seem to be able to get this to work. I am running the Nodered and MQTT broker on a Rasberry PI on my local newtwork and this works fine for other projects. Can anyone tell me what the MQTT topic names are from the OTGW? I think this maybe where my problem lies. Also is my setup correct?

Broker Address: localhost:1880
Broker Port: 1883
Client Indentifier xyz
User Name: myusername
Password: **********
Device Type: central_heating
Device Identifier: otmonitor
Data Format : Standard JSON (All messages tick)
Quality of Service: Assured delivery
Keep-alive Interval: 120
Retransmit Time: 10

Thanks in advance and Happy New Year.

Mike
MQTT Set Up.png
MQTT Set Up.png (241.64 KiB) Viewed 8324 times

Re: OTGW with MQTT and Node Red.

Posted: Sun Jan 01, 2023 2:27 pm
by rgrh
Hello Mike,

You enter wrong data for the "Broker Address" field.
You should remove TCP port : "localhost:1880" --> "localhost"

Happy New Year too.

Re: OTGW with MQTT and Node Red.

Posted: Mon Jan 02, 2023 12:31 pm
by mwtheplumber
Thanks, I have tried that but still no success.

Re: OTGW with MQTT and Node Red.

Posted: Mon Jan 02, 2023 4:58 pm
by Akatar
i use ip adres without port and not localhost with port
and the port number at brokerport

Re: OTGW with MQTT and Node Red.

Posted: Mon Jan 02, 2023 5:37 pm
by mike7
Looks like the version of otmonitor is very old, consider upgrade.

Re: OTGW with MQTT and Node Red.

Posted: Mon Jan 02, 2023 7:25 pm
by mwtheplumber
I have tried upgrading to version 6.4 but I get errors like below
can't set "gui(returntemp)": can't use non-numeric string as operand of "-"
can't use non-numeric string as operand of "-"
while executing
"expr {$gui(boilertemp) - $gui(returntemp)}"
(procedure "deltatemp" line 4)
invoked from within
"deltatemp gui returntemp write"
(write trace on "gui(returntemp)")
invoked from within
"set gui($name) ???"
(procedure "unknownid" line 6)
invoked from within
"unknownid returntemp 0"
invoked from within
"specialcoro force"
(procedure "otmessage" line 23)
invoked from within
"otmessage $us $line [expr {$type & 7}] $id $data"
(procedure "process" line 13)
invoked from within
"process [append data $line]"
(procedure "receive" line 6)
invoked from within
"receive"

Re: OTGW with MQTT and Node Red.

Posted: Mon Jan 02, 2023 9:45 pm
by hvxl
Seeing your error report, it was immediately clear to me that I failed to handle the situation where a boiler doesn't support MsgID 28 (Return water temperature). What surprises me is that you are the first person to run into this.

I will fix it. Thanks for the bug report.

Edit: The fix is now available on github.

Re: OTGW with MQTT and Node Red.

Posted: Tue Jan 03, 2023 12:19 pm
by mwtheplumber
Schelte, thanks for the quick response.
Maybe a stupoid question, but how do I update the programme from github. I usually just download from the OTGW web page?

Re: OTGW with MQTT and Node Red.

Posted: Tue Jan 03, 2023 5:54 pm
by hvxl

Re: OTGW with MQTT and Node Red.

Posted: Tue Jan 03, 2023 6:31 pm
by mwtheplumber
Thanks once again. After I posted the last post, I did find the instructions and got that working. I have also managed to get the MQTT working with Nodered.
Thanks to everyone for their help.

Re: OTGW with MQTT and Node Red.

Posted: Tue Jan 10, 2023 7:20 pm
by mwtheplumber
An update on this. I now have OTMonitor version 6.4 running on a Raspberrypi with FW version 5.7. All appears to be good and MQTT is sending messages to my Nodered, however I am not getting the boiler water temperature message. I have a node set up as events/central_heating/otmonitor/#
which feeds into a change node that sets the msg.payload to msg.payload.value. I can see all sorts of messages such as dhwtemperature, outside temperature, flame, chenable, chwaterpressure, controlsetpoint. I know the boiler is transmitting the boiler water temperature as it shows in the status page on the html page.

Any ideas?

Re: OTGW with MQTT and Node Red.

Posted: Tue Jan 10, 2023 10:01 pm
by mike7
Take a look for msgId 25 at summary page and check the frequency. May be you need to add alternative with AA command.
OTMonitor publishes "events/central_heating/otmonitor/boilerwatertemperature" topic for msdId 25.

Re: OTGW with MQTT and Node Red.

Posted: Tue Jan 10, 2023 10:14 pm
by mwtheplumber
Mike, it shows a frequency of 5 for the boiler water temp.

Re: OTGW with MQTT and Node Red.

Posted: Tue Jan 10, 2023 10:43 pm
by mike7
I have no idea ....
Screenshot 2023-01-10 at 23.41.42.png
Screenshot 2023-01-10 at 23.41.42.png (145.33 KiB) Viewed 7421 times

Re: OTGW with MQTT and Node Red.

Posted: Wed Jan 11, 2023 12:14 am
by mwtheplumber
I am mystified by it. I also get a return temperature message although the boiler (Intergas) does not transmit return temperature and it doesn't show up in the status screen.
{"name":"temp","type":"float","value":12,"timestamp":1673018635444}