1. Overview

Modbus Edge One™ Flows is a custom version of Node-RED, a flow-based programming tool, originally developed by IBM’s Emerging Technology Services team and now a part of the JS Foundation.

This guide includes:

  1. A description of the Edge One™ Flows module, and
  2. Information on the nodes available when you first configure Flows.

After reading this guide, please consult the:

  1. Get Started guide, and the
  2. Flows Configuration guide.

Edge One™ Flows Module

The Edge One™ Flows module is supplied as a container that enables the visual programming of flows for wiring together hardware devices, APIs and online services without writing code. Flows is a custom version of Node-RED which is fully integrated with Edge One™, but that maintains full compatibility with the latest version of Node-RED. The module is constantly updated to keep up with the progress made by the open source community.

The module includes a palette of over 50 nodes to perform all kinds of tasks, including Input, Output, Math, Social, Sentiment, Storage, Performance, connectivity to CloudPlugs IoT and Edge One™ projects, connectivity to AWS applications, and to Azure IoT Hub and GE Predix.

The module is extensible and you can create JavaScript functions within the function editor. You can save your function, templates or flows for re-use.

You can also import flows written by contributors to the Node-RED community which has a growing Library of nodes and flows. As with any open source software, you are advised to be careful and review the nodes and flows you import as there is no guarantee that they will operate as advertised, or that they are bug free.

The Edge One™ Flows guides are not intended to replace the Node-RED documentation. As such, please refer to it for all matters related to:

  1. How to install and deploy flows.
  2. How to use Node-RED.
  3. Learning how to get things done with Node-RED.
  4. Creating Nodes.
  5. Using the APIs.

The following section describes the available nodes. Detailed descriptions for each node are available inside the individual Node Help sections in Flows.

Back to Top

Flows Nodes

The following nodes are included with the Flows Engine:

Input Nodes

Noce Description
Catch Catch errors thrown by nodes on the same tab.
HTTP. Creates an HTTP end-point for creating web services.
HTTP_Request Sends HTTP requests and returns the response.
Inject Injects a message into a flow either manually or at regular intervals. The message payload can be a variety of types, including strings, JavaScript objects or the current time.
Link Create virtual wires between flows.
MQTT Connects to a MQTT broker and subscribes to messages from the specified topic.
Serial Reads data from a local serial port.
Status Report status messages from other nodes on the same tab.
TCP Provides a choice of TCP inputs. Can either connect to a remote TCP port, or accept incoming connections.
TCP Request A simple TCP request node - sends the msg.payload to a server tcp port and expects a response.
Timerswitch A multi-schedule timer which allows you to add multiple on/off periods for a single output with a minimum duration of 1 second.
UDP A UDP input node, that produces a msg.payload containing a Buffer, string, or base64 encoded string. Supports multicast. It also provides msg.ip and msg.port set to the ip address and port from which the message was received.
WebSocket WebSocket input node.

Back to Top

Output Nodes

Node Description
Debug Displays selected message properties in the debug sidebar tab and optionally the runtime log. By default it displays msg.payload.
HTTP_Response Sends responses back to requests received from an HTTP Input node.
Link Create virtual wires between flows.
MQTT Connects to a MQTT broker and publishes messages.
Serial Provides a connection to an outbound serial port.
TCP Provides a choice of TCP outputs. Can either connect to a remote TCP port, accept incoming connections, or reply to messages received from a TCP In node.
UDP This node sends msg.payload to the designated UDP host and port. Supports multicast. You may also use msg.ip and msg.port to set the destination values, but the statically configured values have precedence.
Websocket Websocket out node.

Back to Top

Functions

