# 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:** 29

<div class="post-metadata">

**Author:** ![Michel\_Helsdingen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michel_helsdingen/32/10772_2.png) [@Michel\_Helsdingen](https://community.homey.app/u/Michel_Helsdingen)\
**Post date:** [April 3, 2019, 4:30pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/568 "2019-04-03T16:30:09Z")

</div>

@HarriedeGroot great work! Really appreciated!

---

<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:** [April 3, 2019, 9:19pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/569 "2019-04-03T21:19:50Z")

</div>

Submitted to store (beta), waiting for approval:

#### Version 2.2.3

- Flowcard Triggers & Actions
- Improved performance of Homie discovery devices list

#### Version 2.2.2

- Updated app icons & images
- Fixed a small styling issue in MQTT Device capabilities list

---

<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:** [April 4, 2019, 3:00pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/570 "2019-04-04T15:00:30Z")

</div>

**Version 2.2.3** is available on the beta channel now.

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [April 4, 2019, 5:32pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/571 "2019-04-04T17:32:19Z")

</div>

beta 2.2.3 - Managed to add individual MQTT devices but I can’t get the discovery to work.

First time it did keep adding blank lines about 1 every 5 secs, under what I think will become a device list but it never completed and after 10 mins I backed out. I have around 30 discoverable devices from my other Homey under a different device tree.

Next and subsequent times it wouldn’t do anything - just a spinning circle. I don’t think it was accessing the MQTT broker to read anything from the homie topic.

K

---

<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:** [April 4, 2019, 5:37pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/572 "2019-04-04T17:37:15Z")

</div>

@xAPPO did you try pressing ‘broadcast’ on the other Homey?

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [April 4, 2019, 5:39pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/573 "2019-04-04T17:39:35Z")

</div>

No I hadn’t actually - they are retained topics … but of course there would have been a session in place so the info might not arrive when needed. I did try restarting the Hub app. I’ll give ‘broadcast’ a go from the other Homey.

---

<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:** [April 4, 2019, 5:41pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/574 "2019-04-04T17:41:25Z")

</div>

I know the messages are retained on the broker. But the MQTT Client doesn’t return the retained messages when (re)subscribing to a topic. That’s something I need to have a chat about with @scanno.

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [April 4, 2019, 5:42pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/575 "2019-04-04T17:42:52Z")

</div>

Yep - understand - it might need the whole connection taking down and re-establishing. I see if your broadcast suggestion works.

Update: Yes that works - it takes a little while to populate but it gets there.

Could a re-trigger broadcast somehow be setup in a similar way as to the homeassistant LWT - as a workaround ? It would have to somehow work with different device trees (hubs) within the homie topic hierarchy - a way to force an individual one to resend…

---

<div class="post-metadata">

**Author:** ![scanno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/scanno/32/8358_2.png) [@scanno](https://community.homey.app/u/scanno)\
**Post date:** [April 4, 2019, 6:05pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/576 "2019-04-04T18:05:45Z")

</div>

Retained messages should be working on the client. Or they are not passed through the App2app interface?

---

<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:** [April 4, 2019, 6:14pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/577 "2019-04-04T18:14:48Z")

</div>

@scanno Probably not when re-subscribing to the same topic?

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [April 4, 2019, 6:23pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/578 "2019-04-04T18:23:22Z")

</div>

@HarriedeGroot - how does the Hub decide it has retrieved all the topics from a Homie branch when discovering, is it timeout based ? Sometimes that phase seems to end but I only have about 5 devices returned when there are a lot more. I suspect this maybe the delay in the other Hub repopulating.

(Just for completeness I’m not clicking ‘broadcast’ but having to restart the other hub as it’s on 1.5.13)

K

---

<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:** [April 4, 2019, 6:26pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/579 "2019-04-04T18:26:29Z")

</div>

it uses the /$nodes to get the available nodes (homey devices). Loading stops when all nodes are discovered.

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [April 4, 2019, 6:28pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/580 "2019-04-04T18:28:39Z")

</div>

Well that’s very sensible… need to investigate further…

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [April 6, 2019, 9:32pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/581 "2019-04-06T21:32:13Z")

</div>

> [@HarriedeGroot](#):
>
> **Version 2.2.3** is available on the beta channel now

Awesome stuff. Ran into something though. I just tried to add a MQTT device but I can only seem to find a Turned On capability but not a Turned Off capability. Am I missing something?

---

<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:** [April 6, 2019, 9:32pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/582 "2019-04-06T21:32:53Z")

</div>

Submitted to store (beta channel; waiting for approval)

#### Version 2.2.4

- Manage topics after the device is installed (device `advanced settings` menu)
- Added `percentage scaling` device setting
- Fixed a bug in the device manager when adding or removing Homey devices
- Increased max log lines to 1000 for debug level

NOTE: Managing topics afterwards will only work for newly added devices.

---

<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:** [April 6, 2019, 9:34pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/583 "2019-04-06T21:34:22Z")

</div>

@Phuturist `Turned on` is also the `turned off` capability.  
You need to provide a payload **false** to turn off the device.

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [April 6, 2019, 9:38pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/584 "2019-04-06T21:38:40Z")

</div>

> [@HarriedeGroot](#):
>
> `Turned on` is also the `turned off` capability.  
> You need to provide a payload **false** to turn off the device.

Roger that, quite obvious. It’s time to go to bed.

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [April 6, 2019, 9:48pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/585 "2019-04-06T21:48:03Z")

</div>

> [@HarriedeGroot](#):
>
> `Turned on` is also the `turned off` capability.  
> You need to provide a payload **false** to turn off the device.

My device actually has a ‘on’ and ‘off’ payload instead of true or false for its onoff capability. Any way to deal with this?

---

<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:** [April 6, 2019, 9:50pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/586 "2019-04-06T21:50:53Z")

</div>

@Phuturist ‘on’ is also recognized as true 🙂  
All these payloads (case insensitive) will turn ON the device: true | ‘true’ | 1 | ‘1’ | ‘on’ | ‘yes’  
All others turn OFF.

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [April 6, 2019, 9:55pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/587 "2019-04-06T21:55:21Z")

</div>

> [@HarriedeGroot](#):
>
> All these payloads will turn ON the device: true | ‘true’ | 1 | ‘1’ | ‘on’ | ‘yes’  
> All others turn OFF.

After adding the device and switching the device within the Homey app it sets the topic with true or false. The actual device does not respond to that as it’s expecting a ‘on’ or ‘off’ paypload.

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

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