# MQTT Hub/Gateway

**URL:** <https://community.homey.app/t/mqtt-hub-gateway/6766>\
**Category:** Apps\
**Created:** [January 14, 2019, 6:59pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766 "2019-01-14T18:59:50Z")\
**Posts on this page:** 20\
**Page:** 53

<div class="post-metadata">

**Author:** ![RonnyW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronnyw/32/10879_2.png) [@RonnyW](https://community.homey.app/u/RonnyW)\
**Post date:** [August 13, 2021, 12:50pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1051 "2021-08-13T12:50:28Z")

</div>

Hello @HarriedeGroot  
I’m struggeling with a string capability with more than 255 characters. The export to HomeAssistant fails because entities areonly allowed with a max size of 255 chars.  
My main question is: Is the MQTT Hub designed for HomeAssistant as main receiver (HA discovery)? Or is the discovery only an addition and the export for /homie/HomeyID/… is generic?

I’m wondering if it would make sense to truncate the strings in the Hub. Perhaps activated in the app settings?  
Or is it better to truncate in the app where the capability is set?

Do you have a proposal what could be a good way to solve this problem?  
Many Thanks.

---

<div class="post-metadata">

**Author:** ![Klim](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/klim/32/26121_2.png) [@Klim](https://community.homey.app/u/Klim)\
**Post date:** [August 16, 2021, 3:31am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1052 "2021-08-16T03:31:57Z")

</div>

please help  
i added capability thermostat\_mode  
my thermostat have two status: “idle” or “heating” in mqtt  
if i add it to “stateTopic”: it’s not recognize it.  
how to convert:  
if status is “idle” set thermostat\_mode to “off”  
if status is “heating” set thermostat\_mode to “heat”

looks like i need to use valueTemplate, but i know nothing how to use it.

---

<div class="post-metadata">

**Author:** ![RemcoVerhagen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/remcoverhagen/32/45158_2.png) [@RemcoVerhagen](https://community.homey.app/u/RemcoVerhagen)\
**Post date:** [September 25, 2021, 8:40am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1053 "2021-09-25T08:40:55Z")

</div>

any chance this app comes to homey Bridge?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 25, 2021, 8:46am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1054 "2021-09-25T08:46:52Z")

</div>

No.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/1/6137a22f0f6088a2d3ef9de2e75612baf6e1e885.png)

---

<div class="post-metadata">

**Author:** ![HarriedeGroot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/harriedegroot/32/56160_2.png) [@HarriedeGroot](https://community.homey.app/u/HarriedeGroot)\
**Post date:** [September 25, 2021, 8:59am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1055 "2021-09-25T08:59:56Z")

</div>

Indeed, already asked on Slack. Athom won’t allow it.

---

<div class="post-metadata">

**Author:** ![RemcoVerhagen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/remcoverhagen/32/45158_2.png) [@RemcoVerhagen](https://community.homey.app/u/RemcoVerhagen)\
**Post date:** [September 28, 2021, 7:00pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1056 "2021-09-28T19:00:02Z")

</div>

pro audience has to buy 400 dollar homey pro  
IMHO a missed chance

if the bridge is capable off doing it  
why not allowing it

---

<div class="post-metadata">

**Author:** ![Willem\_Jan\_Bakker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willem_jan_bakker/32/8153_2.png) [@Willem\_Jan\_Bakker](https://community.homey.app/u/Willem_Jan_Bakker)\
**Post date:** [October 3, 2021, 4:27pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1057 "2021-10-03T16:27:59Z")

</div>

Would it be possible to connect Smappee with Homey wit this app?

> **[Smappee\_API\_and\_MQTT\_paper\_\_1\_.pdf](https://support.smappee.com/hc/article_attachments/4401908320916/Smappee_API_and_MQTT_paper__1_.pdf)**
>
> 732.86 KB

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 3, 2021, 8:22pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1058 "2021-10-03T20:22:37Z")

</div>

From what I’ve read:  
According to the PDF, it can connect with the MQTT Broker app and send msgs on topics to Homey Pro.

 ![Screenshot_20211003-220747_Word](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/c/4c8e82e23cbdba1b5a64e129bf5561b3ecb03566.jpeg)  
And f.i. by using the MQTT client app, you can trigger flows by matching topic msgs received, or send msgs in topics.

---

<div class="post-metadata">

**Author:** ![HarriedeGroot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/harriedegroot/32/56160_2.png) [@HarriedeGroot](https://community.homey.app/u/HarriedeGroot)\
**Post date:** [October 3, 2021, 8:44pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1059 "2021-10-03T20:44:38Z")

</div>

Or use MQTT devices with MQTT topics linked to Homey device capabilities.

---

<div class="post-metadata">

**Author:** ![Willem\_Jan\_Bakker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willem_jan_bakker/32/8153_2.png) [@Willem\_Jan\_Bakker](https://community.homey.app/u/Willem_Jan_Bakker)\
**Post date:** [October 4, 2021, 12:01pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1060 "2021-10-04T12:01:30Z")

</div>

I have no idea what to do…🙈  
I just want to have the Smappee info in Homey, can someone give me an “manual” how to set this up?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [October 4, 2021, 8:33pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1061 "2021-10-04T20:33:48Z")

</div>

These are how-to’s to connect with other apps, it’s the same principle. Maybe you can work things out from here 😉

> [@\[TUTORIAL\] Setting up MQTT on Homey for configuring Home Assistant for dashboard purposes](https://community.homey.app/t/tutorial-setting-up-mqtt-on-homey-for-configuring-home-assistant-for-dashboard-purposes/10880):
>
> Hi, i would like to share instructions of how to setup MQTT on Homey to make your devices visible in Home Assistant with a Synology NAS. Thanks a lot to @HarriedeGroot for creating the MQTT Hub, @scanno for the MQTT Client (and Broker, which unfortunately will not be included in this tutorial since my setup is on a Synology NAS with Mosquitto as a broker) and @Gustav_Tillback for initially sharing the first steps in creating this setup which will be explained in further detail below DISCLAIMER\*…

> [@\[TUTORIAL\] Setting up MQTT on Homey for configuring Home Assistant for dashboard purposes](https://community.homey.app/t/topic/10880/20):
>
> Sounds like the hub/client is not correctly subscribed. Did you try restarting the MQTT Client & hub apps (via app details; see below)? Did you try rebooting Homey (keep unplugged for \>30 sec.)? Messages travel: HA \> broker \> client \> hub \> Homey. So if rebooting stuff does not resolve the issue, you need to start debugging where the messages stranded. Broker: Try MQTT Explorer. Do you see incoming messages from HA when you e.g. switch a light. MQTT Client: try the log in the app settings.…

> [@Lokatie & Aanwezigheid - Owntracks Installatie Instructie](https://community.homey.app/t/topic/30774/1):
>
> EDIT 11 januari 2021 Onderstaande verhandeling wordt door mij niet meer toegepast, het is mij gebleken dat deze methode uiteindelijk geen 100% waterdichte oplossing is gebleken. “bestaat deze überhaupt wel, heren van Athom?”. Ik heb een switch gemaakt naar de “Connect Life360-app”. Deze draait nu sinds een maand en naar het blijkt een meer betrouwbare oplossing voor ‘locatie en aanwezigheid’. Ook heeft het gebruik van deze app enkele beperkingen, belangrijker in mijn geval is de betrouwbaarheid…

---

<div class="post-metadata">

**Author:** ![Willem\_Jan\_Bakker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willem_jan_bakker/32/8153_2.png) [@Willem\_Jan\_Bakker](https://community.homey.app/u/Willem_Jan_Bakker)\
**Post date:** [October 8, 2021, 8:40am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1062 "2021-10-08T08:40:58Z")

</div>

Sorry, don’t understand any of it… 🙈

An app for it would be nice…🤣😂

> **[core/homeassistant/components/smappee at dev · home-assistant/core](https://github.com/home-assistant/core/tree/dev/homeassistant/components/smappee)**
>
> dev/homeassistant/components/smappee

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [October 11, 2021, 2:51pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1063 "2021-10-11T14:51:01Z")

</div>

Can someone please give me a hint - I’m able to get via MQTT Device (of MQTT Hub) successfully standard types of attributes for existing devices and somehow simulate what is not a standard device (eg. “sensor” having two temperatures, car being a device, with Motion false/true, Locked via General alarm etc.) - but how to achieve eg. if I would like to have a device, which is showing in TEXT for example mode of operations (eg. standby, heating, cooling etc. - it’s pellet stove). I don’t want to simulate Thermostat. Is the only way how to achieve it via variables and “Trigger when a message is received on” ?

And second question, when using this topics, labels got ignored…is it bug or feature ?

```auto
{
  "measure_temperature": {
    "capability": "measure_temperature",
    "stateTopic": "haassohn/0/device/istemp",
    "commandTopic": "",
    "valueTemplate": "",
    "outputTemplate": "",
    "displayName": "Current temperature"
  },
  "measure_temperature.1": {
    "capability": "measure_temperature",
    "stateTopic": "haassohn/0/device/sptemp",
    "commandTopic": "",
    "valueTemplate": "",
    "outputTemplate": "",
    "displayName": "Target temperature"
  },
  "onoff": {
    "capability": "onoff",
    "stateTopic": "haassohn/0/device/prg",
    "commandTopic": "haassohn/0/device/prg",
    "valueTemplate": "",
    "outputTemplate": "",
    "displayName": "Is oven on ?"
  }
}

```

![obrazek](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/5/35a7ee7158c6cbdf14d77509904e25f00eb948b0.png)

Thank you.

Kudos for this wonderful app, excellent stuff.

---

<div class="post-metadata">

**Author:** ![Sharkys](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sharkys/32/54029_2.png) [@Sharkys](https://community.homey.app/u/Sharkys)\
**Post date:** [November 8, 2021, 10:15am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1064 "2021-11-08T10:15:57Z")

</div>

I really wonder, such great app and nobody is able to comment ? ☹

Btw, would anyone have some examples on how to use value template, eg. for Vacuum claner states (vacuumcleaner\_state) - seems I’m getting numbers while Homey expects cleaning/docked etc.

---

<div class="post-metadata">

**Author:** ![owuerker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/owuerker/32/39707_2.png) [@owuerker](https://community.homey.app/u/owuerker)\
**Post date:** [November 8, 2021, 6:44pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1065 "2021-11-08T18:44:00Z")

</div>

Hi Sharkys,

regarding your second questions I experienced the same if I have modified the code in the advanced setting (Advanced Topics) after I created the MQTT Device.  
So try to create it with the right syntax, capabilities etc… and don´t touch the topic code. Having that in mind I was able to use have the labels shown in device.

---

<div class="post-metadata">

**Author:** ![owuerker](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/owuerker/32/39707_2.png) [@owuerker](https://community.homey.app/u/owuerker)\
**Post date:** [November 8, 2021, 6:50pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1066 "2021-11-08T18:50:06Z")

</div>

I have another issue.  
I want to trigger a flow when a capability of a MqTT device is smaller than a give number  
e.g. If a sensor humidity is less than 15 % than… (humidity is shown in the MQTT Device and available in flows) but the flow is never triggered

 ![Bildschirmfoto 2021-11-08 um 20.08.45](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/9/c951c6bc4c2ebaa6af04589b9651b73b26352df4.jpeg)

 ![Bildschirmfoto 2021-11-08 um 20.09.08](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/3/e395fa9ff0cc2cfebd04e0ad8562eb272fc31f45.jpeg)

Anybody have an idea what I have to change?  
Thanks

---

<div class="post-metadata">

**Author:** ![Zimo](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/zimo/32/16621_2.png) [@Zimo](https://community.homey.app/u/Zimo)\
**Post date:** [November 8, 2021, 7:48pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1067 "2021-11-08T19:48:28Z")

</div>

I’d try when ability changed and variable is then 15…

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/b/3b3472383db313f6a343f47abdfea7a2a4aa8495.png)  
in this picture I wanted to work with string messages, so I used track ability.

---

<div class="post-metadata">

**Author:** ![Joost\_van\_Kempen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/joost_van_kempen/32/10067_2.png) [@Joost\_van\_Kempen](https://community.homey.app/u/Joost_van_Kempen)\
**Post date:** [December 13, 2021, 9:26pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1068 "2021-12-13T21:26:03Z")

</div>

Feature request: as of Home Assistant 2021.12 they finally introduced the button entity. That means HA can now make a distinction between switches (on/off) and buttons (click). Until now, Homey virtual buttons that are broadcasted with MQTT are discovered as switches by HA. Is it possible to broadcast Homey switches as switches to HA and buttons as buttons?

---

<div class="post-metadata">

**Author:** ![avd88](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/avd88/32/17548_2.png) [@avd88](https://community.homey.app/u/avd88)\
**Post date:** [December 21, 2021, 12:51pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1069 "2021-12-21T12:51:33Z")

</div>

I’m using mqtt to feed my grafana dashboard from multiple devices. I also want to add a couple of homey devices via mqtt. I’ve installed the mqtt app and I’m using mosquitto as external broker. If I read the instruction I see:

“use the MQTT broker app from Homey the app sotre or configure an external broker”. I’m missing a probably quite obvious part, where do I set the external broker address in the app? Apparently I’m completely missing it.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [December 21, 2021, 5:07pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1070 "2021-12-21T17:07:14Z")

</div>

in the MQTT client

> [@Two homey in the same house?](https://community.homey.app/t/two-homey-in-the-same-house/54221/10):
>
> You need 3 apps. MQTT Broker (Server) - install on one homey MQTT Client - install on both homeys MQTT Hub - install on both homeys Config Broker: Config Clients: Config Hub: Instructions:

[Previous page](https://community.homey.app/t/mqtt-hub-gateway/6766.md?page=52)

[Next page](https://community.homey.app/t/mqtt-hub-gateway/6766.md?page=54)
