How to use the Aedes MQTT broker?

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.

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...

1 Like

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

Did you import the flow?

What errors (if any) did you see?

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

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.

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

What is this? I have no idea what this means

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)?

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

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.

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?

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.

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?

1 Like

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.

But the data is not uploading.

That is correct.

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?

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?

127.0.0.1 is local host yes.

Port 102 is typically TSAP (ref)

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

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

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.

In the Debug tab. Taken a screenshot.
image

ok, click the node id (highlighted) - does it take you to a node?
image

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

1 Like