3. Configuration

This guide has the instructions to configure and use a Flows project.

Flows Configuration

Configuration of a Flows project requires the following steps:

  1. Name the project.
  2. Start the project.
  3. Design & Deploy your flows.
  4. Import or Export flows and nodes.

A full example can be found in the example section below.

The following sections describe each activity.

Setting the Project Name

The first step in configuring a new Flows Project is to give it a name.

In the Project tab:

  1. Enter a name for the project.
  2. Set switch to Manual mode if you do not want the project to start automatically when Edge One™ starts.
Flows Project Name
  1. Click Save to simply save the project or Save & Start to run the project. In both cases, you will be returned to the project’s main page.

The results of a Save are shown below.

Flows Save
  1. You need to Start the project, next.

Back to Top

Start the Flows Project

To use the Flows visual designer, your Flows project has to be started.

  1. Click on Start.
Start Flows
  1. Design your flows next.

Back to Top

Designing and Deploying Flows

Once your project is running, you can start to design your flows as follows:

  1. Click on Manage Flow to open the design page of Flows.
Manage Flow
  1. Add nodes to the workspace and wire then together.

  2. The design page includes five areas:

  1. The design workspace where you build your flows.
  2. The Top Bar with the main menus.
  3. The Palette with the available nodes.
  4. The sidebar which is optionally displayed and shows node information, debug connector broker configuration.
  5. The bottom bar which allows to collapse the palette menu and to zoom in/out the design board.

Design workspace

The design workspace includes a grid on which to place nodes. Nodes have connector globes that are used to wire them together.

To design a flow:

  1. Select a node from the palette.
  2. Drag and drop the node into the workspace.
  3. Add another node in the same way.
  4. Wire them together by clicking on the connector globe of the source and dragging to the target node.
  5. When finished, click on Deploy.

For more details see the example below.

Top Bar Functions

The top bar of the Flows interface includes the following functions:

  1. Make full screen button which will make the design space the size of the display’s screen.
  2. Deploy dropdown menu. It allows to select the deployment method to be used. The choices are:
  • Full which deploys everything in the workspace.
  • Modified Flows which only deploys flows that contain changed nodes.
  • Modified Nodes which only deploys nodes that have changed.
  1. The Menu Bar which includes the following items:
  • View - Allows to display the information sidebar or not.
  • Debug messages - Displays debug messages on the debug tab on the sidebar.
  • Import - allows to import entire flows or nodes to the current flow or to a new flow, and also allows to import devices from a Library.
  • Export - allows to export nodes or flows.
  • Search flows - allows to search for flows.
  • Configuration - Opens the config tab in the sidebar which allows to configure the connector-broker on all flows or a single flow.
  • Flows - Allows to add new flows, to rename a flow or to delete a flow.
  • Subflows - Allows to create a subflow which is opened on a separate design tab.
  • Manage palette - Allows to:
  • View - Allows to configure the design gris, the display of node status and whether to show tips.
  • Palette - allows to manage the existing nodes in the palette and to install new nodes.
  • Keyboard - allows to configure keyboard shortcuts to speed up the development process.
  1. Settings Same functionality as Manage palette.
  2. Keyboard Shortcuts Same menu as manage palette.
  3. Node-RED website is a link to the Node-RED website.
  4. v1.2.0 is the CloudPlugs version of the Flows engine. Clicking displays the version of Node-RED it is based upon.

Back to Top

Importing Flows and Nodes

To import a flow or node:

  1. Open the source workspace either in a Flows project or in Node-RED.

  2. Select the individual node(s) or all the nodes in the flow.

  3. On the menu bar, select Export->Clipboard.

Flows Save

The export window will open with the JSON of the selected nodes as shown below.

Flows Save
  1. Click on Export to Clipboard. It is recommended that you save the Clipboard contents to a file.

  2. Open your target Flows project and click on Manage Flows to open the project workspace.

  3. On the menu bar, select Import->Clipboard.

Flows Save
  1. Make sure that the desired nodes are copied into your system’s Clipboard and Paste them on the import space.

  2. Select either the current flow or a new flow.

  3. Click on Import to complete the procedure.

Flows Save

Back to Top

Exporting Flows and Nodes

To export a flow or node:

  1. Open the source workspace either in a Flows project or in Node-RED.

  2. Select the individual node(s) or all the nodes in the flow.

  3. On the menu bar, select Export->Clipboard.

Flows Save

The export window will open with the JSON of the selected nodes as shown below.

Flows Save
  1. Click on Export to Clipboard. It is recommended that you save the Clipboard contents to a file.

Back to Top

Palette of available nodes

The palette shows the list of available nodes that can be used to create flows.

Sidebar

The sidebar includes the following:

  1. Info tab displays:
  • Information a summary of the nodes characteristics such as their id, type, connector, module, pid (project id) and others.
  • Flow Description which includes details on the parameters required by the node and its main features and expected behavior. The level of details depends on what the node developer decided to include with the node.
  1. Debug displays any message generated by a Debug node. By default, it just displays the payload of the message, but it is possible to display the entire message object.
  2. Config displays all the configuration nodes available on all flows or single flows.

Back to Top

Bottom Bar

The bottom bar allows to:

  1. Expand and collapse the palette menus.
  2. Zoom in/out of the workspace.

Back to Top

Configuration example

Here is a simple configuration example. We want to get data from an Edge One™ Modbus project and send it to CloudPlugs IoT. In addition, we will add a debug node and inject node to initiate the flow with its default timestamp. The inject node will be used to allow to trigger the node manually by clicking on its button within the editor.

  1. Drag and drop an Edge One™ Project input node into the workspace.
  2. Configure the node:
  • Double click on the node to open it.
  • Enter a name for the node.
  • Select the Modbus module from the module list.
  • Select the project that data will be read from.
  • Click on Done.
Edge One™ Node
  1. Drag and drop a CloudPlugs IoT output node into the workspace.
  2. Configure the node:
  • Double click on the node to open it.
  • Enter a name for the node. The default name for the node, if no name is entered, is the CloudPlugs IoT URL and port api.cloudplugs.com:1883.
CP IoT Node
  • Click on edit ( )to enter the Plug-ID and connection password for the Thing that will be used to send data to CloudPlugs IoT.
  • Enter the topic or channel where the data will be written.
  • Click on Done.
CP IoT Node
  1. Connect the Edge One™ input node to the CloudPlugs IoT output node.
  2. Drag and drop a Debug output node.
  3. Configure the node:
  • Enter a name for the node.
  • Select the output. It can be the message payload only or the entire message object. We select only the payload for this example.
  • Select the target for the debug output. We selet the debug window of the sidebar.
  • Optionally enter a name for the node. If left blank the default name will be used which in this case is msg.payload.
  • Click on Done.
Inject Node
  1. Connect the Edge One™ input node to the debug output node. The debug information will be displayed in the debug tab of the sidebar.
  2. Drag and drop an Inject output node. We use this node to initiate the flow with the default payload value which is a timestamp of the current time in milliseconds. By default, the node is triggered manually by clicking on its button within the editor.
  3. Configure the node:
  • Enter a name for the node. Here we called it timestamp.
  • We leave the other fields empty since the purpose is to use it to simply start the flow by clicking on the node.
  • Click on Done.
Inject Node
  1. Connect the inject node to the the CloudPlugs IoT output node.

The resulting flow is shown below. It has an additional flow that sends data from another OPC UA project on the Edge to another topic in CloudPlugs IoT.

Example Flow

Back to Top

Still need help? Get in touch!
Last updated on 6th May 2021