MQTT topics

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

Moderator: hvxl

Post Reply
jodur
Starting Member
Starting Member
Posts: 6
Joined: Tue Nov 21, 2017 3:20 pm

MQTT topics

Post by jodur »

I am running succesfully OTGW on my homeassistant with the help of otmonitor MQTT.

With the current availabe MQTT topics i am not able to make a 100% complete implementation

This is regarding the overide temperature. I am able to set the override temperature without trouble with the topic 'actions/otmonitor/setpoint'
This Mqqt topic is translated to a <TT=xx> command. The overide is active until the next switchpoint of the thermostat clockprogramm.

I want to detect this switchpoint from the clockprogramm, so i am able to update the GUI that the overide is no longer active.

Any suggestions how to implement this, with the current availabe MQTT topics?

I have several programming experiences (C,C++, Visual Basic, Python, PHP, Javascript) but no TCL yet!
I studied the source of otmonitor but until know i can't make any sense out of it and cannot find the code part where the MQTT topics are defined.

Could someone point me in the direction?
HarmOtten
Starting Member
Starting Member
Posts: 13
Joined: Wed Nov 08, 2017 9:53 pm

Re: MQTT topics

Post by HarmOtten »

Hi jodur,
I do not know if there is a MQTT topic for it, but I check the raw messages from the OTGW, and check if the value for "Remote override room setpoint" (Message type "9") is set to 0 (zero) or not.

Code: Select all

AC0090000  Read-Ack    Remote override room setpoint: 0.00
If the value is zero, then you know the override is cancelled.
Hope this helps.
jodur
Starting Member
Starting Member
Posts: 6
Joined: Tue Nov 21, 2017 3:20 pm

Re: MQTT topics

Post by jodur »

Thnx for the reply, but it is not what asked.
I am perfectly aware of all the opentherm messages (I am even considering to write a plugin for homeassistant, but have not any experience in phyton, but would be a perfect challenge and learning project).
I was looking in the TCL source code where is can find the defined MQTT topics, because if it could be solved in TCL, with just a few lines in code i would first try that way. (programmers are lazy!)
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: MQTT topics

Post by hvxl »

That is also not what was asked. I can't think of a way to do what you asked with the available MQTT topics.

But adding a new topic should indeed just be a few lines of Tcl. Roughly what you would have to do is to add an entry to the signals variable in otmonitor.tcl, I suggest to use "RemoteOverrideRoomSetpoint {temp float}", and then append remoteoverrideroomsetpoint to the line that says "special 4 9 guifloat override" towards the end of the same file.
Schelte
lsiepel
Starting Member
Starting Member
Posts: 14
Joined: Tue Oct 31, 2017 8:49 pm

Re: MQTT topics

Post by lsiepel »

Ah, similar to viewtopic.php?f=75&t=11401

Somewhere on the forums i found a link to: http://otgw.tclcode.com/otmonsrc.html (this page doesn't seem to be linked from any other page from http://otgw.tclcode.com)

It tooks some time to understand how it works, but i managed to add MaxModulation, RemovetOverrideSetPoint and WaterPressure changes to mqtt. The updated otmonitor.tcl is added to this post.
I also noticed a minor issue: the 4.3 changelog is not listed on http://otgw.tclcode.com/download.html

Would you be interested in using a github repo? As this would make it easier for the community to contribute and take advantage of changes that others make.

Edit: Deleted wrong file.
Last edited by lsiepel on Fri Jan 05, 2018 1:38 am, edited 1 time in total.
cville
Starting Member
Starting Member
Posts: 5
Joined: Wed Jan 03, 2018 4:38 pm

Re: MQTT topics

Post by cville »

lsiepel wrote:It tooks some time to understand how it works, but i managed to add MaxModulation, RemovetOverrideSetPoint and WaterPressure changes to mqtt. The updated otmonitor.tcl is added to this post.
I tried to follow your example by inspecting your code to find out where/how you made your changes but the attached ZIP file seems to be identical to the original code. Did I miss something?
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: MQTT topics

