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

<div class="post-metadata">

**Author:** ![Remi\_J](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/remi_j/32/12753_2.png) [@Remi\_J](https://community.homey.app/u/Remi_J)\
**Post date:** [March 31, 2021, 8:30am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/870 "2021-03-31T08:30:58Z")

</div>

Thanks @HarriedeGroot . It seems to work now (I had not checked for a few days and now running 3.1.9).

I still have some weird “Error publishing message” log messages but the data seem to be transmitted to my mqtt broker.

I don’t know if it is new, but I found that, when adding a new device, broadcast does not send the current value of the data items. It is only updated the first time the data changes and it can take a long time (for a plug for example, if you never switch it on/off, you don’t know the state)

---

<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:** [March 31, 2021, 8:36am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/871 "2021-03-31T08:36:34Z")

</div>

@Remi_J the ‘error publishing message’ should be solved in the test version of the MQTT Client (v2.4.2).

---

<div class="post-metadata">

**Author:** ![Remi\_J](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/remi_j/32/12753_2.png) [@Remi\_J](https://community.homey.app/u/Remi_J)\
**Post date:** [March 31, 2021, 8:38am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/872 "2021-03-31T08:38:59Z")

</div>

@HarriedeGroot , MQTT Client V2.4.2 does not seem to update automaticaly like the other apps How can I try it ?

---

<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:** [March 31, 2021, 8:57am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/873 "2021-03-31T08:57:48Z")

</div>

@Remi_J MQTT Client test url: [MQTT Client App voor Homey | Homey](https://homey.app/nl-nl/app/nl.scanno.mqtt/MQTT-Client/test/)

---

<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:** [March 31, 2021, 8:59am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/874 "2021-03-31T08:59:52Z")

</div>

@Remi_J Don’t forget to update your app review 😉

---

<div class="post-metadata">

**Author:** ![Remi\_J](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/remi_j/32/12753_2.png) [@Remi\_J](https://community.homey.app/u/Remi_J)\
**Post date:** [March 31, 2021, 9:27am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/875 "2021-03-31T09:27:03Z")

</div>

@HarriedeGroot :: Done 🙂

---

<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:** [March 31, 2021, 10:13am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/876 "2021-03-31T10:13:37Z")

</div>

> [@HarriedeGroot](#):
>
> **Version 3.1.7**
> 
> - Skip messages not meant for the HUB

Might this have any impact on homie discovery into Homey - or indeed HA MQTT Discovery into Homey ?

I haven’t actually tried homie into Homey but will do soon as my Hubitat MQTT app publishes using that format. The homie spec is a little vague in describing device $types.

Kevin

---

<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:** [March 31, 2021, 12:29pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/877 "2021-03-31T12:29:19Z")

</div>

@xAPPO No this should’t influence any of the named processes. It’s changed at the level of detecting /set messages on homie device 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:** [April 2, 2021, 3:37pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/878 "2021-04-02T15:37:51Z")

</div>

@scanno When do you expect to release v2.4.2 of the MQTT Client app (current test version)?

> **[MQTT Client](https://homey.app/nl-nl/app/nl.scanno.mqtt/MQTT-Client/)**
>
> Abonneer op MQTT topics

I get many complaints about the ‘Error publishing message’ issue, which is solved in the latest version of the client:

- [Get error messages but it works correct · Issue #53 · harriedegroot/nl.hdg.mqtt · GitHub](https://github.com/harriedegroot/nl.hdg.mqtt/issues/53)
- [GitHub · Where software is built](https://github.com/harriedegroot/nl.hdg.mqtt/issues/52)
- [GitHub · Where software is built](https://github.com/harriedegroot/nl.hdg.mqtt/issues/49)
- etc…

---

<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 2, 2021, 4:39pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/879 "2021-04-02T16:39:52Z")

</div>

Ah forgot about that. Bit busy 😅

Submitted for approval.

---

<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 2, 2021, 4:43pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/880 "2021-04-02T16:43:39Z")

</div>

Hehe… yeah people tend to down vote when there is a problem and never change the review.

Very motivating to improve your apps.

---

<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 2, 2021, 4:48pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/881 "2021-04-02T16:48:27Z")

</div>

@scanno thanks!

---

<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 2, 2021, 5:03pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/882 "2021-04-02T17:03:18Z")

</div>

That was fast… already live

---

<div class="post-metadata">

**Author:** ![Pieterv123](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pieterv123/32/13353_2.png) [@Pieterv123](https://community.homey.app/u/Pieterv123)\
**Post date:** [April 10, 2021, 5:38pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/883 "2021-04-10T17:38:49Z")

</div>

I’ve sent you a diagnostics report.  
When enabling mqtt hub after a while my homey crashes or better any app trying to get devices can’t anymore. (Homeykit, Heimdall,…)

I am on v6 rc4 ( my fault ☹ )  
Could also be a homey thing

---

<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 10, 2021, 6:01pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/884 "2021-04-10T18:01:41Z")

</div>

@Pieterv123 Most likely the Homey v6 RC4 indeed. Saw some simular reports on Slack.

---

<div class="post-metadata">

**Author:** ![Pieterv123](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pieterv123/32/13353_2.png) [@Pieterv123](https://community.homey.app/u/Pieterv123)\
**Post date:** [April 10, 2021, 6:19pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/885 "2021-04-10T18:19:24Z")

</div>

Yeah that was my report.

I will monitor it, keeping mqtt hub disabled fixes the issue for now

---

<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 20, 2021, 9:26pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/886 "2021-04-20T21:26:45Z")

</div>

Pushed a new version of the MQTT Hub to the [test channel](https://homey.app/a/nl.hdg.mqtt/test/).

**Version 3.2.0**

- Unsubscribe from topics to free unused resources
- Homie Discovery: skip unknown devices

[https://homey.app/a/nl.hdg.mqtt/test/](https://homey.app/a/nl.hdg.mqtt/test/)

**NOTE** : The [test version](https://homey.app/nl-nl/app/nl.scanno.mqtt/MQTT-Client/test/) of the **MQTT Client** is needed for the `unsubscription api`:

> **[MQTT Client](https://homey.app/nl-nl/app/nl.scanno.mqtt/MQTT-Client/)**
>
> Abonneer op MQTT topics

For changes of the MQTT Client, see:

> <https://github.com/scanno/nl.scanno.mqtt/pull/28>
>
> 1. \*\*Made some improvements to the topic registrations (api vs trigger)\*\*
> 2. \*\*…Fixed handling of retained messages\*\*
> 3. \*\*Prevent losing api connections\*\*
> 4. \*\*Addressed the bug of randomly disabled flows\*\*
> 5. \*\*Added unsubscribe api\*\*
> 6. \*\*Introduced a TriggerQueue to handle the rate limiting of flow card triggers and prevent disabling of flows\*\*
> 7. \*\*Added broker online/offline flow card triggers\*\*
> 8. \*\*Added flow card action to send an empty message to be able to remove retained messages from the broker\*\*
> 9. \*\*Introduced TopicsRegistry to register topics by reference (e.g. app id), this reference can be used with the unsubscribe api\*\*
> 10. \*\*Performance improvements\*\*
> 11. \*\*General bug fixes\*\*
> 
> \*\*Commit 1\*\*
> Topic registration:
> \- always subscribe to the broker to return retained messages on subscription
> \- re-subscribe to all previously registered topics on connection of the broker/mqtt-client (keep topic registry alive)
> \- made some calls async and actually wait for the result before continuing + fixed some async handling of promises
> \- extended the TopicArray with seperate methods for api & trigger topics
> 
> \*\*Commit 2\*\*
> \- prevent topic unsubscription if its used by another registration (api vs trigger)
> 
> \*\*Commit 3\*\*
> Flow card triggers:
> \- prevent destruction of the full topics array, causing all api connections being lost
> \- subscribe to all flow card trigger topics on initialisation
> \- on trigger card change (flow card config): unsubscribe from removed topics & subscribe to newly added topics
> \- await the Homey trigger call
> \- check for api topic match before forwarding the message to the realtime api
> 
> \*\*Commit 4\*\*
> pre-check to prevent uneccesairy calls to the Homey trigger system
> prevents disabling of random flows not even listening to these topics (Homey BUG?)...
> this is also a performance boost, since the Homey trigger system won't be called for all api topics
> the small downside is the duplicate topic matching, if there is a match on a trigger topic
> 
> \*\*Commit 5\*\*
> (added missing file 'Trigger.js' for commit 3
> 
> \*\*Commit 6\*\*
> On change of app settings:
> \- prevent destruction of the full topicsArray resulting in lost api connections
> \- re-connect to the broker to trigger subscription of all registered topics (instead of the trigger topics only)
> \- await topic unsubscription before setting up the new client
> 
> \*\*Commit 7\*\*
> added unsubscribe api
> 
> \*\*Commit 8\*\*
> Introduced a TriggerQueue to handle the rate limiting of flow card triggers and prevent disabling of flows
> 
> \*\*Commit 9\*\*
> Added broker online/offline flow card triggers
> 
> \*\*Commit 10\*\*
> Added flow card action to send an empty message to be able to remove retained messages from the broker
> 
> \*\*Commit 11\*\*
> Introduced a TopicsRegistry to register topics by reference (e.g. app id). The unsubscribe api can only be called for topics with the reference provided during topic subscription. This prevents unsubscription of topics used by other apps/processes.
> Also optimized the topic matching by using a topic map (instead of array lookup).
> 
> \*\*Commit 12\*\*
> \- Remove messages from the trigger queue when a topic is unsubscribed
> \- Added failsafe for the TriggerQueue size. Allow homey to disable the flow (by rate limiting) if the number of messages in the trigger queue exceeds the max allowed number of messages.
> \- Correctly handle topic subscriptions after flow card triger changes.
> \- updated the README with examples of usage of the reference and unsubscribing of topics
> 
> \*\*Commit 13\*\*
> \- merged api changes from commit: https://github.com/scanno/nl.scanno.mqtt/commit/02c3f0f816dd70475ebe2d848cd5012fb5034f2b
> \- added response to unsubscribe api
> \- version bump to 3.x

---

<div class="post-metadata">

**Author:** ![Robert\_Zwetsloot](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robert_zwetsloot/32/12399_2.png) [@Robert\_Zwetsloot](https://community.homey.app/u/Robert_Zwetsloot)\
**Post date:** [April 21, 2021, 10:03pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/887 "2021-04-21T22:03:42Z")

</div>

After the update the topics were published without any properties. Couldn’t get the setup up working by restarting the individual MQTT apps. Homey reboot (V6.0) made it all running again. No any deviations in the log files.  
Thanks again for all your commitment and effort!

---

<div class="post-metadata">

**Author:** ![Henk\_Renting](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/henk_renting/32/87634_2.png) [@Henk\_Renting](https://community.homey.app/u/Henk_Renting)\
**Post date:** [April 21, 2021, 10:46pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/888 "2021-04-21T22:46:39Z")

</div>

Since the latest updates MQTT works great here,  
Thx developers! 👍🏻😃

Has anyone made some progress regarding the color temperature of Ikea tunable bulbs?  
Same problem here: on/off and dimming work great and a color temperature slider is shown. But when color temperature is changed in HA, nothing happens in Homey and when changed from Homey, the HA entity doesn’t get updated too… 😕

---

<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 26, 2021, 10:42am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/889 "2021-04-26T10:42:16Z")

</div>

MQTT Client v3.0.0 & MQTT Hub v3.2.0 are both published to live.

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

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