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

<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:** [May 28, 2020, 8:24am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/750 "2020-05-28T08:24:41Z")

</div>

Did you try restarting the mqtt client and Hub apps in this order?

---

<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:** [May 28, 2020, 8:46am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/751 "2020-05-28T08:46:19Z")

</div>

I do it every night - but it seems like those restarts causes this behavior - because during day a manage (by turning off and on each device) to make it report every device…  
(forgot to mention - I’m talking about homie convention reporting, didn’t checked that for HA as I do not use that)

---

<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:** [May 28, 2020, 8:51am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/752 "2020-05-28T08:51:12Z")

</div>

one more thing - after 4.2 update - restart of HUB causes my Homey-Pro to stop responding for several minutes (it never happened before 4.2)

---

<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:** [May 31, 2020, 12:06pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/753 "2020-05-31T12:06:07Z")

</div>

I did some testing - definitely HUB is causing restarts of whole Homie.

1. if I perform restart of client and then hub app - restart of hub causes restart of whole device
2. sometimes it causes boot loop (after restart I have few secs till it starts and reboots device - if I disable App, device boot’s up correctly)
3. I’m talking about clean HUB install, no additional config changed done.

Is there a way to turn on debug logs, so I can see what’s causing 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:** [May 31, 2020, 12:39pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/754 "2020-05-31T12:39:57Z")

</div>

@Zimo Probably you’ve got some devices spamming your network with frequent device state updates. Try spotting them with mqtt explorer and disable them or change the device settings. E.g. I personally had an Aeotec energy meter causing some trouble, changing the device update frequency fixed it for me.

The startup process (broadcast) is known to be a heavy process, especially when you’ve got many devices connected. The state of every capability of every device needs to be published.

Debug logs can be found in the apps settings ‘log’ tab.

---

<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:** [June 1, 2020, 1:31pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/755 "2020-06-01T13:31:43Z")

</div>

Looks like I found the issue. I had message loop via flows which caused flood of messages. Unfortunately didn’t knew that that might cause restart of whole device (looks like there is some non-managed stack in Athom build).

Anyway - thanks very much for your help. This MQTT hub is something which is moving whole homey one dimension up (without it homey will not be worth the price)…

---

<div class="post-metadata">