Post by hvxl »

lsiepel wrote:Somewhere on the forums i found a link to: http://otgw.tclcode.com/otmonsrc.html (this page doesn't seem to be linked from any other page from http://otgw.tclcode.com)
There is a link to it on the download page.
lsiepel wrote:I also noticed a minor issue: the 4.3 changelog is not listed on http://otgw.tclcode.com/download.html
That's because the latest version of the firmware is 4.2.5. There is no 4.3 firmware yet.
Schelte
lsiepel
Starting Member
Starting Member
Posts: 14
Joined: Tue Oct 31, 2017 8:49 pm

Re: MQTT topics

Post by lsiepel »

Sorry i zipped the wrong file. The right one is attached.

May i suggest to make the link more clear? At the moment it looks like it points to the source code, not to a page explaining how to contribute or build otmonitor. The release notes could have a 4.3 Dev section containing the patches that have not been released yet.
Just trying to help.
Attachments
otmonitor.zip
(14.7 KiB) Downloaded 485 times
cville
Starting Member
Starting Member
Posts: 5
Joined: Wed Jan 03, 2018 4:38 pm

Re: MQTT topics

Post by cville »

Thanks for uploading the correct code.

I'm trying to figure out how to make all missing data-elements available via mQTT. I can see how the missing data-elements can be added to "set signals" starting in line 186 but I don't understand if and how to make the equivalent changes to the GUI section staring at line 1818. Can you help? An example, for e.g. "Central heating 2 mode" would be helpful.

As an aside - and probably a question to Schelte - what is the reason for exposing only a subset of the data-elements to MQTT?

[Moderator edit: Irrelevant quote removed]
cville
Starting Member
Starting Member
Posts: 5
Joined: Wed Jan 03, 2018 4:38 pm

Re: MQTT topics

Post by cville »

cville wrote:

I'm trying to figure out how to make all missing data-elements available via mQTT. I can see how the missing data-elements can be added to "set signals" starting in line 186 but I don't understand if and how to make the equivalent changes to the GUI section staring at line 1818. Can you help? An example, for e.g. "Central heating 2 mode" would be helpful.

As an aside - and probably a question to Schelte - what is the reason for exposing only a subset of the data-elements to MQTT?
Anyone?
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: MQTT topics

Post by hvxl »

cville wrote:I'm trying to figure out how to make all missing data-elements available via mQTT. I can see how the missing data-elements can be added to "set signals" starting in line 186 but I don't understand if and how to make the equivalent changes to the GUI section staring at line 1818. Can you help? An example, for e.g. "Central heating 2 mode" would be helpful.
To add things to MQTT, they do not necessarily have to be added to the GUI or the web interface as well.
cville wrote:As an aside - and probably a question to Schelte - what is the reason for exposing only a subset of the data-elements to MQTT?
That's like asking why you didn't mow the neighbor's lawn, but only your own: It would have been more tedious work and I didn't need it.

Nevertheless, I have attempted to add some more support for CH2 to the OTmonitor source code. But since my system doesn't have a CH2 circuit, I could not really test it. So, just let me know if it doesn't work correctly.
Schelte
vrijeduurzaamheid
Starting Member
Starting Member
Posts: 1
Joined: Wed Jun 13, 2018 3:00 pm

Re: MQTT topics

Post by vrijeduurzaamheid »

Good day
I have successfully created and installed my opentherm gateway.

I hope someone can help me that I do not get all the data properly.

question 1: Why is there a lack of value in MQTT?
example: Solar temperature water heater in Summary, not in json and MQTT
question 2: In the isens are worthiness to see but not in OTGW
example: cv pressure is in isens, but in json, but Summary, not in MQTT
Post Reply

Return to “Opentherm Gateway Forum”