# How to use the Aedes MQTT broker?

**URL:** <https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201>\
**Category:** General\
**Created:** [9 July 2021 07:11 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201 "2021-07-09T07:11:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:11 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/1 "2021-07-09T07:11:36Z")

</div>

How does one use the Aedes MQTT broker node with the MQTT-out node?

I have googled and found a few pages which basically show the Aedes node just standing alone or linked to a Debug node. Have done this, but my measurement points are not being uploaded.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2021 07:15 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/2 "2021-07-09T07:15:23Z")

</div>

Are you familiar with how MQTT is supposed to work? The broker "just stands alone" because it is a broker. MQTT publishers and subscribers dont need to "wire" up to it.

Did you search forum for `Aedes`? Here is an actual demo in the forum...

> [@Linking 2 or more instances on a local network](https://discourse.nodered.org/t/linking-2-or-more-instances-on-a-local-network/24879/3):
>
> It would have been easier and more future proofing to read up on MQTT (IMO). Heres the 30sec intro... MQTT is a Client Server publish/subscribe messaging transport protocol. It is light weight, open, simple, and designed so as to be easy to implement" An MQTT client (node-red / IoT sensor / whatever) publishes to an MQTT broker a topic and payload are sent in each publish a topic is a string e.g. "house/bedroom/light" or "machine/1/motor/speed" a payload is anything you want (boolean tr…

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:16 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/3 "2021-07-09T07:16:48Z")

</div>

That's what I read. But it was not working.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2021 07:18 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/4 "2021-07-09T07:18:51Z")

</div>

Did you import the flow?

What errors (if any) did you see?

Did you check the debug output after pressing the inject buttons?

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:22 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/5 "2021-07-09T07:22:58Z")

</div>

I am still working on the TDC-E flow. Had modified it and added debug nodes after the inject node and just before the MQTT-out node. Didn't see any error. The debug messages suggest that the values of all 8 variables have been assigned correctly before the MQTT-out node. I have set the parameters of the MQTT-out node correctly, I believe, following the example of an earlier working flow (set1).

However, a check on the online platform shows that the measurement points have not been uploaded.

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:25 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/6 "2021-07-09T07:25:54Z")

</div>

Have just imported your flow and deployed.  
Got this message: "no response from server".

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2021 07:26 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/7 "2021-07-09T07:26:46Z")

</div>

> [@jktan](#):
>
> I am still working on the TDC-E flow

What is this? I have no idea what this means

> [@jktan](#):
>
> However, a check on the online platform shows that the measurement points have not been uploaded

Aedes is a local broker. Why do you think it would send to some online platform?

Can you explain what runs where? An outline of your system(s)?

> [@jktan](#):
>
> Got this message: "no response from server".

When? what did you press? what node gave this message?

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:31 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/8 "2021-07-09T07:31:06Z")

</div>

TDC-E is a telematic data collector from SICK, Germany. It came with its own Node-RED flow.

Ah... so Aedes cannot send data online? Only within a machine?

The message: "no response from server" is probably coming from the another flow. I have multiple flows. Once I chose "current flow", the imported flow has no Debug messages at all. The MQTT-in and MQTT-out nodes are showing an orange "connecting" status while the Aedes node is showing a green "connected" status.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2021 07:32 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/9 "2021-07-09T07:32:32Z")

</div>

OK, lest start basic.

Where are you attempting to send data. Online?

What type of connection does this online service expect - MQTT?

What is the addres/name of this online system where you are trying to send data?

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:33 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/10 "2021-07-09T07:33:55Z")

</div>

Where are you attempting to send data. Online? Yes

What type of connection does this online service expect - MQTT? Yes

What is the addres/name of this online system where you are trying to send data? DECADA. It's a GovTech portal in Singapore. The underlying OS is EnOS from Envision.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2021 07:37 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/11 "2021-07-09T07:37:33Z")

</div>

ok, so you probably dont need a local MQTT broker.

Very quickly, in basic terms, MQTT is a publish subscribe protocol with a single middle man - the broker. There should be only one broker. All clients (node-red, MQTT explorer, other apps) all subscribe and publish to this ONE broker. That way, the broker (man in the middle) can communicate with all clients.

So, with that said, you need to set the MQTT connection to the details provided for this DECADA MQTT broker.

Were you give a hostname, user name, password etc for this online DECADA MQTT service?

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:40 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/12 "2021-07-09T07:40:23Z")

</div>

Yes, I have the hostname, user name, password etc for this online DECADA MQTT service. And quite certain that they are correct.

I noticed that the MQTT-in and MQTT-out actually share the same server (with the same hostname, username, password, etc.) The node name actually changes to MQTT-broker node when I edit the details of the server.

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:40 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/13 "2021-07-09T07:40:58Z")

</div>

But the data is not uploading.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2021 07:43 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/14 "2021-07-09T07:43:11Z")

</div>

> [@jktan](#):
>
> I noticed that the MQTT-in and MQTT-out actually share the same server (

That is correct.

> [@jktan](#):
>
> But the data is not uploading.

Does the MQTT in and out nodes show a green dot under them?

Are you setting the topic of your MQTT publish nodes? I imagine this broker expects a certain format to use the data?

Have you tried connecting to the same MQTT broker using a tool like MQTT Explorer to check the topics you publish to?

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:48 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/15 "2021-07-09T07:48:31Z")

</div>

Yes, the MQTT-out node has a green dot below.

Yes, have set the topic of the MQTT node as per the Message Integration information in the system.

Have not tried MQTT Explorer before.

Just remembered that there is an error message, "Error: connect ECONREFUSED 127.0.0.1:102". But we couldn't quite believe it since the MQTT-out has a connected status and the inject node is reading from the TDC-E node just fine. The variables are showing up (with node.status).

What connection could have been refused? The localhost?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2021 07:52 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/16 "2021-07-09T07:52:20Z")

</div>

> [@jktan](#):
>
> Error: connect ECONREFUSED 127.0.0.1:102

> [@jktan](#):
>
> What connection could have been refused? The localhost?

127.0.0.1 is local host yes.

Port 102 is typically TSAP ([ref](https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers))

Where do you see this error? Can you show me?

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 07:53 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/17 "2021-07-09T07:53:04Z")

</div>

By the way, what is a **local** MQTT broker for?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2021 07:55 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/18 "2021-07-09T07:55:42Z")

</div>

A local MQTT broker is typically used for in-house / on-site (no cloud)

Just because it is local doesnt mean it cant be used by other devices on the local network.

I think you need to get a handle on what MQTT is and what it does. It really isnt very complicated. There is loads of videos and info around the net. Be worth spending an hour reading up / watching vids.

PS, install **MQTT Explorer** to help you understand what is going on in the broker.

---

<div class="post-metadata">

**Author:** ![jktan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jktan/32/41568_2.png) [@jktan](https://discourse.nodered.org/u/jktan)\
**Post date:** [9 July 2021 08:01 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/19 "2021-07-09T08:01:11Z")

</div>

> [@Steve-Mcl](#):
>
> Where do you see this error? Can you show me?

In the Debug tab. Taken a screenshot.  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/6/068391db09562f91cb2d1d074900a0add2f2d1c5.jpeg)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [9 July 2021 08:02 UTC](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201/20 "2021-07-09T08:02:39Z")

</div>

ok, click the node id (highlighted) - does it take you to a node?  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/4/340087e866a7ac452e453c6d0f7ece15cb36fb21.png)

Alternatively, copy the node id and use CTRL+F to search for it.

[Next page](https://discourse.nodered.org/t/how-to-use-the-aedes-mqtt-broker/48201.md?page=2)