Node Description
Average Calculates the average of incoming msg.payload values from across a number of different msg.topic.
AWS Shadow A thing shadow (sometimes referred to as a device shadow) is a JSON document that is used to store and retrieve current state information for a thing (device, app, and so on). The Thing Shadows service maintains a thing shadow for each thing you connect to AWS IoT.
Base64 A function that converts the msg.payload to and from base64 format.
Batch Creates sequences of messages based on various rules.
Change Set, change, delete or move properties of a message, flow context or global context.
Comment A node you can use to add comments to your flows.
CSV Converts between a CSV formatted string and its JavaScript object representation, in either direction.
Data_Generator Creates dummy data strings based on a handlebars-style template.
Delay Delays each message passing through the node or limits the rate at which they can pass.
Excursion. Monitors a value for excursions from a range. Use this node to process a stream of sensor values and ensure that they remain in a defined range.
FFT A function to run real or complex fast Fourier Transforms against an array of data.
Function A JavaScript function block to run against the messages being received by the node. The messages are passed in as a JavaScript object called `msg``.
HTML Extracts elements from an html document held in msg.payload using a CSS selector.
Join Joins sequences of messages into a single message.
JSON Converts between a JSON string and its JavaScript object representation, in either direction.
Match A node to match messages based on property values.
Msgpack A function that converts the msg.payload to and from msgpack format.
Offline Reports when data has not arrived in a configurable time. Use this node to monitor a message stream and report if data does not arrive in a configurable time. This provides a way good way to tell if a device has gone off-line.
Random Generates a random number between a low and high value.
Range Maps a numeric value to a different range.
Rbe. Report by Exception node - only passes on data if the payload has changed. It can also block until the value changes by a specified amount - deadband modes.
Smooth A simple node to provide various functions across several previous values, including max, min, mean, high and low pass filters.
Sort A function that sorts message property or a sequence of messages.
Split Splits a message into a sequence of messages.
Splitter A simple node to split an payload-array into separate messages.
Switch Route messages based on their property values or sequence position.
Template Sets a property based on the provided template.
Throttle A simple node to throttle down passed through message amount. Just insert the throttle node in between two others, and the passed through message amount can be limited by different parameters.
Trigger When triggered, can send a message, and then optionally a second message, unless extended or reset.
XML Converts between an XML string and its JavaScript object representation, in either direction.
YAML Converts between a YAML formatted string and its JavaScript object representation, in either direction.

Back to Top

Social

Node Description
Email Repeatedly gets a single email from an IMAP server and forwards on as a msg if not already seen.
Twitter. Twitter input node. Can be used to search either: a) the public stream for tweets containing the configured search term; b) all the tweets from accounts that the authenticated user follows; c) all tweets by specified users; d) direct messages received by the authenticated user; e) twitter events for the authenticated user.
Email Sends the msg.payload as an email, with a subject of msg.topic.
Twitter Twitter out node. Tweets the msg.payload.

Back to Top

Storage

Node Description
File Reads the contents of a file as either a string or binary buffer.
Leveldb Uses LevelDB for a simple key value pair database. Use this node to get, or retrieve the data already saved in the database.
Mongodb2 Calls a MongoDB collection method based on the selected operator. If msg.payload is an array, each element is passed as an arugment.
Sqldbs Allows basic access to a sqldbs database. This node uses the query operation against the configured database. This does allow both INSERTS and DELETES. By it’s very nature it allows SQL injection.
Tail Tail (watches for things to be added) to the configured file.
File Writes msg.payload to a file, either adding to the end or replacing the existing content. Alternatively, it can delete the file.
Leveldb Uses LevelDB for a simple key value pair database. Use this node to put (store) the msg.payload to the named database file, using msg.topic as the key.

Back to Top

Analysis

Node Description
Sentiment Analyzes the property selected, default payload, and adds a sentiment object.

Back to Top

Advanced

Node Description
Feedparse Monitors an RSS/atom feed for new entries. The msg.topic contains the original article link. The msg.payload contains the description, and msg.article contains the complete article object, which has properties such as .title, .summary, .date and so on.
Sunrise Uses the suncalc module to generate an output at sunrise and sunset based on a specified location.
Watch Watches a directory or file for changes. You can enter a list of comma separated directories and/or files. You will need to put quotes “…” around any that have spaces in.
Exec Runs a system command and returns its output.
Increment Increments the msg.payload by 1. Its output is msg.payload+=1

Back to Top

Edge One™

Node Description
CloudPlugs IoT Read data from a CloudPlugs IoT channel or topic.
CloudPlugs IoT Publish data into a CloudPlugs IoT channel/topic.
Edge One Project Data Read real-time data from an Edge One™ Project.
Edge One Project Data Publish data into an Edge One™ Internal Broker topic.
Edge One Project stats Get the statistics of the selected project.
Edge One Project status Get real-time status of the selected project.
Edge One Project events Get the events of the selected project.

Back to Top

Performance

Node Description
Interval Length A node to measure the interval length between messages.
Msg speed A node to measure the flow message speed.

Back to Top

AWS

Node Description
AWS EC2 AWS EC2 functions to Start, Stop, Restart and Describe AWS EC2 instances.
AWS IoT AWS IOT functions to Update, Describe & List things.
AWS Kinesis AWS Kinesis functions to Get and Put into Kinesis Streams.
AWS Lambda Invokes an AWS Lambda function and returns the result.
AWS RDS AWS RDS functions to manage RDS instances.
AWS S3 AWS S3 Get and Put functions.
AWS SNS Send messages to the AWS Simple Notification Service for distribution.
AWS SQS Nodes to Send, Receive, Delete & Purge AWS SQS entries.
AWS Thing Connects to a MQTT broker and publishes msg.payload either to the msg.topic or to the topic specified in the edit window. The value in the edit window has precedence.
AWS Thing MQTT input node. Connects to a broker and subscribes to the specified topic. The topic may contain MQTT wildcards.
AWS DynamoDB AWS DynamoDB functions to Put, Get and Scan DynamoDB records.

Back to Top

Azure IoT Hub and GE Predix

Node Description
Azure_IoT_HUb A simple node that sends the message payloads Azure IoT Hub.
Predix TS This is the data ingest node that allows your to write data into the Predix Timeseries microservices via websocket. The current default websocket endpoint is wss://gateway-predix-data-services.run.aws-usw02-pr.ice.predix.io/v1/stream/messages. To use the node, first add a new Time series client node to connect with Timeseries on Predix.
Predix TS This is the data query node that allows your to query data from the Predix Timeseries microservices. The current default API endpoint prefix is https://time-series-store-predix.run.aws-usw02-pr.ice.predix.io/v1/. To use the node, first add a new Time series client node to connect with Timeseries on Predix.

Back to Top

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