# \[APP\]\[Pro\] MQTT Hub - Community version

**URL:** <https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463>\
**Category:** Apps\
**Tags:** app, mqtt, homey-pro\
**Created:** [July 26, 2024, 3:58pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463 "2024-07-26T15:58:53Z")\
**Posts on this page:** 20\
**Page:** 12

<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:** [June 5, 2025, 3:33pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/232 "2025-06-05T15:33:33Z")

</div>

`thermostat_mode` doesn’t seem to be a valid capability

---

<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:** [June 5, 2025, 5:20pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/233 "2025-06-05T17:20:05Z")

</div>

I did I by creating from a new device and added capability thermostat.  
And also a lot of others like current, power, energy, text etc. After creating a new device. I could use the advanced topics to setup all my mqtt topics and used the example from post 116 to create a custom picker. Made me sweat whole day but it’s working so far.

---

<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:** [June 5, 2025, 7:14pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/234 "2025-06-05T19:14:09Z")

</div>

So it’s working now?  
The issue is this part:

```auto
  “capability”: “enum”,

```

You have to select a valid capability that offers the needed events.

```auto
“thermostat_mode”: {
  “capability”: “thermostat_mode”,

```

---

<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:** [June 5, 2025, 8:36pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/235 "2025-06-05T20:36:30Z")

</div>

Yes working great. Thanks!

---

<div class="post-metadata">

**Author:** ![Michael\_Fritzsche](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael_fritzsche/32/96689_2.png) [@Michael\_Fritzsche](https://community.homey.app/u/Michael_Fritzsche)\
**Post date:** [July 5, 2025, 8:20am UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/236 "2025-07-05T08:20:38Z")

</div>

I have a problem getting values updated. I connected a water meter to MQTT and i can see that it regulary reports values. When i create a new device, based on MQTT Hub it seems to work.. .but it never gets any update. At the moment i add a 2nd device for the exact same topic the new device gets the current value and the old stuck one gets updated too.

Thats a test… before updateing the left one showed 0.021 although there was other values reported to MQTT in between.

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

I was always watching MQTT with MQTT Explorer:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/7/971cd961e006772a7b6218c59fa0bc80c068c094.png)

So im 100% sure, that there was updates which did not hit the device in Homey…

The devices are configured as sensor with this topic:

```auto
{
  "meter_water": {
    "capability": "meter_water",
    "stateTopic": "shellyplusuni-wasser-wm/watermeter/m3",
    "template": "{{ value | float }}",
    "displayName": "Water meter"
  }
}

```

What could be the reason, that these devices are working for a short time and then stop updateing the values from MQTT Server?

---

<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:** [July 5, 2025, 11:57am UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/237 "2025-07-05T11:57:19Z")

</div>

Can you check if MqttClient app is restarted in between?  
In this case, the topic registration gets lost.

> <https://github.com/RonnyWinkler/homey.mqtthub/issues/4>
>
> Hi,
> 
> I have a power measuring zigbee device which posts onto MQTT via Zigbee2M…QTT. The device keeps updating in MQTT and is always up to date. Somehow the MQTT Hub device which shows these values in Homey stops updating the values. It's fixed by restarting MQTT Hub. 
> 
> This is the config of my MQTT Hub device:
> {
> "measure\_power": {
> "capability": "measure\_power",
> "stateTopic": "zigbee2mqtt/Zonnepanelen",
> "setTopic": "",
> "valueTemplate": "$\['power\_ab'\]",
> "outputTemplate": "",
> "displayName": "Current Power"
> },
> "meter\_power": {
> "capability": "meter\_power",
> "stateTopic": "zigbee2mqtt/Zonnepanelen",
> "setTopic": "",
> "valueTemplate": "$\['energy\_produced\_b'\]",
> "outputTemplate": "",
> "displayName": "Produced Energy"
> }
> }
> 
> I have no idea why it stops reading the values. Should I send a diagnostic report?
> 
> Thanks,
> Tom

---

<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:** [July 14, 2025, 8:04pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/238 "2025-07-14T20:04:20Z")

</div>

New **test version 4.5.0** :

- adapted device settings for HomeyEnergy to new SDK options
- possibility to add energy settings for home battery, ev charger and electric car.

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/a/1a6cd8fba7c9b18696101816b4d36ee7deade095.png)

For home battery:

- set device option to “home battery”
- add `measure_power` (positive/negative value dependent on charge/discharge).
- add `meter_power.charged` and `meter_power.discharged` (you can use other names)
- insert these capabilities in device settings into corresponding fields

For ev charger:

- use `measure_power` and `meter_power` capability and set device option to “EV charger”.
- If you are using V2G (vehicle top grid), you can set the meter power imported/exported capability

For electric car:

- set device option to “electric car”
- add `measure_battery` and `ev_charging_state` capability

---

<div class="post-metadata">

**Author:** ![Michael\_Fritzsche](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/michael_fritzsche/32/96689_2.png) [@Michael\_Fritzsche](https://community.homey.app/u/Michael_Fritzsche)\
**Post date:** [July 16, 2025, 1:15pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/239 "2025-07-16T13:15:48Z")

</div>

Im trying to add a device with multiple utilization and one temperature topic.

The device is sensor… i was a bit playing and came to that config:

```auto
{
  "measure_temperature": {
    "capability": "measure_temperature",
    "stateTopic": "home/system/temp",
    "valueTemplate": "{{value}}",
    "displayName": "CPU Temperature"
  },
  "measure_humidity": {
    "capability": "measure_humidity",
    "stateTopic": "home/system/cpu",
    "valueTemplate": "{{value}}",
    "displayName": "CPU Usage (%)"
  },
  "measure_luminance": {
    "capability": "measure_luminance",
    "stateTopic": "home/system/ram",
    "valueTemplate": "{{value}}",
    "displayName": "RAM Usage (%)"
  },
  "measure_pressure": {
    "capability": "measure_pressure",
    "stateTopic": "home/system/disk",
    "valueTemplate": "{{value}}",
    "displayName": "Disk Usage (%)"
  }
}

```

i had to use different types, because it seems only to accept one topic per type…

The result shows the correct values, but very strange:

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

Is there a way to show multiple utilization percentages with correct unit and a more generic icon?

---

<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:** [July 16, 2025, 5:00pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/240 "2025-07-16T17:00:33Z")

</div>

You are using different standard capabilities. Using subcapabilities you can add a capability sevreal times.  
And the app offers 2 custom capabilities: `measure_number` and `measure_string` for generic values.

Example:

```auto
{
  "measure_temperature": {
    "capability": "measure_temperature",
    "stateTopic": "home/system/temp",
    "valueTemplate": "{{value}}",
    "displayName": "CPU Temperature"
  },
  "measure_number.cpu": {
    "capability": "measure_number.cpu",
    "stateTopic": "home/system/cpu",
    "valueTemplate": "{{value}}",
    "displayName": "CPU Usage (%)",
    "unit": "%"
  },
  "measure_number.ram": {
    "capability": "measure_number.ram",
    "stateTopic": "home/system/ram",
    "valueTemplate": "{{value}}",
    "displayName": "RAM Usage (%)",
    "unit": "%"
  },
  "measure_number.disk": {
    "capability": "measure_number.disk",
    "stateTopic": "home/system/disk",
    "valueTemplate": "{{value}}",
    "displayName": "Disk Usage (%)",
    "unit": "%"
  }
}

```

The units should work, too (not tested). But the icons are predefined for the capability and not changeable.  
I hope the example is working for you 🙂

---

<div class="post-metadata">

**Author:** ![Jonathan\_Draper](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jonathan_draper/32/33978_2.png) [@Jonathan\_Draper](https://community.homey.app/u/Jonathan_Draper)\
**Post date:** [August 19, 2025, 4:57pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/241 "2025-08-19T16:57:21Z")

</div>

Hello everyone. I have a smart meter device which provides regular readings via Local MQTT and I’d like to get them into Homey as a smart meter for use with the energy tab. Looks like I should be able to set up an MQTT device and configure accordingly. One thing I can’t see is how the value templates work.

My MQTT updates look like this:

```auto
glow/F1A8D1ED18E7/SENSOR/electricitymeter{
"electricitymeter": {
   "timestamp": "2022–06–01T16:32:16Z",
   "energy": {
     "export": {
       "cumulative": 0,
       "units": "kWh"
     },
     "import": {
       "cumulative": 201.95,
       "day": 1.05,
       "week": 0,
       "month": 0,
       "units": "kWh",
       "mpan": "9012224001407",
       "supplier": "— -",
       "price": {
         "unitrate": 0.20862,
         "standingcharge": 0.28403
       }
     }
  },
  "power": {
    "value": 0.063,
    "units": "kW"
  } 
 }
}

```

What would I enter as the value template in order to get at the power value (0.063 in my example)? Once I understand that I think I should be able to work out the others from there.

EDIT: In fact, I’m completely lost as to how to approach this. I was expecting to:

1. Install this app
2. Add a new MQTT device to represent the smart meter
3. Configure it

But I’m stuck at step 2. The list of possible device types doesn’t seem to contain anything relevant. What should I choose?

---

<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:** [August 19, 2025, 6:22pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/242 "2025-08-19T18:22:52Z")

</div>

Problem is your MQTT value. It’s not a simple number, it’s a complex JSON object.

So let’s start:

Create a MQTT device, the type is not relevant.

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/f/2f7a3cdf54e85ccbb67f5c2b6e711f9becc4cde7.png)

Add a capability (I’m using a test topic)

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/2/a290ba4e99cbb3ed713bf4e03da4b873c3eaa95c.png)

