OTGW with MQTT and Node Red.
Moderator: hvxl
Re: OTGW with MQTT and Node Red.
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).
Re: OTGW with MQTT and Node Red.
I want to ask my question again, do you see a stream (log) of messages in "Messages" tab of otmonitor?
If it is OK then check broker log for connection, looks like something wrong with your setup.-
- Starting Member
- Posts: 24
- Joined: Wed Feb 13, 2019 9:10 am
Re: OTGW with MQTT and Node Red.
Yes, I see the messages in the Messages tab.
Re: OTGW with MQTT and Node Red.
I think otmonitor is not connected to the broker. How did you run otmonitor, with cron on reboot?
-
- Starting Member
- Posts: 24
- Joined: Wed Feb 13, 2019 9:10 am
Re: OTGW with MQTT and Node Red.
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.
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.
Re: OTGW with MQTT and Node Red.
Do you receive any messages started with 0 from mosquitto_sub when running otmonitor on rpi?
-
- Starting Member
- Posts: 24
- Joined: Wed Feb 13, 2019 9:10 am
Re: OTGW with MQTT and Node Red.
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}
Re: OTGW with MQTT and Node Red.
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.
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.
-
- Starting Member
- Posts: 24
- Joined: Wed Feb 13, 2019 9:10 am
Re: OTGW with MQTT and Node Red.
Mike,
Thank you, that looks to have worked. I will keep an eye on it.
I appreciate all your help with this.
Thank you, that looks to have worked. I will keep an eye on it.
I appreciate all your help with this.
Re: OTGW with MQTT and Node Red.
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 ...
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 ...
Re: OTGW with MQTT and Node Red.
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.
Seeing the discussion, I guess OTmonitor could do with a method to see if it successfully connected to the MQTT broker.
Schelte