**Author:** ![johannes1702](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@johannes1702](https://community.homey.app/u/johannes1702)\
**Post date:** [July 30, 2020, 6:56pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/756 "2020-07-30T18:56:10Z")

</div>

Hi Magnus\_P,

Sorry for warming this up. I’m trying exactly the same for you, using Mosquitto on a separate RaspberryPi. However messages do not seem to get flagged as Retained, so I cannot see anything in NodeRed. Any idea? 🙂  
Johannes

---

<div class="post-metadata">

**Author:** ![Magnus\_P](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/magnus_p/32/4344_2.png) [@Magnus\_P](https://community.homey.app/u/Magnus_P)\
**Post date:** [July 30, 2020, 9:47pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/757 "2020-07-30T21:47:29Z")

</div>

@Johannes1702 - As mentioned I restart the app (MQTT hub) every night to refress the Status by disable/enable the app, I do not have any better solution…

---

<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:** [July 31, 2020, 12:25am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/758 "2020-07-31T00:25:51Z")

</div>

I think the beta version now posts messages as retained

---

<div class="post-metadata">

**Author:** ![Merpster](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/merpster/32/27588_2.png) [@Merpster](https://community.homey.app/u/Merpster)\
**Post date:** [September 6, 2020, 7:41pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/759 "2020-09-06T19:41:31Z")

</div>

Hi All,

I’m running MQTT Hub and MQTT client on a Homey Pro and MQTT Broker on a Raspberry Pi4 to serve a Node Red Dashboard.

Recently I have experienced some strange behavior.

Every day between 16:30 and 17:00 my whole network starts becoming non-responsive and eventually I get a message “De MQTT broker is ONBESCHIKBAAR” in Homey notifications.

In max 1 minute (sometimes even within seconds) it restores itself again and I get the message “De MQTT broker is weer BESCHIKBAAR”

Funny enough two of my switched lights always turn on after this event.  
Somehow the state is set to ‘true’ by this event (I concluded from looking in MQTT Explorer)

All the other lights remain off as they should be.

Any suggestions on what may cause these two light to be switched on?

---

<div class="post-metadata">

**Author:** ![PascalB](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@PascalB](https://community.homey.app/u/PascalB)\
**Post date:** [September 6, 2020, 7:49pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/760 "2020-09-06T19:49:09Z")

</div>

You probably have retained messages:

[![](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/7/47969f4d5aa94e2d40457bfe587f28cf84a70b8b.jpeg "Fix Random Switching in Tasmota by Adjusting Retain Settings") ](https://www.youtube.com/watch?v=31IyfM1gygo)

---

<div class="post-metadata">

**Author:** ![Merpster](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/merpster/32/27588_2.png) [@Merpster](https://community.homey.app/u/Merpster)\
**Post date:** [September 7, 2020, 7:52pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/761 "2020-09-07T19:52:36Z")

</div>

Thanks.  
I watched the video, but… aren’t ALL topics in the Homey MQTT Hub / Broker setup retained?  
If I look in MQTT explorer I see the yellow ‘Retained’ message box at every topic.  
So having retained messages everywhere should actualy avoid this issue and not cause it as far as I understand. 🤓

---

<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:** [September 8, 2020, 1:21am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/762 "2020-09-08T01:21:21Z")

</div>

Command topics …/set should not be sent retained.

---

<div class="post-metadata">

**Author:** ![Merpster](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/merpster/32/27588_2.png) [@Merpster](https://community.homey.app/u/Merpster)\
**Post date:** [September 13, 2020, 4:35pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/763 "2020-09-13T16:35:21Z")

</div>

Yes, that seems indeed logical (since the device that will turn on or off will send an update message on its status which message should be retained again, right?).

But how can you tell whether these ‘set’ messages are being retained (or not)?

In MQTT explorer I see the **set = “false”** entry appear if I use the set command for the first time on the topic for the lamp that turns on after a disconnect.

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

What I find remarkable is that the entry really appears if I use the set command for the first time and that it doesn’t have a $ in front of it.

Would that indicate that it is not a topic and therefore also cannot be retained?

---

<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:** [September 13, 2020, 9:21pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/764 "2020-09-13T21:21:59Z")

</div>

If you quit MQTT Explorer and restart it - if there is a payload value showing in the topic then it is retained.

The ‘retained’ icon shows in Explorer if the current value was read from ‘retained’ (at connection). If a value is later updated ‘retained’ then does not display (even if the payload has been sent with a retained flag)

---

<div class="post-metadata">

**Author:** ![tmaniac](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/tmaniac/32/338_2.png) [@tmaniac](https://community.homey.app/u/tmaniac)\
**Post date:** [September 18, 2020, 12:19pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/765 "2020-09-18T12:19:49Z")

</div>

hey guys, still facing some irregularities quite often. (Using v2.2.5)  
Slowly building a node-red dashboard and switches don’t always correspond to the status of the lights.

Can i place a request to the developer to allow changing some homie-convention parameters within the MQTT Hub app?  
For example the QoS / Retain settings.  
(pretty please 🙂 )

I’m not talking about a default setting for everyone but just a little bit more customizable options to the homie-convention settings.  
I’m using a separate MQTT server so for example resources on the broker side are not an issue to me.

---

<div class="post-metadata">

**Author:** ![Marian](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marian/32/11090_2.png) [@Marian](https://community.homey.app/u/Marian)\
**Post date:** [September 23, 2020, 12:51pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/766 "2020-09-23T12:51:34Z")

</div>

I see the Fibaro Button in the list of devices in the MQTT Hub,  
but the device is neither broadcasted nor the events are not published to the queue…  
How should I understand such behaviour?

---

<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 23, 2020, 5:40pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/767 "2020-09-23T17:40:24Z")

</div>

@Marian what capabilities are listed in the [developer portal](https://developer.athom.com/tools/devices) for this device? The hub provides the ability to expose & control device capabilities over mqtt.

---

<div class="post-metadata">

**Author:** ![Marian](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marian/32/11090_2.png) [@Marian](https://community.homey.app/u/Marian)\
**Post date:** [September 23, 2020, 6:45pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/768 "2020-09-23T18:45:44Z")

</div>

Hmm, None ☹ That’s bad…  
The push button should by my opinion have the capability to send the information if it was pressed. In the Homey Flow definition can be controlled how many times the push button was pressed or held…  
I don’t understand why the number of presses cannot be sent as capability… for example as integer value responding to the number of presses (and for holding f.e. -1)…

---

<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:** [September 23, 2020, 7:33pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/769 "2020-09-23T19:33:37Z")

</div>

Button devices are a difficult integration via MQTT - no standards and lots of implementations. Deciding whether pressed states should be retained is one example.

You can create last pressed (from a multiple button controller) but then there’s long press and hold and the subsequent release. I do agree some feedback from a button press via MQTT is useful but only as an event, not a state.

HA does not offer button support or discovery via MQTT.

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

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