MQTT and Node RED now available in demo environment


Just pushed an update of croft and jolie with MQTT support. Documentation on wiki will be written soon, but for those of you who can't wait testing; the Mosquitto MQTT broker is publicly available at tcp://

Topics are gateways/<eui>/status and nodes/<eui>/packets. Use + and # for wildcards. More info here:

Also, I included Node RED in the demonstration environment, see Note that you can spin up your own Node RED instance and get data using the MQTT broker.

(Thomas Telkamp) #2

Very nice Johan!

Small typo, the gateways topic is: gateways/<eui>/status


That caught me out, wondered why I wasn't seeing anything until I added the extra 's' to gateway!

Without a username and password the Node-RED instance is open to abuse!



Thank you very much for providing this!

During tests last night I noticed several packets available in the API we're not showing in mqtt as well as packets in mqtt not being available in the API. I haven't been able to establish if the two are mutually exclusive due to time constrains but it certainly looked that way.
Is the mqtt access designed to 'replace' the API once consumers register for a particular node? (I can't imagine it is as it would create a denial of service opportunity.) Or was it something random I'm just not interpreting the right way?


No, they will both work: MQTT for real-time, API for storage-base requests. It's just two example application services, and we hope many will follow by community efforts (probably connected on top of MQTT, the API or via NodeRED)!

(Thomas Telkamp) #6

They should both work, but they don't. I see the same problem, a packet shows up either in the API, or in MQTT.


Right, but I mean they will both work in general, once @johan fixed this multiplexer behaviour :wink:


I see. Will fix that asap. Please file issues like these on GitHub btw, thanks in advance. Will keep you posted here.


Gone through the Node-RED manual, which left me clueless why it is on earth. Found a nice intro on


Hi Johan,

Could you check the mqtt broker I cant make a 'stable connection.


Hi @IOT_Marco, unfortunately I cannot reproduce this. I connected using mosquitto_sub and the stream looks stable. Also, Node RED does not indicate connection drops.

Which MQTT client do you use? Can you help me reproduce this?


I am running on raspi2 with rasbian-jessie. Connection fail problems ended there yesterday evening at 22:38:04. After that everything went fine:

29 Dec 22:38:04 - [info] [mqtt-broker:2a596153.f0ee06] Connection failed to broker: mqtt://
29 Dec 22:38:19 - [info] [mqtt-broker:2a596153.f0ee06] Connected to broker: mqtt://
30 Dec 09:01:18 - [info] Stopping flows
30 Dec 09:01:18 - [info] [mqtt-broker:2a596153.f0ee06] Disconnected from broker: mqtt://
30 Dec 09:01:18 - [info] Stopped flows


Hi Johan,

I'm running Node Red on Windows 8. I see some strange things. If I wire up something like this:

it is followed by: "Disconnect from broker:mqtt: //"

If I clean my sheet in Node Red (delete all the nodes and deploy again) the connection is restored.

And yes, as pz1 says, Connection fail problems ended there yesterday evening at 22:38:04. After that everything went fine:


Weird...I just tried another Mqtt client (MQTTLens) and as far as I can see now this one works fine! Yep messages are comming in now.....but first I'm going to bake my oliebollen :wink:)


@IOT_Marco Ah, now I see. Do not specify a name for the MQTT client.

Names must be unique, and since multiple clients may use the same name (because they have the same Node RED page open, for example), the broker will disconnect the previous client with that same name.

@pz1 Correct, that was part of the reinstallation. It should be stable again now.


Yes, there must be an unique client identifier
In Node Red, there is a Client ID option:"Leave blank for auto generated" (Edit mqtt in node > click pencil). It is empty now and was empty before so I thought Node Red generates this unique client ID.

(Fabaff) #17

Seems that the MQTT broker is no longer usable without password.

$ mosquitto_sub -h -t "#"
Connection Refused: not authorised.

(Arjan) #18

That's very outdated information; see (and the navigation on the left).