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

<div class="post-metadata">

**Author:** ![Gustav\_Groning](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gustav_groning/32/71446_2.png) [@Gustav\_Groning](https://community.homey.app/u/Gustav_Groning)\
**Post date:** [September 12, 2023, 9:41am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1238 "2023-09-12T09:41:59Z")

</div>

Hello,  
Is it possible to change the number of decimal on a MQTT water meter virtual device? I would like to change from 2 decimal to 4 decimals. When I create the Virtual device and select water meter I see that its stated with 2 decimal, but I am unable to select anything else.

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

{  
“meter\_water”: {  
“capability”: “meter\_water”,  
“stateTopic”: “watermeter/main/value”,  
“setTopic”: “”,  
“valueTemplate”: “”,  
“outputTemplate”: “”,  
“displayName”: “Water Meter”  
},  
“measure\_water”: {  
“capability”: “measure\_water”,  
“stateTopic”: “watermeter/main/rate”,  
“setTopic”: “”,  
“valueTemplate”: “”,  
“outputTemplate”: “”,  
“displayName”: “Water flow”  
}  
}

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/3/33c804f0ec92923407275ee6f28b6ddb1ea2b260.png)

---

<div class="post-metadata">

**Author:** ![Astrapowerrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/astrapowerrr/32/78916_2.png) [@Astrapowerrr](https://community.homey.app/u/Astrapowerrr)\
**Post date:** [September 12, 2023, 7:39pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1239 "2023-09-12T19:39:57Z")

</div>

i have the same i cant get fixed

“device\_class”: “current”,  
“unit\_of\_measurement”: “A”,  
“value\_template”: "{{ value | int / 10 }}

using “valueTemplate”: "A / 10 ",

but not working?

---

<div class="post-metadata">

**Author:** ![Gustav\_Groning](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gustav_groning/32/71446_2.png) [@Gustav\_Groning](https://community.homey.app/u/Gustav_Groning)\
**Post date:** [September 15, 2023, 11:49am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1240 "2023-09-15T11:49:19Z")

</div>

@HarriedeGroot could you support in decimal question above?

---

<div class="post-metadata">

**Author:** ![B3rt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/b3rt/32/9435_2.png) [@B3rt](https://community.homey.app/u/B3rt)\
**Post date:** [September 24, 2023, 8:18pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1241 "2023-09-24T20:18:39Z")

</div>

I have a feature request.

Is it possible to add a setting where you can choose if newly added devices (to Homey) should NOT default added enabled in the device list…

Currently all new devices are automatically enabled in the device list, I would like to see that the default would be NOT enabled and that i can choose myself to enable it.  
So exactly the reverse as it is now.

I hope this can be added in a future update of the app.

---

<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:** [September 24, 2023, 9:49pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1242 "2023-09-24T21:49:57Z")

</div>

+1  
Agreed, it’s one of the things which could be improved in this app: i.e. when I add a HA device to Homey, MQTT Hub immediately publishes the new HA Homey device to HA again 😊

Also I’d like to be able to sort the devices list A-Z or new-old. Now it’s old-new, which is not optimal, every time I have to scroll all the way down to disable a new device.

---

<div class="post-metadata">

**Author:** ![feRon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/feron/32/34515_2.png) [@feRon](https://community.homey.app/u/feRon)\
**Post date:** [October 14, 2023, 1:31pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1243 "2023-10-14T13:31:37Z")

</div>

I have MQTT Hub installed ony my Homey Pro 2023. It worked without problems since a long time. Now I have everytime the problem that the app crashed, since a few days. Does everyone has the same problem?

---

<div class="post-metadata">

**Author:** ![Thomas\_W](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/thomas_w/32/34026_2.png) [@Thomas\_W](https://community.homey.app/u/Thomas_W)\
**Post date:** [October 14, 2023, 9:37pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1244 "2023-10-14T21:37:36Z")

</div>

For me the same Problem… (HP23, latest FW)

---

<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 14, 2023, 9:44pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1245 "2023-10-14T21:44:59Z")

</div>

When was Homey updated? I guess that’s related here

---

<div class="post-metadata">

**Author:** ![feRon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/feron/32/34515_2.png) [@feRon](https://community.homey.app/u/feRon)\
**Post date:** [October 15, 2023, 6:32am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1246 "2023-10-15T06:32:42Z")

</div>

I updated my homey in august and then it worked without crash. Im not sure, but it could be that only one device makes the crash. But its not easy to find out which device.

---

<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:** [November 7, 2023, 9:30pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1247 "2023-11-07T21:30:07Z")

</div>

I’m using the HP23 (latest stable FW) now with MQTT Hub.  
The app is crashing every 5 to 10 minutes caused by high memory usage (\>100MB).

Is it only caused by the amount of devices that get synced on app start? Or is it possible that flows or Hub devices are causing a high memory usage?

---

<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:** [November 18, 2023, 12:05pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1248 "2023-11-18T12:05:50Z")

</div>

I had a lot of problems on HP23. The MQTT hub was sending a massive amount of devices to MQTT broker at start up. This caused the MQTT client to crash due to CPU usage and the MQTT hub due to memory usage.  
Only every 10th ot 20th app start was running to the end.

As solution I added an app setting to the MQTT hub app to define a send delay (in ms). The possibility was already in the code, but nut customizeable via app settings.  
This way the send process gets extended. It takes longer until all devices are synced, but the CPU load is nearly 0% instead of 100% before.

If someone has similar issues on HP23, this setting could help.

It’s documented in a pull request.

> <https://github.com/harriedegroot/nl.hdg.mqtt/pull/97>
>
> Hi Harrie,
> 
> I added app settings for send delay to be able to set individual d…elay and created this pull request for.
> 
> The reason for this change is:
> HomeyPro23 is processing messages so fast that the MqttClient app CPU usage is hitting 100% and gets stopped due to CPU warnings. MqttHub gets stopped due to Memory warning. 
> This delay makes both apps much more stable on HP23. I use 100ms delay now and got no stopped apps since this change.
> 
> I changed the app settings page (new field at the end under "Performance" header).
> The setting is passed creating the MessageQueue instance. So the new setting is read on app start.
> I also added the app events for memwarn and cpuwarn and the handler functions. But it seems these events are not called anymore on HP23. I left the code to get a debug log if Athom is answering my comment on Slack and hopefully add these events for HP23.
> 
> I forgot to uncheck the .gitignore file (Homey-CLI added the /.homeybuild/) and ./vscode/ folder (I added debug options for HP23).
> You can ignore/revert these changes.
> 
> I hope the fix is in your interest and you can add it to your branch and publish a new test version.
> Many thanks in advance.
> 
> Ronny

Hopefully @HarriedeGroot can find some time to merge and provide a test version 🙂

---

<div class="post-metadata">

**Author:** ![D\_S](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/d_s/32/79344_2.png) [@D\_S](https://community.homey.app/u/D_S)\
**Post date:** [November 25, 2023, 2:41pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1249 "2023-11-25T14:41:57Z")

</div>

Ik heb mijn Ithu HRU350 gekoppeld met mijn Homey MQTT Broker en Client nu probeer ik dit uit te lezen met de MQTT hub, maar deze geeft geen waarde door. Wat gaat hier mis?

Zie onderstaand log uit de client

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/b/ab35ab2e834bc168b98c99bb489c8a2bea2de77e.png)

Met deze code krijg ik geen temperaturen te zien. Blijft op 0 graden staan.

```auto
{

  "measure_temperature.1": {
    "capability": "measure_temperature",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$.Supply temp",
    "outputTemplate": "",
    "displayName": "Temperatuur_in" 
  },
  "measure_temperature.2": {
    "capability": "measure_temperature",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$.Exhaust temp",
    "outputTemplate": "",
    "displayName": "Temperatuur_uit"
   }
}

```

iemand een idee?  
Alvast bedankt!

---

<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:** [December 31, 2023, 1:11pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1250 "2023-12-31T13:11:39Z")

</div>

Hi @HarriedeGroot ,  
the PR is still open. In the german forum, there are users with similar issues. So it would be nice if you could merge it and provide a test version. Many thanks and a happy new year 🎆

---

<div class="post-metadata">

**Author:** ![Stanga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/stanga/32/79116_2.png) [@Stanga](https://community.homey.app/u/Stanga)\
**Post date:** [January 10, 2024, 7:31pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1251 "2024-01-10T19:31:54Z")

</div>

Hi @HarriedeGroot,

I have a HP23 and have created a virtual device with the MQTT Hub, but it keeps stopping or crashing. To get it up and running again I sometimes have to stop all the apps and start them one by one.

I use it with an energy meter to load balance an EV charger.

Any suggestions on how to solve this?

Help is much appreciated 😊

---

<div class="post-metadata">

**Author:** ![Thomas\_W](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/thomas_w/32/34026_2.png) [@Thomas\_W](https://community.homey.app/u/Thomas_W)\
**Post date:** [January 11, 2024, 4:39pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1252 "2024-01-11T16:39:06Z")

</div>

Hi @HarriedeGroot. I still have the same problem, may you could merge the PR @RonnyW suggested. ? 😉

THANK YOU

---

<div class="post-metadata">

**Author:** ![feRon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/feron/32/34515_2.png) [@feRon](https://community.homey.app/u/feRon)\
**Post date:** [February 9, 2024, 3:24pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1253 "2024-02-09T15:24:41Z")

</div>

Hello

Today I updated my Home Assistant to the new version 2024.2.0. Now it shows me all MQTT names twice. In another forum I was told that this has something to do with the URL link below and that the Homey MQTT app needs to be updated. The topic was already announced in August 2023. Until then, the developers of the respective integrations had to make the adjustments.

This is the link:  
[PSA: MQTT Name changes in 2023.8 - Configuration - Home Assistant Community (home-assistant.io)](https://community.home-assistant.io/t/psa-mqtt-name-changes-in-2023-8/598099)

This is what it looks like for me:  
 ![Print-Screen](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/a/2a9ff19460bb240455afce619ec730be9986f33e.png)

I’m now back to 2024.1.6, everything looks normal:  
 ![Screenshot 2024-02-09 144625](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/2/528d7239886270f6762335ba21e8783db92c21d0.png)

Anyone else having this problem? How can I solve the problem?

Gruss  
feron

---

<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:** [February 9, 2024, 5:34pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1254 "2024-02-09T17:34:38Z")

</div>

I see the same issue as well.  
From what I’ve read in the topic you shared, I understand the MQTT Hub app should get some adjustments, like:  
only devices should hold the device name, the _entities_ of these devices should not.  
Visual:

 ![Screenshot from 2024-02-09 18-46-50](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/1/c18f2fbc3f1953f376427d6fbabbc81f6d5fbf70.png)

Unfortunately Harrie is quiet since August 7 '23…

---

<div class="post-metadata">

**Author:** ![feRon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/feron/32/34515_2.png) [@feRon](https://community.homey.app/u/feRon)\
**Post date:** [February 9, 2024, 5:53pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1255 "2024-02-09T17:53:56Z")

</div>

Hi Peter

Thank you for your answer. That means, you have the same issue? That means, Harrie must update the MQTT Hub App with this changes. But this are little change, as it looks like? And Harrie is quiet since 1/2 years 🙈. This changes are not possible to make from another developer?

What would you suggest?

Best  
feron

---

<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:** [February 9, 2024, 6:10pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1256 "2024-02-09T18:10:24Z")

</div>

Yes, same issue here.  
While[some PR’s](https://community.homey.app/t/mqtt-hub-gateway/6766/1248) also not seem to be approved yet, I think we should wait for Harrie at this time, or search other ways to contact him. Let’s hope he’s allright.

---

<div class="post-metadata">

**Author:** ![feRon](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/feron/32/34515_2.png) [@feRon](https://community.homey.app/u/feRon)\
**Post date:** [February 9, 2024, 6:15pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1257 "2024-02-09T18:15:12Z")

</div>

I hope, Harrie has soon time to fix it. It looks so weird with this 2 names like EG EG 🙈

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

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