MQTT Broker & Node Red on RPi 3

Hi Resin.io Forum!

I’m currently working on a project to turn a LoPy into a Raspberry Pi 3 controlled LoRa gateway, connected up using Node Red.

I’ve got Node Red running on the board now, using https://github.com/resin-io-projects/resin-node-red but now I want to get an MQTT Broker also running on the board simultaneously.

Does anyone have any suggestions as to what the best way to do this might be?

Thanks!

Alex

Hey @bucknalla, I’ve never used node-red before, but basically you just need to set up a broker that runs along side the node-red server? And then node-red has a built in UI to connect to a specific broker on a specific host:port as a client right?

To run the broker similtaneously you’ll need to install a broker in the build step and then in the resin-node-red start script you should and another line to start it along with node-red.

This should help get you get the broker installed and running https://www.rs-online.com/designspark/building-distributed-node-red-applications-with-mqtt

Hi @craig,

That’s right, I want a broker that runs alongside the node-red server.

Fantastic! That link looks great, seems to cover all my questions!

Cheers!

Alex

Good to hear!

Let us know how it goes.

Hey Alex - how did you go with this? Could you share the Dockerfile as I’m also wanting to have mqtt running as a broker on the Pi?
Cheers
Darren