Add MsgID=29 (Solar Storage Temperatue) to the PS=1 response

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

Moderator: hvxl

Add MsgID=29 (Solar Storage Temperatue) to the PS=1 response

Postby jake3317 » Fri Oct 07, 2016 9:48 pm

The reason for buying an OTGW was to be able to read within Domoticz what the temperature of my Solar Storage tank is. OTMonitor will read it in PS=0 mode and report it under MsgID=29. However, Domoticz only requests data through PS=1 and unfortunately MsgID=29 is not part of that set of data.

What could be done to make this work for me? Is it possible to 'misuse' by putting the solar temperature in an unused MsgID that my boiler is not able to report anyway? I can imagine that a change in the Print Summary string can have a wrong effect on the readout of other programs, like Domoticz.
jake3317
Starting Member
Starting Member
 
Posts: 16
Joined: April 2016

Re: Add MsgID=29 (Solar Storage Temperatue) to the PS=1 response

Postby hvxl » Thu Oct 13, 2016 2:50 pm

You can modify the sources to replace/add information to the PS=1 output.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1016
Joined: June 2010

Re: Add MsgID=29 (Solar Storage Temperatue) to the PS=1 response

Postby jake3317 » Thu Oct 13, 2016 8:45 pm

Thanks for looking into this for me. What source do you mean that need to be changed? I hope it's doable for a non programmer like me.
jake3317
Starting Member
Starting Member
 
Posts: 16
Joined: April 2016

Re: Add MsgID=29 (Solar Storage Temperatue) to the PS=1 response

Postby hvxl » Sun Oct 16, 2016 3:24 am

I was talking about the assembly source code of the gateway firmware. But don't let that scare you, it's not so difficult.

There are 3 tables involved in generating the PS=1 output. You have to keep these in sync:
StoreFlagTable: This is a bitmap of the message ID's to be reported. To add MsgID 29, you would set bit 5 in byte 3 (both start counting at 0). Currently that byte is b'00011111'. You change that to b'00111111'.
StoreOffsTable: This table keeps track of the number of message IDs stored for all preceding bytes in StoreFlagTable. As you added one in byte 3, the numbers for byte 4 and later have to be incremented by 1. So 13 becomes 14, 15 -> 16, 17 -> 18, and 21 -> 22. Also increment the SUMMARYFIELDS to 26.
StoreProcTable: This table specifies how to format the data value. MsgID 29 is a floating point value. So you should insert a "goto PrintFloat" command between the lines where the comments say "Message ID 28" and "Message ID 48".

Of course you will have to adjust the Domoticz side accordingly. I don't use Domoticz myself, so I can't provide any guidance there.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1016
Joined: June 2010

Re: Add MsgID=29 (Solar Storage Temperatue) to the PS=1 response

Postby jake3317 » Mon Jan 02, 2017 2:34 pm

hvxl wrote:I was talking about the assembly source code of the gateway firmware. But don't let that scare you, it's not so difficult.

There are 3 tables involved in generating the PS=1 output. You have to keep these in sync:
StoreFlagTable: This is a bitmap of the message ID's to be reported. To add MsgID 29, you would set bit 5 in byte 3 (both start counting at 0). Currently that byte is b'00011111'. You change that to b'00111111'.
StoreOffsTable: This table keeps track of the number of message IDs stored for all preceding bytes in StoreFlagTable. As you added one in byte 3, the numbers for byte 4 and later have to be incremented by 1. So 13 becomes 14, 15 -> 16, 17 -> 18, and 21 -> 22. Also increment the SUMMARYFIELDS to 26.
StoreProcTable: This table specifies how to format the data value. MsgID 29 is a floating point value. So you should insert a "goto PrintFloat" command between the lines where the comments say "Message ID 28" and "Message ID 48".

Of course you will have to adjust the Domoticz side accordingly. I don't use Domoticz myself, so I can't provide any guidance there.

I am not a programmer and although I had a look on the source code, I did not see anything that I understood, so I gave up on it for a while. Lately somone on the domoticz forum made a little 'in between' program to switch between PS=0 and PS=1 to be able to both use Domoticz and OT-Monitor at the same time. He was so kind for me to add an extra piece of code to it, to exchange a chosen reported value from the PS=1 string by the Solar Storage Temperature value. Since my Remeha Quinta 28C has not DHW boiler, that temperature was not used anyway. After some iterations it works beautifully. I now use it in Domoticz to display the Solar boiler temperature instead. Job done! What is left, is the ability to override the DHW Setpoint (SW), but I put that issue in a new OTGW topic instead.
When I am able to set the DHW Setpoint, I can than finally control the moment to switch to a hight DHW setpoint, when the Solar Boiler Temperature remains xx many days below 60'C. (This to prevent Legionella in the DHW circuit) while during summer days leave the boiler off when the solar boiler temperature is >45'C and <60'C. The 45'C is enough for showering on the solar boiler, therefore no need to use the gas boiler instead.
jake3317
Starting Member
Starting Member
 
Posts: 16
Joined: April 2016


Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest