Using MQTT with Node-RED#
We are going to show you how to send MQTT data to your Node-RED server
Requirements
A Raspberry Pi (or other device) with Node-RED installed
A device that communicates via MQTT (we used an Arduino UNO with a LA66 based Dragino LoRaWAN shield over TTN)
Guide#
We will set up Node-RED to receive data. First add a mqtt in node onto the flow
Open the node properties
Then next to the server drop down click the plus to add a new server.
We are going to fill the information from our TTN application.
The information can be found by going to Integrations, then MQTT in your TTN application page
where the server address is the TTN Public address
where the username is the TTN username in the MQTT settings and password is the Generated API key
On the first page set topic to #. This will subscribe to all topics, later on we can be more specific.
Click Update add a debug node and deploy
This will now recieve messages from TTN