OTGW firmware 5.0

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

Moderator: hvxl

hvxl
Senior Member
Senior Member
Posts: 1987
Joined: Sat Jun 05, 2010 11:59 am
Contact:

OTGW firmware 5.0

Post by hvxl »

All,

I managed to optimize the OTGW code and free up some space. I then promptly used that space to implement some features that have been requested by users over the years.

OTGW firmware 5.0 has the following new features:
  • Add support for a 2nd central heating circuit using the new C2, and H2 commands.
  • New TS command to select if a connected temperature sensor is used for the outside temperature (O), or the return water temperature (R). The current setting can be verified with the PR=D command.
  • Support additional commands, like SH, SW and VS, in standalone mode.
  • Report additional values in a PS=1 report: 7 (Cooling control), 8 (Control setpoint 2), 19 (DHW flow rate), 23 (CH2 room setpoint), 31 (CH2 flow temperature), 33 (Boiler exhaust temperature), 70 (V/H master status), 71 (V/H control setpoint), 77 (Relative ventilation).
  • Use a WriteData request when sending the following IDs as alternative messages: 1 (TSet), 8 (TSetCH2), 14 (MaxRelMod), and 71 (VSet).
  • Repeat alternative messages that didn't receive a valid response.
A while ago I mentioned that version 4.3 was in the pipeline. But because the PS=1 output has changed, I felt that a major version change was in order.

Make sure to upgrade OTMonitor to version 5.0 before upgrading the firmware. Older versions of OTMonitor will not be able to preserve the settings stored in EEPROM.

I also created a test suite. This should have exercised most of the functionality. So I'm quite hopeful that there will not be any stupid bugs in the normal functioning of the OTGW. But because large portions of the code have changed, there is always a change that I missed something. Please let me know if you run into any issues.

For people building from source: My development environment has changed from MPLAB v8.53 to MPLAB X v3.65. This allowed me to do the development on linux. I expect it will also still work on windows with MPLAB X. Just don't use MPLAB X v5.40 or later. Starting with that version, MPASM is no longer included in the MPLAB X IDE and it is crucial to build the firmware.
Schelte
Bororo
Member
Member
Posts: 64
Joined: Mon Jan 31, 2011 11:20 am
Contact:

Re: OTGW firmware 5.0

Post by Bororo »

Thank you very much for this!
So far working like a charm.
I'm not using DS18B20 as my boiler has external sensor attached, but testing command PR=D returns PR: BV. Is "BV" an abbreviation for not available or not connected?
Is O or R used for any calculation in OTMonitor or it's replacing missing values only when boiler does not have internal sensors for this areas?

P.S. I found "Maintain a command history" feature not working in Internet Explorer, but I think it's OK as IE is already deprecated.
P.S2 As stated on http://otgw.tclcode.com/firmware.html BV means Bad Value :oops:
hvxl
Senior Member
Senior Member
Posts: 1987
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW firmware 5.0

Post by hvxl »

BV means Bad Value. That's the response you would get on the PR=D command on firmware versions before 5.0. With 5.0 you get either "O" or "R", irrespective if you have a temperature sensor connected to the OTGW. So I suggest you check that you are really running firmware 5.0 (PR=A).

