Examples for Node-RED
125/263
10.3 Example 3: MQTT output node
The MQTT output node allows you to send data to an MQTT broker via the
MQTT protocol and uses the MQTT function
publish
for this purpose.
This example uses the MQTT output node together with an Inject node to
send data via MQTT.
Figure 90: MQTT output node
Prerequiste
1. A connection to the Edge Gateway is established (see section
Using the
web browser to establish a connection with the Edge
Gateway
[
}
page 22]).
2. The Node-RED workspace is open.
Step-by-step instructions
1. Inserting an Inject node:
Ø
Drag an
Inject
node from the node library and drop it in the worksheet.
2. Inserting an MQTT output node:
Ø
Drag an
MQTT
output node from the node library and drop it in the
worksheet.
Ê
The red triangle the MQTT output node is displayed with indicates that
the node still needs some more parameters which you have to configure
in the following steps.
3. Showing the sidebar:
Ø
Show the sidebar using the keyboard shortcut
Ctrl+spacebar
or via
the Node-RED menu
View
>
Show Sidebar
.
Ø
Click the tab
Info
.
Ø
Click the
MQTT
output node to display its properties and a functional
description in the tab
Info
.
Edge Gateway | NIOT-E-TIB100-GB-RE (Remote)
DOC170501UM04EN | Revision 4 | English | 2018-08 | Released | Public
© Hilscher 2017 – 2018