Use measure\_power capability.

Add the topic (glow/F1A8D1ED18E7/SENSOR/electricitymeter for you)

Add the JSON path ($.electricitymeter.power.value)

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/8/a84fb354ea8c61d607cb10a75ab151d70a6cc817.png)

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/7/c7652918704a281da4a4372170c7b6cce2775485.png)

Ready.

Now you get the value from the JSON element.

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/3/13d8c3846dca732e9254e01d911a3520054b003d.png)

But it’s kW, and Homey wants W. And JSON path can’t be used with calculation (afaik).

So we are using JavaScript 🙂

Go to device settings. Exchange the valueTemplate line with:  
`“valueTemplate”: “(value) => { return value.electricitymeter.power.value*1000}”,`

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/c/ec77bc968d5643c5da50daa317c5d9a63988c460.png)

 ![grafik](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/2/02a4fe2a2cd043c461d4683585ecf417b39bc0b9.png)

🎉

---

<div class="post-metadata">

**Author:** ![Jonathan\_Draper](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jonathan_draper/32/33978_2.png) [@Jonathan\_Draper](https://community.homey.app/u/Jonathan_Draper)\
**Post date:** [August 20, 2025, 7:21am UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/243 "2025-08-20T07:21:43Z")

</div>

Thank you @RonnyW for detailed guidance. I will give this a go and see how I get on.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Draper](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jonathan_draper/32/33978_2.png) [@Jonathan\_Draper](https://community.homey.app/u/Jonathan_Draper)\
**Post date:** [August 20, 2025, 1:05pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/244 "2025-08-20T13:05:26Z")

</div>

Thanks once again @RonnyW . I got stage 1 working - the device happily pulls through the current power value in W. But I still can’t get the valueTemplate working. When I make the change I think precisely as you describe above, when I hit ‘Save’ on the device settings, I get an error message “Invalid Value: class”.

Can you see what I am doing wrong?

 ![Screenshot 2025-08-20 at 14.01.12](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/b/7b31242b7295cfeff13bffe61d6cfb28677ed67f.png)

---

<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:** [August 20, 2025, 2:00pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/245 "2025-08-20T14:00:17Z")

</div>

In device settings is a field ‘device class’ where no value is set. Please select ‘sensor’ and save. This should work.

It seems I added class change without checking for blank value 😅

---

<div class="post-metadata">

**Author:** ![Jonathan\_Draper](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jonathan_draper/32/33978_2.png) [@Jonathan\_Draper](https://community.homey.app/u/Jonathan_Draper)\
**Post date:** [August 20, 2025, 2:58pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/246 "2025-08-20T14:58:42Z")

</div>

Aha! That’s got it working now, thank you. I’ve also managed to get the cumulative energy usage showing up in meter\_power and included that as a whole home energy meter in the energy tab now so working very nicely.

Thank you again for your help and efforts with this 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:** [August 23, 2025, 7:21pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/247 "2025-08-23T19:21:51Z")

</div>

Hi Ronny!

I have a little challenge.

I made this mode selector in a MQTT device and this works  
Device class: Fan  
Topics JSON:

```auto
{
    "fan_speed": {
    "capability": "fan_speed",
    "stateTopic": "itho/state",
    "setTopic": "itho/cmd",
    "valueTemplate": "round((value / 255) * 100)",
    "outputTemplate": "round((value / 100) * 255)",
    "displayName": "Fan Speed"
  },
"fan_mode": { 
    "capability": "fan_mode", 
    "stateTopic": "itho/ithostatus", 
    "setTopic": "itho/cmd", 
    "valueTemplate": "", 
    "outputTemplate": "", 
    "displayName": "Fan mode", 
    "values": [
  { "id": "low", "title": "Low" }, 
  { "id": "medium", "title": "Medium" }, 
  { "id": "high", "title": "High" } 
    ]
  }
}

```

 ![Screenshot_20250823_231245_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/c/1c6810422af2d6d15ab574b2e369284ff8a3f835.jpeg)

This flow card works:

 ![1000001114](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/e/ce6158f84975cd1618636ae5d6905e38379c262f.jpeg)

**but** when I add a second mode selector with capability, like, `fan_mode.2`, that card is not available anymore for adding to flows.

No big problem, so I picked this universal card below;  
this doesn’t error, but doesn’t change the fan mode.  
I’ve tried both `fan_mode` and `Fan Mode`, value names starting with and without capitals:

 ![1000001110](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/b/4b313cb7453022b2bbf53a72cec716e32c83d94f.jpeg)

Device capabilities in developer tools:

 ![1000001116](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/2/627f625ccf07834a340e3c7fcb5ba8f91b40b0e0.jpeg)

Any ideas or comments on this? Doesn’t the card take string values maybe? (but it should error when that’s true).

---

<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:** [August 23, 2025, 10:00pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/248 "2025-08-23T22:00:55Z")

</div>

2 remarks:

1. Default flow cards are only created for main capabilities. If you add a subcapability, you won’t get these flow cards.

2. You tried to set ‘High’. But you have to set ‘high’. That’s thd id of your enum value (case sensitive). ‘fan\_mode’ as capability is right. That’s the capability ID.

---

<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:** [August 23, 2025, 10:08pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/249 "2025-08-23T22:08:28Z")

</div>

Thanks for your prompt reply.

> [@RonnyW](#):
>
> Default flow cards are only created for main capabilities

Ah, okay that’s clear.

> [@RonnyW](#):
>
> You tried to set ‘High’.

Yea I tried both high / High.  
So using the id is key!

---

<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:** [August 24, 2025, 9:03am UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/250 "2025-08-24T09:03:26Z")

</div>

Did you get the valueTempalate to work for your fan\_mode? I think you want to set the capability based on Mqtt value?

---

<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:** [August 24, 2025, 1:49pm UTC](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463/251 "2025-08-24T13:49:57Z")

</div>

Yea, when I tried capability fan\_speed with value 0.5 the fan doesn’t respond either. My knowledge ends here 😂  
Any idea what to enter/change at the value or output templates?

[Previous page](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463.md?page=11)

[Next page](https://community.homey.app/t/app-pro-mqtt-hub-community-version/113463.md?page=13)
