
PACEdge User Manual
Section 6
GFK-3178B
Nov 2020
PACEdge Usage Examples
17
6.2.4
Example Walk Through
1.
To be able to store data in InfluxDB, access to the database needs to be authorized. Double
click on the InfluxDB icon
2.
Click on the pencil icon to edit Server details.
3.
Enter Username: admin and Password: edgestack, click on Update.
4.
Notice that flow is set up to automatically write a timestamp once a second, hence right after
the deploy it will start execution. However, before writing to a database it needs to be created
first, so initially, errors will be displayed in the debug window.
Click once on the inject button within Create portion of the flow to create a database
5.
Note that the database is referenced by name, which in our flow is test. This name is entered in
the InfluxDB nodes Database field, but also needs to match in function node create DB.
Therefore, if you would like to change the database name, you need to change it in the
function node as well.
6.
To read entries from InfluxDB click on the inject button within Query flow. In the debug
window you will see a list of values.
7.
If you want to modify query parameters, edit the function node.
6.3
Using MQTT Communication
6.3.1
Example Description
This example shows how to use internal and external MQTT brokers and communication.
6.3.2
Prerequisites
If new to Node-RED, completion of Earthquake Monitor example is highly recommended, as it
shows some Node-RED usage basics and tips.
6.3.3
Example Installation
1.
Open Node-RED.
2.
Click on the menu icon (upper right corner) and choose Import.
3.
Click on Examples.
4.
Expand node-red-contrib-emerson.
5.
Select MQTT and click Import.
6.
The example will appear as a new flow within Node-RED.