Examples for Node-RED
120/258
6. Configuring the MQTT output node:
Ø
Enter the name of the topic that you want to send (publish) in the field
Topic
, e.g.
Timestamp1
.
Ø
For
QoS
enter the value
1
.
Ø
Enter the name of this node, e.g.
MyPublishingNode
, in the field
Name
.
Ê
All parameters are entered.
Ø
Click
Done
.
Ê
The configuration of the MQTT output node is completed and the red
triangle has disappeared.
7. Connecting the nodes:
Ø
To connect the
Inject
node with the
MQTT
node, hold down the left
mouse button and draw a connecting line (wire) from the output port of
the Inject node to the input port of the MQTT node.
ð
8. Deploy:
Ø
Click
Deploy
to transmit the nodes, that have so far existed in the editor
only, to the device and activate them.
ð
The flow is activated in the Edge Gateway.
The section
page 102] describes the parameters of
the MQTT output node.
The example for copying
[{"id":"c28f8355.ed0b7","type":"inject","z":"6b03759e.b5eb4c","name"
:"","topic":"","payload":"","payloadType":"date","repeat":"","cronta
b":"","once":false,"x":187,"y":163,"wires":[["9bc7b36a.df3c3"]]},
{"id":"9bc7b36a.df3c3","type":"mqtt
out","z":"6b03759e.b5eb4c","name":"MyPublishingNode","topic":"Timest
amp1","qos":"1","retain":"","broker":"cf82b7fc.b44d18","x":461,"y":1
63,"wires":[]},{"id":"cf82b7fc.b44d18","type":"mqtt-
broker","z":"6b03759e.b5eb4c","broker":"localhost","port":"1883","cl
ientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleans
ession":true,"willTopic":"","willQos":"0","willPayload":"","birthTop
ic":"","birthQos":"0","birthPayload":""}]
Edge Gateway | NIOT-E-TPI51-EN-RE (Connect)
DOC170502UM04EN | Revision 4 | English | 2018-08 | Released | Public
© Hilscher 2017 – 2018