# \[APP\]\[Pro\] OpenTherm GateWay MQTT

**URL:** <https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190>\
**Category:** Apps\
**Tags:** app, homey-pro\
**Created:** [March 5, 2023, 8:32pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190 "2023-03-05T20:32:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 5, 2023, 8:32pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/1 "2023-03-05T20:32:37Z")

</div>

Homey App Store (stable version):

> **[OpenTherm Gateway MQTT](https://homey.app/en-us/app/com.gruijter.otgw/OpenTherm-Gateway-MQTT/)**
>
> Central Heater management for control freaks.

Homey App Store (test version): [OpenTherm Gateway MQTT App for Homey | Homey](https://homey.app/en-us/app/com.gruijter.otgw/test)

There already was an app for OpenTherm GateWay, OTGW for short (many thanks for your work @nlrb !): [OpenTherm Gateway App for Homey | Homey](https://homey.app/en-us/app/com.tclcode.otgw/OpenTherm-Gateway/)  
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](https://homey.app/en-us/app/nl.scanno.mqttbroker/MQTT-Broker/)

 ![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/8/d81da988815d1d402323426056dc8405a68faf90.jpeg)

**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/](https://www.nodo-shop.nl/)  
The firmware used to develop the Homey app was written by [rvdbreemen (Robert van den Breemen) · GitHub](https://github.com/rvdbreemen) .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!

 ![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/e/0e90eb25d0beab838090f59001c1dd0f993d490c.jpeg)

 ![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/6/06e2c89f2910fde4038e15ee5d6f3082ed30a44b.jpeg)

**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 🤣  
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. ☮

**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](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:  
[https://gathering.tweakers.net/forum/list\_messages/2027810](https://gathering.tweakers.net/forum/list_messages/2027810)

Edit: read here how we actually used **40% LESS GAS** in the first winter! [[APP][Pro] OpenTherm GateWay MQTT - #57 by Gruijter](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/57)

**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/](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](https://homey.app/en-us/app/nl.scanno.mqttbroker/MQTT-Broker/)
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/](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 🙂

**Enjoy this Homey App!**

For support on OTGW firmware, hardware and tuning your boiler, you can get in depth on Discord: [OTGW-firmware](https://discord.com/invite/hhy5GWxyqH)

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](https://www.paypal.com/paypalme/gruijter)

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 5, 2023, 8:32pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/2 "2023-03-05T20:32:45Z")

</div>

![Screenshot_20230311_144008_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/d/1deced71cc147a3a9a7b989a2b15f3c7ba0b6676.jpeg)

 ![Screenshot_20230311_144100_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/3/e3824d92c157828827caf42a4a5c1c22b6891fe3.jpeg)

 ![Screenshot_20230311_144245_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/a/3a8dfa24c6df1d3a5cc2f6727ba0de2020646b0c.jpeg)

 ![Screenshot_20230305_213339_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/3/d3e8729b274e7012d568acb1fa36c5fb39c86d3e.jpeg)

 ![2023-03-05 (1)](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/e/4e0003f4face95d6d2180a3df71dfd2917468b9a.png)

 ![2023-03-05](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/0/20e98041474b6bd260b6e8b0f70635bdacb04be1.png)

[![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/f/af8a31600ae6b934263f679c0cb8b461aef47ad0.jpeg) ](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/f/af8a31600ae6b934263f679c0cb8b461aef47ad0.jpeg)

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [March 5, 2023, 9:20pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/3 "2023-03-05T21:20:16Z")

</div>

Is this based on the esp-link MQTT?

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 5, 2023, 9:23pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/4 "2023-03-05T21:23:15Z")

</div>

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](https://github.com/rvdbreemen)

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

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [March 5, 2023, 9:40pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/5 "2023-03-05T21:40:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 5, 2023, 9:43pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/6 "2023-03-05T21:43:53Z")

</div>

![2023-03-05 (2)](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/1/01464e16882aef7ea6c66b9a0324c5a69f179685.png)

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?

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [March 5, 2023, 9:49pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/7 "2023-03-05T21:49:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 5, 2023, 9:52pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/8 "2023-03-05T21:52:37Z")

</div>

> [@Jeroen\_Tebbens](#):
>
> connected and relevant senssors with HomeAssistant homey app

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.

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 5, 2023, 9:58pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/9 "2023-03-05T21:58:17Z")

</div>

> [@Jeroen\_Tebbens](#):
>
> check my firmware mqtt tomorrow and see what channels it dumps.

And if you feel like it install the Homey app and test if it connects with your firmware: [GitHub - gruijter/com.gruijter.otgw](https://github.com/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](https://homey.app/en-us/app/com.gruijter.otgw/)

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [March 5, 2023, 10:03pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/10 "2023-03-05T22:03:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [March 6, 2023, 9:35am UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/11 "2023-03-06T09:35:54Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/4/7479dc02b34a716c43e9fc961e70ba24bf56eedb.png)

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 6, 2023, 10:23am UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/12 "2023-03-06T10:23:34Z")

</div>

> [@Jeroen\_Tebbens](#):
>
> different firmware for that esplink

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?

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [March 6, 2023, 10:33am UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/13 "2023-03-06T10:33:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rob\_Roos](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rob_roos/32/71287_2.png) [@Rob\_Roos](https://community.homey.app/u/Rob_Roos)\
**Post date:** [March 6, 2023, 12:50pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/14 "2023-03-06T12:50:15Z")

</div>

The latest OTGW release is here : [Release #23: Fixing the plumbing and some small bugs · rvdbreemen/OTGW-firmware · GitHub](https://github.com/rvdbreemen/OTGW-firmware/releases/tag/v0.10.1)

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).

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [March 6, 2023, 1:11pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/15 "2023-03-06T13:11:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 6, 2023, 1:35pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/16 "2023-03-06T13:35:54Z")

</div>

> [@Jeroen\_Tebbens](#):
>
> web interface of the ESP doesnt respond

Try using FireFox as browser

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [March 6, 2023, 2:08pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/17 "2023-03-06T14:08:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 6, 2023, 5:12pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/18 "2023-03-06T17:12:58Z")

</div>

New version 1.0.1 available as test: [OpenTherm Gateway MQTT App voor Homey | Homey](https://homey.app/nl-nl/app/com.gruijter.otgw/test/)

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

---

<div class="post-metadata">

**Author:** ![Gruijter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gruijter/32/1973_2.png) [@Gruijter](https://community.homey.app/u/Gruijter)\
**Post date:** [March 6, 2023, 7:21pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/19 "2023-03-06T19:21:41Z")

</div>

> [@Jeroen\_Tebbens](#):
>
> fail when I connect them with the board

See this link: [Versions of OTGW · rvdbreemen/OTGW-firmware Wiki · GitHub](https://github.com/rvdbreemen/OTGW-firmware/wiki/Versions-of-OTGW)

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._

---

<div class="post-metadata">

**Author:** ![Jeroen\_Tebbens](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_tebbens/32/62246_2.png) [@Jeroen\_Tebbens](https://community.homey.app/u/Jeroen_Tebbens)\
**Post date:** [March 6, 2023, 7:40pm UTC](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190/20 "2023-03-06T19:40:34Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/3/531ede40730f1b27a9239b5fa64e8541e72a1108.jpeg)

[Next page](https://community.homey.app/t/app-pro-opentherm-gateway-mqtt/77190.md?page=2)