To clarify: You should have upgraded OTMonitor to 5.0 and then use that to do a firmware upgrade of the OTGW to 5.0. (Some people get confused if both version numbers are out of sync, others get confused when they are the same. I'm not sure how to resolve that.)

The external temperature sensor is only used to fill in a temperature in a MsgID 27 (outside temperature) or MsgID 28 (return water temperature) ReadAck message from the OTGW to the thermostat. This is done by the OTGW firmware, not by OTMonitor. Please try to understand the difference between the two parts. OTMonitor only monitors what the OTGW is doing. OTMonitor doesn't need to run for the OTGW to do its thing.

The command history was only added to the GUI version. For the web version I'm relying on the browser to remember the form history.
Schelte
Bororo
Member
Member
Posts: 64
Joined: Mon Jan 31, 2011 11:20 am
Contact:

Re: OTGW firmware 5.0

Post by Bororo »

OK. Thank you for clarification. You are right, I did not realize that I should upgrade to 5.0 firmware.
I'm receiving Github notification when new OTMonitor is released and forgot to check http://otgw.tclcode.com/firmware.html website if new firmware is available too.
Now PR=D returning PR: D=O.
and logs showing Outside temperature measured by external probe connected directly to the boiler, which is correct:

Code: Select all

10:41:50.049238  T001B0000  Read-Data   Outside temperature (MsgID=27): 0.00
10:41:50.350266  BC01B00B8  Read-Ack    Outside temperature (MsgID=27): 0.72
TheSpanishInq
Starting Member
Starting Member
Posts: 6
Joined: Sun Jan 31, 2021 3:46 pm

Re: OTGW firmware 5.0

Post by TheSpanishInq »

@hvxl, do you have a description off the values that are returned by the PS=1 report in FW 5.0, preferably in order? Or could you direct me to a place where these are described? I took a look at your source code, specifically gateway.asm and found the SummaryReport but failed to understand what was happening miserably. :/

I've put in a feature request for Domoticz to support FW 5.0. The value in field 15 seems to count up to 256 and then start at 0 again:
253.60
254.90
255.20
0.00
0.40
0.50
0.60
0.80
0.90
1.10

At the moment, Domoticz puts this value in a field called 'DWH Temperature', but that doesn't seem right. Or could this be a quirk of my boiler? I have a 'Vaillant ecoTEC plus VHR NL 20-34/5-5 L R6' boiler and a Honeywell Touch Modulation thermostat.
With the description of the values, the Domoticz developer who is so kind as to try to code this change, can check if the values are assigned correctly in Domoticz.

I've attached the otmonitor log collected yesterday, when Domoticz wasn't collecting data for most of the time, and the logs collected today, when Domoticz was collection data from the OTGW.
Attachments
otgwlogs.7z
otlog-20210131.txt collected when Domoticz was running
(121.67 KiB) Downloaded 222 times
TheSpanishInq
Starting Member
Starting Member
Posts: 6
Joined: Sun Jan 31, 2021 3:46 pm

Re: OTGW firmware 5.0

Post by TheSpanishInq »

Nevermind, I did NOT read your documentation correctly :oops: . Mea Culpa.
TheSpanishInq
Starting Member
Starting Member
Posts: 6
Joined: Sun Jan 31, 2021 3:46 pm

Re: OTGW firmware 5.0

Post by TheSpanishInq »

Could this be a bug in the PS=1 report? Field 15, if I'm right, is MsgID 26. In the otmonitor logs, when Domoticz is nog running and PS=0, it returns values like this, which seem normal to me:

Code: Select all

20:26:41.498162  T801A0000  Read-Data   DHW temperature (MsgID=26): 0.00
20:26:41.616729  BC01A2900  Read-Ack    DHW temperature (MsgID=26): 41.00
20:27:41.499892  T801A0000  Read-Data   DHW temperature (MsgID=26): 0.00
20:27:41.617042  BC01A2900  Read-Ack    DHW temperature (MsgID=26): 41.00
20:28:41.497635  T801A0000  Read-Data   DHW temperature (MsgID=26): 0.00
20:28:41.617800  BC01A3E00  Read-Ack    DHW temperature (MsgID=26): 62.00
20:29:41.498416  T801A0000  Read-Data   DHW temperature (MsgID=26): 0.00
20:29:41.617159  BC01A3F80  Read-Ack    DHW temperature (MsgID=26): 63.50
20:30:41.499171  T801A0000  Read-Data   DHW temperature (MsgID=26): 0.00
20:30:41.621798  B401A4080  Read-Ack    DHW temperature (MsgID=26): 64.50
20:31:41.499287  T801A0000  Read-Data   DHW temperature (MsgID=26): 0.00
20:31:41.621581  BC01A3F80  Read-Ack    DHW temperature (MsgID=26): 63.50
20:32:41.497232  T801A0000  Read-Data   DHW temperature (MsgID=26): 0.00
20:32:41.620803  B401A3E80  Read-Ack    DHW temperature (MsgID=26): 62.50
20:33:41.501467  T801A0000  Read-Data   DHW temperature (MsgID=26): 0.00
20:33:41.616103  B401A3D80  Read-Ack    DHW temperature (MsgID=26): 61.50
Compared to the values in the PS=1 report (as stated above):

Code: Select all

253.60
254.90
255.20
255.90
0.00
0.10
0.40
0.50
0.60
0.80
0.90
1.10
or

18:44:34.897402 00000011/00001010,46.00,00000001/00000001,0.00,0.00,100.00,0/0,19.50,17.00,2.40,0.00,0.00,18.97,48.50,0.10,0.00,43.50,0.00,0,90/10,80/20,0.00,0.00,00000000/00000000,0,0,0,0,0,0,0,0,0,0
18:45:04.909097 00000011/00001010,46.00,00000001/00000001,0.00,0.00,100.00,0/0,19.50,17.00,2.40,0.00,0.00,18.99,49.00,0.10,0.00,43.50,0.00,0,90/10,80/20,0.00,0.00,00000000/00000000,0,0,0,0,0,0,0,0,0,0
18:45:34.914262 00000011/00001010,46.00,00000001/00000001,0.00,0.00,100.00,0/0,19.50,17.00,2.40,0.00,0.00,18.99,49.00,0.10,0.00,44.00,0.00,0,90/10,80/20,0.00,0.00,00000000/00000000,0,0,0,0,0,0,0,0,0,0
18:46:04.904592 00000011/00001010,46.00,00000001/00000001,0.00,0.00,100.00,0/0,19.50,17.00,2.40,0.00,0.00,18.99,49.00,0.10,0.00,44.00,0.00,0,90/10,80/20,0.00,0.00,00000000/00000000,0,0,0,0,0,0,0,0,0,0
18:46:34.918891 00000011/00001010,45.00,00000001/00000001,0.00,0.00,100.00,0/0,19.50,17.00,2.40,0.00,0.00,18.99,49.00,255.90,0.00,44.00,0.00,0,90/10,80/20,0.00,0.00,00000000/00000000,0,0,0,0,0,0,0,0,0,0
18:47:04.916144 00000011/00001010,45.00,00000001/00000001,0.00,0.00,100.00,0/0,19.50,17.00,2.40,0.00,0.00,18.99,49.00,255.90,0.00,44.00,0.00,0,90/10,80/20,0.00,0.00,00000000/00000000,0,0,0,0,0,0,0,0,0,0
18:47:34.920873 00000011/00001010,45.00,00000001/00000001,0.00,0.00,100.00,0/0,19.50,17.00,2.40,0.00,0.00,18.99,49.00,255.90,0.00,44.00,0.00,0,90/10,80/20,0.00,0.00,00000000/00000000,0,0,0,0,0,0,0,0,0,0
18:48:04.930367 00000011/00001010,45.00,00000001/00000001,0.00,0.00,100.00,0/0,19.50,17.00,2.40,0.00,0.00,19.01,49.00,255.90,0.00,44.00,0.00,0,90/10,80/20,0.00,0.00,00000000/00000000,0,0,0,0,0,0,0,0,0,0
hvxl
Senior Member
Senior Member
Posts: 1987
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW firmware 5.0

Post by hvxl »

Somehow the location for storing the outside temperature, provided to the OTGW through an OT command or by an external temperature sensor, is one off. So it's clobbering the DHW temperature value.
Schelte
User avatar
Lizard
Starting Member
Starting Member
Posts: 1
Joined: Thu Feb 04, 2021 1:53 pm

Re: OTGW firmware 5.0

Post by Lizard »

I noticed on the firmware download page, the 5.0 link AND the 4.3 link both point to gateway.hex.
hvxl
Senior Member
Senior Member
Posts: 1987
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW firmware 5.0

Post by hvxl »

Well, that's no good. :oops:
I have corrected it. Thanks for reporting.
Schelte
bartlemoose
Starting Member
Starting Member
Posts: 13
Joined: Thu Dec 17, 2020 10:44 pm

Re: OTGW firmware 5.0

Post by bartlemoose »

Just wanted to say cheers for the bump, upgraded to v5.0 :)
hvxl
Senior Member
Senior Member
Posts: 1987
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW firmware 5.0

Post by hvxl »

A number of problems with firmware 5.0 have been reported. These have been fixed in 5.1, now available on the web site.
Schelte
fojtp
Starting Member
Starting Member
Posts: 3
Joined: Mon Sep 30, 2013 10:19 am

Re: OTGW firmware 5.0

Post by fojtp »

On the download page of the Opentherm monitor in the Source version of link 5.1 (February 11, 2021) there is version 5.0 inside otmonitor.zip
hvxl
Senior Member
Senior Member
Posts: 1987
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: OTGW firmware 5.0

Post by hvxl »

Maybe some day I will may manage to publish a new version without messing up a step of the process. :oops:

I have now put the correct version on the web site. Thanks for reporting.
Schelte
Bororo
Member
Member
Posts: 64
Joined: Mon Jan 31, 2011 11:20 am
Contact:

Re: OTGW firmware 5.0

Post by Bororo »

Thank you very much for new version!
Now I see some more LED working when gateway is in Monitor mode. :)
Post Reply

Return to “Opentherm Gateway Forum”