Page 1 of 1

MQTT topics

PostPosted: Sun Dec 17, 2017 10:18 pm
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?

Re: MQTT topics

PostPosted: Sun Dec 24, 2017 11:54 pm
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.

Re: MQTT topics

PostPosted: Mon Dec 25, 2017 9:50 pm
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!)

Re: MQTT topics

PostPosted: Wed Dec 27, 2017 4:31 pm
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.

Re: MQTT topics

PostPosted: Wed Jan 03, 2018 1:17 am
by lsiepel
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.

Re: MQTT topics

PostPosted: Wed Jan 03, 2018 3:43 pm
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?

Re: MQTT topics

PostPosted: Wed Jan 03, 2018 11:03 pm
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.

Re: MQTT topics

PostPosted: Fri Jan 05, 2018 12:37 am
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.

Re: MQTT topics

PostPosted: Fri Jan 05, 2018 11:24 am
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]

Re: MQTT topics

PostPosted: Thu Jan 11, 2018 12:10 pm
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?

Re: MQTT topics

PostPosted: Mon Apr 02, 2018 4:06 pm
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.

Re: MQTT topics

PostPosted: Wed Jun 13, 2018 2:28 pm
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