Interpreting OTGW serial output

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

Moderator: hvxl

Interpreting OTGW serial output

Postby franky999 » Sun Dec 11, 2016 12:56 am

Hello,

I've recently successfully built the OTGW (great product!), and I've hooked it up to an ESP8266. I've programmed the ESP8266 with the Arduino IDE to join my wifi network, and publish all data published by the OTGW to a topic on an MQTT server.

The topic now gets messages as follows (so it seems to work):

- BC0192DB3
- T80000200
- B40000200
- T10010600
- BD0010600
- etc...

Ideally, I would like the ESP8266 to emit more human-friendly messages. I would like to make sense of the messages to try to do this, but I'm having some trouble.

I understand what the first letter stands for, but I'm lost on the rest.

Could someone give me a primer on how to parse these kinds of messages?
franky999
Starting Member
Starting Member
 
Posts: 2
Joined: December 2016

Re: Interpreting OTGW serial output

Postby Templar » Sun Dec 11, 2016 1:33 pm

franky999 wrote:Could someone give me a primer on how to parse these kinds of messages?


It's the 4 byte Opentherm frame in hexadecimal format. See OpenTherm Protocol Specification v2.2 paragraph 4.2.
Last edited by Templar on Sun Dec 11, 2016 4:15 pm, edited 2 times in total.
Templar
Member
Member
 
Posts: 63
Joined: March 2011

Re: Interpreting OTGW serial output

Postby marcelr » Sun Dec 11, 2016 2:08 pm

Could someone give me a primer on how to parse these kinds of messages?

I have a parser for these data, written in plain old C, built for a linux box with serial IO . Could that be of use to you?
marcelr
Member
Member
 
Posts: 436
Joined: May 2012
Location: Ehv

Re: Interpreting OTGW serial output

Postby franky999 » Sun Dec 11, 2016 3:21 pm

@templar: thanks!

marcelr wrote:I have a parser for these data, written in plain old C, built for a linux box with serial IO . Could that be of use to you?


That would be of great help, yes!
franky999
Starting Member
Starting Member
 
Posts: 2
Joined: December 2016

Re: Interpreting OTGW serial output

Postby marcelr » Sun Dec 11, 2016 7:44 pm

OK, just try it.

This is far-from-production-level code for a boiler emulator that I've been working on some time ago. It works for an RS232 OTGW with a serial-to-USB converter attached, and interface 1.1 firmware installed.
Part of the code is a thermal description of my boiler, you can safely ignore that, it's incomplete and probably highly incorrect. (building a direct EMS gateway now, to read more data from the boiler and fill the gaps in my boiler parameters).
You may be interested in the functions parse_and_reply() and read_until_valid(), and preprocessor definitions that go with these routines. All reading and parsing is done there.

The OT IDs implemented so far are the ones that are supported by Eneco's toon thermostat and my boiler. Using the protocol specification Templar pointed at may help you fill some of the gaps that may exist for your configuration.
Haven't added the GPL yet, but if you add anything worth sharing, please do so.

Enjoy, and please share any updates.
Attachments
boiler_emu.tar.gz
C-code for parsing OTGW data.
(10.9 KiB) Downloaded 37 times
marcelr
Member
Member
 
Posts: 436
Joined: May 2012
Location: Ehv

Re: Interpreting OTGW serial output

Postby hvxl » Sun Dec 18, 2016 5:43 pm

OTMonitor also includes a parser for Opentherm messages. It handles more than only the messages that are supported by Eneco's Toon and marcelr's boiler.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1016
Joined: June 2010

Re: Interpreting OTGW serial output

Postby mvdp » Wed Jan 25, 2017 8:23 am

@Schelte,

Please provide an example how to use otmonitor to parse the Opentherm serial output.
mvdp
Starting Member
Starting Member
 
Posts: 4
Joined: January 2017

Re: Interpreting OTGW serial output

Postby hvxl » Fri Feb 03, 2017 11:33 pm

OTMonitor by default parses the Opentherm serial output. You don't need to do anything special for that.
Schelte
hvxl
Senior Member
Senior Member
 
Posts: 1016
Joined: June 2010


Return to Opentherm Gateway Forum

Who is online

Users browsing this forum: No registered users and 1 guest