#NR1V1 : Hello World

Application-Note: #NR1V1 : Hello World

Related Documents:

  • Application-Note: #NR0V1 : Get Node-RED ready on my router
  • https://nodered.org/docs/user-guide/

This application describes how to start with mbEDGE and Node-RED. A very simple application where a switch on a dashboard create different outputs to a text-label display.

Description 1 – Dashboard

This Dashboard displays the Switch “Land/Take off” and a Text Label above. These two elements are placed in the Node-RED flow editor. The following picture shows the flow and gives an impression on how it is organized.

Description 2 - Node-RED Flow

On the left side you see the library of Node-RED. These are the available nodes which can be drag&drop to the flow. There are input, output, function and dashboard node. Every input node sends messages on his output-connector to the nodes where he is connected to. For example the above node “Land/Take off” is an input-dashboard-node (switch) which sends a message whenever the switch is pushed on the dashboard.

Description 3 – node switch to set the text

The descripted node sends two different text to the label on the dashboard.

Description 4 - How to setup the switch node

The different text is set in the payload fields (see red arrows).

 

Step-by-Step for Hello World

Add dashboard switch node.

Create a new Group (ui_group). This will be the selectable group item on the dashboard.

Add text node and select the same ui_group as you created for the switch node. In our case it is the group “Simple”. Edit the field Label and select the Layout.

Connect the nodes

Deploy and test

 

See below the Flow as a file to Import in your application.