Interpreting OTGW serial output

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

Moderator: hvxl

Post Reply
franky999
Starting Member
Starting Member
Posts: 2
Joined: Sun Dec 11, 2016 1:39 am

Interpreting OTGW serial output

Post by franky999 »

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?
Templar
Member
Member
Posts: 178
Joined: Fri Mar 18, 2011 8:49 pm
Location: Netherlands

Re: Interpreting OTGW serial output

Post by Templar »

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 5:15 pm, edited 2 times in total.
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Interpreting OTGW serial output

Post by marcelr »

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?
franky999
Starting Member
Starting Member
Posts: 2
Joined: Sun Dec 11, 2016 1:39 am

Re: Interpreting OTGW serial output

Post by franky999 »

@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!
marcelr
Global Moderator
Global Moderator
Posts: 1153
Joined: Thu May 10, 2012 10:58 pm
Location: Ehv

Re: Interpreting OTGW serial output

Post by marcelr »

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 542 times
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Interpreting OTGW serial output

Post by hvxl »

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
mvdp
Starting Member
Starting Member
Posts: 8
Joined: Sun Jan 15, 2017 11:06 pm

Re: Interpreting OTGW serial output

Post by mvdp »

@Schelte,

Please provide an example how to use otmonitor to parse the Opentherm serial output.
hvxl
Senior Member
Senior Member
Posts: 1965
Joined: Sat Jun 05, 2010 11:59 am
Contact:

Re: Interpreting OTGW serial output

Post by hvxl »

OTMonitor by default parses the Opentherm serial output. You don't need to do anything special for that.
Schelte
Yamen
Starting Member
Starting Member
Posts: 1
Joined: Mon Sep 03, 2018 12:06 pm

Re: Interpreting OTGW serial output

Post by Yamen »

franky999 wrote: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.

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.
Hi, would you mind sending me the code you wrote?
I've been trying to do the same thing lately but with no success.
Post Reply

Return to “Opentherm Gateway Forum”