MQTT topics

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

Moderator: hvxl

MQTT topics

Postby jodur » Sun Dec 17, 2017 10:18 pm

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?
jodur
Starting Member
Starting Member
 
Posts: 6
Joined: November 2017

Re: MQTT topics

Postby HarmOtten » Sun Dec 24, 2017 11:54 pm

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.
HarmOtten
Starting Member
Starting Member
 
Posts: 11
Joined: November 2017

Re: MQTT topics

Postby jodur » Mon Dec 25, 2017 9:50 pm

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!)
jodur
Starting Member
Starting Member
 
Posts: 6
Joined: November 2017

Re: MQTT topics

Postby hvxl » Wed Dec 27, 2017 4:31 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1087
Joined: June 2010

Re: MQTT topics

Postby lsiepel » Wed Jan 03, 2018 1:17 am

Ah, similar to https://www.domoticaforum.eu/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 12:38 am, edited 1 time in total.
lsiepel
Starting Member
Starting Member
 
Posts: 14
Joined: October 2017

Re: MQTT topics

Postby cville » Wed Jan 03, 2018 3:43 pm

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?
cville
Starting Member
Starting Member
 
Posts: 3
Joined: January 2018

Re: MQTT topics

Postby hvxl » Wed Jan 03, 2018 11:03 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1087
Joined: June 2010

Re: MQTT topics

Postby lsiepel » Fri Jan 05, 2018 12:37 am

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 41 times
lsiepel
Starting Member
Starting Member
 
Posts: 14
Joined: October 2017

Re: MQTT topics

Postby cville » Fri Jan 05, 2018 11:24 am

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: 3
Joined: January 2018

Re: MQTT topics

Postby cville » Thu Jan 11, 2018 12:10 pm

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?
cville
Starting Member
Starting Member
 
Posts: 3
Joined: January 2018

Re: MQTT topics

Postby hvxl » Mon Apr 02, 2018 4:06 pm

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
hvxl
Senior Member
Senior Member
 
Posts: 1087
Joined: June 2010

Re: MQTT topics

Postby vrijeduurzaamheid » Wed Jun 13, 2018 2:28 pm

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
vrijeduurzaamheid
Starting Member
Starting Member
 
Posts: 1
Joined: June 2018


Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest