# MQTT how to start

**URL:** <https://community.homey.app/t/mqtt-how-to-start/33936>\
**Category:** Questions & Help\
**Created:** [August 24, 2020, 12:04pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936 "2020-08-24T12:04:22Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [August 24, 2020, 12:04pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/1 "2020-08-24T12:04:22Z")

</div>

I want to experiment how MQTT works. But it is a big black box for me. I know that mqtt is a protocol. You need a broker(server) to use this protocol. I thought that a device is a MQTT client. But when I search the store I find different apps. Which do i need and what can I do with it.

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

The first things i wanted to try is how i can manage a device f.i. a Sonos speaker or a Hue bulb.

Second i want to try to get weather data from openweather with MQTT and how can i get the data into a variable.

Would be nice to get some help and some examples.

The topic for the MQTT app is so huge that it is a little to much in the beginning.

---

<div class="post-metadata">

**Author:** ![LvdP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lvdp/32/16607_2.png) [@LvdP](https://community.homey.app/u/LvdP)\
**Post date:** [August 24, 2020, 1:25pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/2 "2020-08-24T13:25:32Z")

</div>

Hi,

If i’m not mistaken you need all components

MQTT Client is needed to receive MQTT messages  
MQTT Hub is needed to be able to send MQTT messages

MQTT Broker is more like the Server, it doesn’t have to run on Homey, can also run on external system.

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [August 24, 2020, 2:06pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/3 "2020-08-24T14:06:53Z")

</div>

So i can install f.i mosquitto broker on my NAS  
Install, mosquitto MQTT client on Homey. How can my NAS communicate back to Homey. Must you install a Mosquitto client on your NAS, and which one?

---

<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:** [August 24, 2020, 5:24pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/4 "2020-08-24T17:24:20Z")

</div>

You only fundamentally need the client on Homey and the broker on your NAS. You don’t need a client on the NAS.

However It is likely you will also want MQTT hub on Homey to do useful and interesting things with your Homey devices

Installing MQTT Explorer (somewhere on a PC) is highly recommended as it allows you to see what is being sent to the MQTT

> **[MQTT Explorer](http://mqtt-explorer.com/)**
>
> An all-round MQTT client that provides a structured topic overview

---

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [September 11, 2020, 12:28pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/5 "2020-09-11T12:28:27Z")

</div>

I have everything running. Mqtt client, hub and mosquitto on my server. Mqtt explorer is showing this

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/4/04d485c85c3b07f87868b23191fff198d96e4424.jpeg)  
How do I retrieve this information in Homey?

---

<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 11, 2020, 6:24pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/6 "2020-09-11T18:24:24Z")

</div>

Add a new MQTT device using MQTT auto discovery? MQTT device & auto discovery are available in the beta/test version of MQTT hub app.

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [September 4, 2023, 12:48pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/7 "2023-09-04T12:48:12Z")

</div>

If I don’t want to use the MQTT- Hub on Homey, only the MQTT client.  
Now I want to switch a device ON via a flowcard:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/7/57248d6600190c74a232cb1006badabb09a14c7c.png)

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

Wat exactly should my entry in “Bericht” have to be for switch:0 ?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [September 4, 2023, 1:53pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/8 "2023-09-04T13:53:36Z")

</div>

Possibly send payload `on` to `shellyplus2pm-b48xxx/command/switch:0`, but the Shelly thread might be a better place to discuss Shelly MQTT specifics.

---

<div class="post-metadata">

**Author:** ![Willie\_Plompen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willie_plompen/32/8291_2.png) [@Willie\_Plompen](https://community.homey.app/u/Willie_Plompen)\
**Post date:** [February 9, 2024, 8:27pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/9 "2024-02-09T20:27:01Z")

</div>

![Schermafbeelding 2024-02-09 211654](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/8/38da0acb68dfc1821890a7e0f768267d3072a72f.png)  
I would like to know what I should fill in here so that I receive a message or notification when the charging station turns on or off.  
 ![Schermafbeelding 2024-02-09 212423](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/9/6915fe2251258abd56af862ebea19f4ff3ab35b9.png)

---

<div class="post-metadata">

**Author:** ![Fred\_ckx](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fred_ckx/32/86217_2.png) [@Fred\_ckx](https://community.homey.app/u/Fred_ckx)\
**Post date:** [July 11, 2024, 4:48pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/10 "2024-07-11T16:48:32Z")

</div>

I have quite some experience in working with MQTT and have a broker running on my NAS. In this way I can exchange information of a bunch of devices with Nodered flows that also run on my NAS.

I just managed to install the MQTT client (by Menno van Grinsven) on my Homey Pro (2023). I try to use it in a flow, but I don’t see any flowcards that return the contents (payload) of a received message! Without access to the payload MQTT becomes less useful.

Anyone knows how to get hold on the message payload?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 11, 2024, 5:11pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/11 "2024-07-11T17:11:33Z")

</div>

> [@Fred\_ckx](#):
>
> Anyone knows how to get hold on the message payload?

It’s available as a tag:

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

---

<div class="post-metadata">

**Author:** ![Fred\_ckx](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fred_ckx/32/86217_2.png) [@Fred\_ckx](https://community.homey.app/u/Fred_ckx)\
**Post date:** [July 11, 2024, 5:19pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/12 "2024-07-11T17:19:37Z")

</div>

Thanks Robert ! In the mean time I discovered usage of tags!

Now that I have my data (heatpump duct temperatures), I want to create graphs. Is it possible in some way to transfer the tag data to Insights?

---

<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:** [July 11, 2024, 6:20pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/13 "2024-07-11T18:20:41Z")

</div>

You can save numeric data to logic numeric variables, their values are shown in insights.

---

<div class="post-metadata">

**Author:** ![Fred\_ckx](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fred_ckx/32/86217_2.png) [@Fred\_ckx](https://community.homey.app/u/Fred_ckx)\
**Post date:** [July 12, 2024, 3:47pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/14 "2024-07-12T15:47:17Z")

</div>

Can you please give a hint how to do that. Maybe a link where I can read and learn?

Meanwhile I will check if my data is numeric. If not, convert it to numeric and then look if I see some clues in the flow environment.

---

<div class="post-metadata">

**Author:** ![Fred\_ckx](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fred_ckx/32/86217_2.png) [@Fred\_ckx](https://community.homey.app/u/Fred_ckx)\
**Post date:** [July 12, 2024, 4:05pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/15 "2024-07-12T16:05:18Z")

</div>

Success! Once I convert the message text (using a logic flowcard) to a numeric value (#Result) an entry Logic Tvalue appears in the Insights menu. Great!

---

<div class="post-metadata">

**Author:** ![Paul\_Vogelaar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/paul_vogelaar/32/67696_2.png) [@Paul\_Vogelaar](https://community.homey.app/u/Paul_Vogelaar)\
**Post date:** [July 12, 2024, 4:09pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/16 "2024-07-12T16:09:29Z")

</div>

The trick to get to the “Message received“ is sometimes the connection between the cards.

---

<div class="post-metadata">

**Author:** ![Fred\_ckx](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fred_ckx/32/86217_2.png) [@Fred\_ckx](https://community.homey.app/u/Fred_ckx)\
**Post date:** [July 12, 2024, 4:20pm UTC](https://community.homey.app/t/mqtt-how-to-start/33936/17 "2024-07-12T16:20:14Z")

</div>

I have quite some experience with Nodered. That helps.

The docs for Homey are quite thin/poor…

But luckily, the “community” over here is pretty responsive! Are there other locations where the Homey community is active?
