[APP][Pro] OpenTherm GateWay MQTT

Homey App Store (stable version):

Homey App Store (test version): OpenTherm Gateway MQTT App for Homey | Homey

There already was an app for OpenTherm GateWay, OTGW for short (many thanks for your work @nlrb !): OpenTherm Gateway App for Homey | Homey
I tried to install it on my new Homey Pro 2023, but that was a no-go. Installing on my older Homey did work, but the connection was somewhat unstable, and the functionality was too heavy for my application.

HP2023 and MQTT support
I found out that OTGW can work with MQTT. So I spent my weekend and a bit more on writing a new OTGW app based on the MQTT interface. A good thing about MQTT is that it is a very stable method, and that the connection can be shared with other users like Home Assistant or Node-RED. Downside is: you need to have or setup an MQTT broker. But if you donā€™t already have an MQTT broker, you can simply install one on Homey: MQTT Broker App for Homey | Homey

OTGW: Central Heater management for control freaks.
The OpenTherm Gateway is placed between your thermostat and your Central Heater.
It provides real time monitoring of many sensors and temperatures in your central heating system. It also allows you to control several advanced settings (USE AT OWN RISK!)

The OpenTherm GateWay is an open source device. It can be built by yourself, or purchased online. I bought it completely built with wifi adapter: https://www.nodo-shop.nl/
The firmware used to develop the Homey app was written by rvdbreemen (Robert van den Breemen) Ā· GitHub .The firmware was already installed when I got the device. IMPORTANT: only the wifi version is supported by this Homey app. The ethernet version is not!

Shower Timer Use Case
About why I wanted to get an OTGW: I have built a fully automatic shower timer. If a family member showers longer then 8 minutes, lights start blinking. If the shower is still on after 10 minutes, lights out :rofl:
Yes, it is quite nerdy. But for myself and my wife it actually helps us very well to reduce our time spent under the shower. The teenage kids however keep showering in the dark foreverā€¦

Now, with OTGW I get detailed information on the state of the Central Heater. For the shower timer I am most interested in DHW (Domestic Hot Water) flow and temperature. In theory Iā€™m even capable of turning down the water temperature on a very long shower session. But I donā€™t think I will implement that for now and keep the peace. :peace_symbol:

Central Heating Tuning Use Case
The second use case for me is fine tuning the Central Heater. By tuning the CH system I hope to save around 5% gas extra per year. The trick is to have the CH run in such a way that the boiler efficiency is improved, while not reducing comfort. Key for this is to reduce the temperature of the return water. A low return temperature of around 25 - 35 degrees improves the efficiency of modern boilers with a blazing 10%, when compared to a return temperature of 60 degrees: https://sdwaterland.nl/wordpress/wp-content/uploads/2016/11/grafiek_ketel_rendement.jpg
This is really for control freaks, and does require to go in-depth and read a lot online. For Dutch readers, this is a good source:
Gas besparen door middel van CV tuning deel III - Duurzame energie en installaties - GoT

Edit: read here how we actually used 40% LESS GAS in the first winter! [APP][Pro] OpenTherm GateWay MQTT - #57 by Gruijter

Is it difficult to install and use OTGW?
I donā€™t mind this thread getting more technical, since OTGW is for the ā€˜advanced control freaksā€™ (at least, that is how I would categorize it). But let it also be clear that the Homey app is not only for expert users or programmers. There is no need to program anything if you buy the device completely built. You only need to do some simple steps that can be done by any person with only very basic technical knowhow:

  1. Buy a completely built OTGW with WiFi and software installed: https://www.nodo-shop.nl/ (the ethernet version does not work, you need the wifi version!)
  2. If you donā€™t have an MQTT broker, you can simply install one on Homey: MQTT Broker App for Homey | Homey
  3. Put the OTGW board in its housing
  4. Place the OTGW between the existing Thermostat and Central Heater (= cut the existing wire coming out of the Central Heater)
  5. Power the OTGW unit and make a direct WiFi connection to it
  6. Configure OTGW access to your in-house WiFi (I had to use a FireFox browser)
  7. Reconnect the OTGW unit via your in-house WiFi: http://otgw.local/
  8. Go to the OTGW settings page and enable connection to the MQTT broker of your choice
  9. Install the Homey app and start adding OTGW as a device
  10. ALL DONE :slight_smile:

Enjoy this Homey App!

For support on OTGW firmware, hardware and tuning your boiler, you can get in depth on Discord: OTGW-firmware

