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

<div class="post-metadata">

**Author:** ![sege](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/sege/32/80641_2.png) [@sege](https://community.homey.app/u/sege)\
**Post date:** [February 13, 2024, 7:39am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1258 "2024-02-13T07:39:08Z")

</div>

How do I device this value by /1000? I have the following:

```auto
  "meter_power": {
    "capability": "meter_power",
    "stateTopic": "go-eController/906464/cec",
    "setTopic": "",
    "valueTemplate": "$.0.0",
    "outputTemplate": "",
    "displayName": "Energy"
  }

```

From this JSON  
`[[ 136654.7, 0], [136654.7, 0], [52456.23, 0.118438], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0] ]`

I tried the simple  
`"valueTemplate": "$.0.0 / 1000"`

But this didn’t seem to do the trick.

Some help would be awesome!

---

<div class="post-metadata">

**Author:** ![Wout\_van\_den\_Dool](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wout_van_den_dool/32/391_2.png) [@Wout\_van\_den\_Dool](https://community.homey.app/u/Wout_van_den_Dool)\
**Post date:** [February 22, 2024, 1:25pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1259 "2024-02-22T13:25:14Z")

</div>

I have multiple crashes a day, can you see why?  
It is with the [https://www.nrgwatch.nl/product/itho-cve-rft-wifi-add-on/](https://www.nrgwatch.nl/product/itho-cve-rft-wifi-add-on/) Itho Daalderop Wifi Module

Crashreport:  
1eddd9f2-3f18-40c4-a750-aad3ee16d576

---

<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:** [February 27, 2024, 8:51pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1260 "2024-02-27T20:51:55Z")

</div>

Is this app stil supported or developed in any way?

According to the app store there has not be any update in years…

If the app is no longer developed maybe someone else could take it over?

---

<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 27, 2024, 11:28pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1261 "2024-02-27T23:28:41Z")

</div>

And what exactly is your problem B3rt? I’ve no issues at all with MQTT Hub on my Pro 2019.  
It seems something’s changed for apps @ Pro 2023.

---

<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:** [February 28, 2024, 7:52am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1262 "2024-02-28T07:52:03Z")

</div>

no feature request (or response on any request or reports via github) and it keeps crashing after disabling (or enabling) a device and the try to broadcast again. I think it runs out of memory… (\>95mb usage)

---

<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 28, 2024, 7:59am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1263 "2024-02-28T07:59:26Z")

</div>

I thought exactly the same as B3rt. I think MQTT Hub is a very important app that hasn’t been developed further for so long. I still have the problem with the double names, a fix for this problem would be so great.

---

<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 28, 2024, 6:37pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1264 "2024-02-28T18:37:08Z")

</div>

Guys, the crashing problems seems related to this issue (and only to the Pro 2023)

