OTGW with MQTT and Node Red.

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

Moderator: hvxl

mike7
Member
Member
Posts: 102
Joined: Mon Dec 02, 2013 8:45 am

Re: OTGW with MQTT and Node Red.

Post by mike7 »

OK, so otmonitor can't connect to mqtt broker. "First" messages in your case are not messages from raspberry otmonitor they are last messages from windows one (otmonitor sends retained messages).
mike7
Member
Member
Posts: 102
Joined: Mon Dec 02, 2013 8:45 am

Re: OTGW with MQTT and Node Red.

Post by mike7 »

I want to ask my question again, do you see a stream (log) of messages in "Messages" tab of otmonitor?
Screenshot 2023-01-22 at 21.57.00.png
Screenshot 2023-01-22 at 21.57.00.png (216.82 KiB) Viewed 2658 times
If it is OK then check broker log for connection, looks like something wrong with your setup.
mwtheplumber
Starting Member
Starting Member
Posts: 24
Joined: Wed Feb 13, 2019 9:10 am

Re: OTGW with MQTT and Node Red.

Post by mwtheplumber »

Yes, I see the messages in the Messages tab.
2023-01-22 (3).jpg
2023-01-22 (3).jpg (222.19 KiB) Viewed 2648 times
mike7
Member
Member
Posts: 102
Joined: Mon Dec 02, 2013 8:45 am

Re: OTGW with MQTT and Node Red.

Post by mike7 »

I think otmonitor is not connected to the broker. How did you run otmonitor, with cron on reboot?
mwtheplumber
Starting Member
Starting Member
Posts: 24
Joined: Wed Feb 13, 2019 9:10 am

Re: OTGW with MQTT and Node Red.

Post by mwtheplumber »

The otmonitor is connected to the broker as I get some of the other messages.
e,g chenable, hotwater, flame, controlsetpoint, maxmodulation, modulation, dhwtemperature, outsidetemperature, dhwflowrate, chwaterpressure, chburnerstarts, chburnerhours, error.

Other messages show as retained and do not get updated on MQTT, these include boilerwatertemperature, dhwenable, chsetpoint.

I have verified the above with MQTT explorer.

otmonitor is run with cron on reboot, as is mosquitto.
mike7
Member
Member
Posts: 102
Joined: Mon Dec 02, 2013 8:45 am

Re: OTGW with MQTT and Node Red.

Post by mike7 »

Do you receive any messages started with 0 from mosquitto_sub when running otmonitor on rpi?
mwtheplumber
Starting Member
Starting Member
Posts: 24
Joined: Wed Feb 13, 2019 9:10 am

Re: OTGW with MQTT and Node Red.

Post by mwtheplumber »

Yes

Code: Select all

0 events/central_heating/otmonitor/dhwtemperature : {"name":"temp","type":"float","value":41.32,"timestamp":1674461350950}
0 events/central_heating/otmonitor/outsidetemperature : {"name":"temp","type":"float","value":-2.57,"timestamp":1674461351546}
0 events/central_heating/otmonitor/dhwtemperature : {"name":"temp","type":"float","value":41.28,"timestamp":1674461411482}
0 events/central_heating/otmonitor/outsidetemperature : {"name":"temp","type":"float","value":-2.55,"timestamp":1674461411981}
0 events/central_heating/otmonitor/chwaterpresure : {"name":"bar","type":"float","value":1.05,"timestamp":1674461413081}

mike7
Member
Member
Posts: 102
Joined: Mon Dec 02, 2013 8:45 am

Re: OTGW with MQTT and Node Red.

Post by mike7 »

It is very strange, may be you need to clean reinstall otmonitor.

I suggest the following way:
stop otmonitor
backup and delete your current version of otmonitor
backup and delete .otmonitorrc (I hope it located in /home/pi directory)
cd ~
git clone https://github.com/hvxl/otmonitor.git
wget http://otgw.tclcode.com/download/tclkit-ahf (or http://otgw.tclcode.com/download/tclkit-aarch64 if you use 64-bit version)
chmod a+x tclkit-ahf

and run:
./tclkit-ahf otmonitor/otmonitor.vfs/main.tcl --daemon -w 8880

then connect with browser and perform setup, configuration will be saved in .otmonitorrc file in /home/pi directory

I'm using otmonitor with mqtt on rpi for many years.
mwtheplumber
Starting Member
Starting Member
Posts: 24
Joined: Wed Feb 13, 2019 9:10 am

Re: OTGW with MQTT and Node Red.

Post by mwtheplumber »

Mike,
Thank you, that looks to have worked. I will keep an eye on it.

I appreciate all your help with this.
mike7
Member
Member
Posts: 102
Joined: Mon Dec 02, 2013 8:45 am

Re: OTGW with MQTT and Node Red.

Post by mike7 »

Which version of PiOS are you using? I suggest to run mosquitto, Node-RED, otmonitor etc as systemd services. Also you can use docker with help of docker-compose or without.

PS couple of weeks ago I started Home Assistant and run otmonitor as add-on. Node-RED also can run as add-on for Home Assistant ...
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW with MQTT and Node Red.

Post by hvxl »

Nice to see users helping each other. Thanks Mike!

Seeing the discussion, I guess OTmonitor could do with a method to see if it successfully connected to the MQTT broker.
Schelte
Post Reply

Return to “Opentherm Gateway Forum”