I have published the app to Homey App store and hope that other users will find it useful as well!

Donations are very welcome: PayPal.Me

5 Likes

Is this based on the esp-link MQTT?

I donā€™t really know how the firmware was compiled. I bought it ready to go. This guy wrote the firmware: rvdbreemen (Robert van den Breemen) Ā· GitHub

In the Homey app I use the async-mqtt NPM package as client.

What does the mqtt channel structure look like on your end with that firmware?

It creates a new topic for every new state. So it depends on the functionality of your Heater and Thermostat. There is detailed info via the github link from rvdbreemen.

Why do you want to know?

Iā€™ve looked at mqtt before as the OTGW monitor also can tap into MQTT but fell back to the telnet connecter and the earlier OTGW homey app. With the HP2023 I was afraid this would not work (as you already figured now). I got HomeAssistant up with then OTGW plugin and then back connected and relevant senssors with HomeAssistant homey app. Now you came with a MQTT type of solution with homey but newer /different firmware for that nodemcu chip. Iā€™ll check my firmware mqtt tomorrow and see what channels it dumps.

This firmware works out of the box with HA. It gets discovered (via MQTT) automatically and adds all sensors. It was actually very helpful to get immediately all graphs in HA so I could figure out which sensors I wanted to use in Homey.

And if you feel like it install the Homey app and test if it connects with your firmware: GitHub - gruijter/com.gruijter.otgw

EDIT: No need to install via CLI. The app can be installed now from the Homey app store: OpenTherm Gateway MQTT App for Homey | Homey

Thx, sadly still old Early2016 as its already maxed out, so no clue on resources but will try.

1 Like

Iā€™ve checked but I got a different firmware for that esplink. I tried dumping with otmonitor ā€œOpentherm Monitorā€ tool can also dump OTGW events in MQTT but that is a events/central_heating/otmonitor structure/channel.

And would it be possible for you to change the firmware to match the device as delivered by nodo-shop?
I dont understand yet where the different firmware sits, but this is what I apparently got:

  • OTGW firmware: 0.9.5+4eb7d24 (30-05-2022)
  • PIC firmware: 6.4

As said, I dont know what the difference is between PIC and OTGW.
What part takes care of what functionality?

The esplink is probably the ā€œoldā€ mgmt wifi portion (response for the IP stack & wifi & log services). Othe other layer is the OTGW firmware itself (.hex) file. But am struggling anyway as the OTGW keeps ignoring command atm. So now at a point of trying that firmware you have for the ESP.

The latest OTGW release is here : Release #23: Fixing the plumbing and some small bugs Ā· rvdbreemen/OTGW-firmware Ā· GitHub

The PIC is the controller of the OTGW hw interface between thermostat and boiler. Rel. 6.4 is latest.
The ESP8266 runs the OTGW-firmware that translates/decodes the OTGW messages into a web based page and sends the MQTT formatted messages and handles the required MQTT messages for the autodiscover in HA. (There are other functions as well such as upgrade of the OTGW firmware).

1 Like

I flashed the firmware on the ESP. Got the wifi working via usb, configured MQTT. Then I put the ESP back to the OTGW board power it with the 24v adapter, ping works but nothing (web interface of the ESP doesnt respond). Very weird.

Try using FireFox as browser

I tried several of those firmwares and they seem to fail when I connect them with the board. I reverted back to the MCU firmware OTGW has shared on their webshop and that works. It is not about browser at all. It doesnt seem to open the webinterface when its 24volt powered. When I only use the ESP solo with a microusb cable I can get wifi and web interface working. I think the problem is with the version of the ESP.

New version 1.0.1 available as test: OpenTherm Gateway MQTT | Homey

  • Readme extended.
  • Removed Flame on/off timeline.
  • Small text fixes.
  • Branding color updated.
  • App and device icons updated.

See this link: Versions of OTGW Ā· rvdbreemen/OTGW-firmware Wiki Ā· GitHub

It talks about older hardware versions of the OTGW board, including 24V versions. You need to set jumpers to make the new firmware work correctly:

On versions before 2.3 there are jumpers that need to be set correctly. If not, the firmware will be unable to communicate with the OTGW.

But also:
This firmware runs on an ESP8266 attached to the OTGW serial port.

I havenā€™t touched those jumpers as the board was working fine with esp-link and nodemcu firmware before. Documentation doesnā€™t touch exactly what to set or I am missing something.