> [@\[APP\]\[Pro\] Home Assistant - Community App](https://community.homey.app/t/app-pro-home-assistant-community-app/71477/1022):
>
> Hi, I had such an error only once where a user activated a HA integration that seemed to cause a lotif traffic. Not your case I think. You installes FW 10.3.0? Happened it since this update? I can see a lot of errors ‘app crashed’ without ‘countdown’ messages before. The app crashes immediatly after a restart, right? HA is sending all entities and entity updates on startup. And devices get initialized with new data. Don’t know if the HA traffic incr…

---

<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:** [February 28, 2024, 6:50pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1265 "2024-02-28T18:50:43Z")

</div>

It would be cool if @HarriedeGroot could approve the PR on Github. Then anyone could adjust the delay to prevent crashes caused by CPU usage.

---

<div class="post-metadata">

**Author:** ![Arnold\_vd\_Linden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arnold_vd_linden/32/19336_2.png) [@Arnold\_vd\_Linden](https://community.homey.app/u/Arnold_vd_Linden)\
**Post date:** [March 3, 2024, 11:18am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1266 "2024-03-03T11:18:02Z")

</div>

Can someone help me with the issue below that I can’t seem to resolve?

I am using the NRGwatch add-on print for the ITHO mv, and I have added it to Homey following the [instructions](https://github.com/arjenhiemstra/ithowifi/wiki/Homey-integration). This reads the following values through an MQTT Hub device and adds a dim function:

```auto
{
  "dim": {
    "capability": "dim",
    "stateTopic": "itho/state",
    "setTopic": "itho/cmd",
    "valueTemplate": "round((value / 255) * 100)",
    "outputTemplate": "round((value / 100) * 255)",
    "displayName": "Dim level" 
  },
  "measure_temperature": {
    "capability": "measure_temperature",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$['temp']",
    "outputTemplate": "",
    "displayName": "Temperature"
  },
  "measure_humidity": {
    "capability": "measure_humidity",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$['hum']",
    "outputTemplate": "",
    "displayName": "Humidity"
  }
}

```

However, now I would like the button to function in Homey as an on/off switch. So when the button is on, the ventilation turns on, and when off, it turns off. Presets for this are available in the add-on print. The latter works, but when turned on, the status is not remembered. So, if I turn it on, the button lights up, but after a few seconds, it goes off again. If I then turn it on again, it stays on.

Now, I would like the on/off button to display the status as on when it is greater than 0 and off when it is exactly 0. In the example below, I am currently using the value of 220, but it seems not to work correctly. Perhaps the value itho/state = 220 is coming in too late. No idea.

Hopefully, someone can tell me how to achieve this and explain what I am doing wrong.

```auto
{
  "dim": {
    "capability": "dim",
    "stateTopic": "itho/state",
    "setTopic": "itho/cmd",
    "valueTemplate": "round((value / 255) * 100)",
    "outputTemplate": "round((value / 100) * 255)",
    "displayName": "Dim level" 
  },
 "measure_temperature": {
    "capability": "measure_temperature",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$['temp']",
    "outputTemplate": "",
    "displayName": "Temperature"
  },
  "measure_humidity": {
    "capability": "measure_humidity",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$['hum']",
    "outputTemplate": "",
    "displayName": "Humidity"
  },
  "onoff": {
    "capability": "onoff",
    "stateTopic": "itho/state",
    "setTopic": "itho/cmd",
    "valueTemplate": "value == '220' ",
    "outputTemplate": "value ? '220' : '0' ",
    "displayName": "Turned on"
  }
}

```

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

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/9/09c7e806726d35c6f652e6701c3e1d2b043e5ae4.jpeg)

---

<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:** [March 3, 2024, 6:01pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1267 "2024-03-03T18:01:58Z")

</div>

No clue about the functioning, but I noticed an inconsistency: you used single quotes for the values, and you don’t use that anywhere else?  
Try without those single quotes:

 ![Screenshot_20240303-185947_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/4/047af1ebb6b5d55320636d12a6194bcb5f05807c.jpeg)

(And please edit your post and translate into English, this is an English language topic. Thx)

---

<div class="post-metadata">

**Author:** ![Arnold\_vd\_Linden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arnold_vd_linden/32/19336_2.png) [@Arnold\_vd\_Linden](https://community.homey.app/u/Arnold_vd_Linden)\
**Post date:** [March 3, 2024, 7:06pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1268 "2024-03-03T19:06:11Z")

</div>

I remove the single quotes and still the same issue.

I was using the quotes because I saw that in previous posts.

And translated the text from Dutch to English.  
Thank you

---

<div class="post-metadata">

**Author:** ![Erbru](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@Erbru](https://community.homey.app/u/Erbru)\
**Post date:** [March 14, 2024, 6:44am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1269 "2024-03-14T06:44:34Z")

</div>

This morning my MQTT broker (Version V3.0.2) stopped working. Based on the review of the logs it seems to stopped at the moment of the last Homey update to version 10.3.2. Anyone else experiencing the same type of issues?

---

<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:** [March 14, 2024, 7:18am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1270 "2024-03-14T07:18:04Z")

</div>

What’s displayed as reason? CPU usage?  
Then it’s perhaps caused by the initial sync.

> [@MQTT Hub/Gateway](https://community.homey.app/t/mqtt-hub-gateway/6766/1248):
>
> 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 al…

If @HarriedeGroot could merge the PR and provide a test version, all affected users could try the delay option.

---

<div class="post-metadata">

**Author:** ![Arnold\_vd\_Linden](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arnold_vd_linden/32/19336_2.png) [@Arnold\_vd\_Linden](https://community.homey.app/u/Arnold_vd_Linden)\
**Post date:** [March 14, 2024, 7:19am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1271 "2024-03-14T07:19:45Z")

</div>

Perhaps you can post your question in this topic [MQTT Broker for Homey](https://community.homey.app/t/mqtt-broker-for-homey/5129)

---

<div class="post-metadata">

**Author:** ![Erbru](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@Erbru](https://community.homey.app/u/Erbru)\
**Post date:** [March 14, 2024, 7:22am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1272 "2024-03-14T07:22:51Z")

</div>

Just posted the same question in MQTT Broker for Homey. Thanks. Untill now now no clear information found in the logs of Homey and the related apps. Will check it later today.

Edit 1:  
Earlier this morning I did a soft restart of Homey. But no response. Pull The Plug (on Homey) did work. Thanks for this simple and easy solution from [robertklep](https://community.homey.app/u/robertklep)

---

<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:** [March 14, 2024, 7:38am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1273 "2024-03-14T07:38:09Z")

</div>

Just as addition… For me the high CPU load has crashed the Hub and in the same time the Broker crashed caused by memory usage. That’s why I suggested the PR because it can be related.

---

<div class="post-metadata">

**Author:** ![Ronni](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ronni/32/34633_2.png) [@Ronni](https://community.homey.app/u/Ronni)\
**Post date:** [March 14, 2024, 7:00pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1274 "2024-03-14T19:00:26Z")

</div>

…and this is REALLY annoying, that the devices is send back to HA through MQTT! :-/

---

<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:** [March 14, 2024, 8:12pm UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1275 "2024-03-14T20:12:21Z")

</div>

True that. And I **always** forget to disable MQTT hub before adding devices to Homey 😂  
I hope @HarriedeGroot is still OK, if so, a bit of his time for some PR’s, might bring us further here 🙏

---

<div class="post-metadata">

**Author:** ![Mikael](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mikael/32/4128_2.png) [@Mikael](https://community.homey.app/u/Mikael)\
**Post date:** [April 24, 2024, 5:43am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1276 "2024-04-24T05:43:18Z")

</div>

No update for 3 years and it would be wonderful with another update so that even users of the new Homey Pro can use it or if someone else takes over the development as Harrie de Groot does not seem active or has responded to any comments about the app.

My problem is with high CPU load that crashes the Hub and i know there is some kind of workaround but then you need to know what to do and how to do it in each step ☹

---

<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:** [April 24, 2024, 7:29am UTC](https://community.homey.app/t/mqtt-hub-gateway/6766/1277 "2024-04-24T07:29:02Z")

</div>

I’m using MQTT Hub on Homey early 2023 from beginning with ~150 devices - I have no major issues.

Only issue that MQTT devices are not working on stable version. They however works on [beta](https://homey.app/en-hu/app/nl.hdg.mqtt/MQTT-Hub/test/) - but this can be easily workaround by flow subscribed to channel.

I have one other flow which restarts client and hub every night at 1:00 - this is however recommended by Harrie.

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

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