Professional Documents
Culture Documents
Node-RED User Manual PDF
Node-RED User Manual PDF
TABLE OF CONTENTS
page 2
WebAccess Engineering Manual Contents
page 3
WebAccess Engineering Manual 28. WebAccess Node-RED
Types Quantity
WebAccess _IO 5
WebAccess_Dashboard 4
WebAccess _Logic 13
WebAccess _Math 15
WebAccess_Conversion 1
WebAccess Node-RED 38
WebAccess Engineering Manual 28. WebAccess Node-RED
28.2.2 WebAccess_Dashboard
Description: User can use the WebAccess_Dashboard node to create the
widget/dashboard format, and import the configured format to the WebAccess
Dashboard.
The function nodes:
(1) BuildinWidget node (input node)
(2) CustomWidget node (input node)
(3) Dashboard node (output node)
(4) WaGroupAid node
28.2.5 WebAccess_Conversion
Description: Data type conversion including:
Integer to Float
Float to Boolean
Float to Integer
Boolean to Integer
Integer to Boolean
The function node:
(1) Conversion node
28.3 Execution
In this chapter, we introduce the functional node of WebAccess Node-RED. This
Guide describes the functionalities, including WebAccess I/O, WebAccess
Dashboard, WebAccess Logic, WebAccess Math, and WebAccess Conversion.
The above figure shows the default workspace of WebAccess Node-RED. On the
left side of the window is the nodes list, which displays icons of nodes that can
be added to the project flow. These icons can be dragged to Workspace, and two
nodes can be wired together by dragging from the output port of one node to
the input port of the other node. Double-clicking on the function node brings up
the edit dialog, which allows users to pass a message through the JavaScript
function. The project flow can be uploaded to the server by clicking the Deploy
button. On the right side of the window is the information and debug tabs. The
properties and a description of the nodes are displayed on the information tab,
and debugging results are displayed on the debug tab. User information is
displayed on the top-right side of the window, and the current WebAccess
project information is shown on the top-left side of the window.
Double click on the function node brings up the edit dialog Edit the function
with JavaScript code.
WebAccess Engineering Manual 28. WebAccess Node-RED
WebAccess Engineering Manual 28. WebAccess Node-RED
3. Tab rename: Double click the tab -> Edit the tab name
For WebAccess Node-RED, there are three cornerstones: the function nodes, the
project flow, and web storage. All device nodes are relations or attributes of this
base. The project flow is a set of the inputs nodes, the function nodes, and the
output node (outcomes).The default project flow management is specified by:
1. Choose the nodes you want to copy -> Open the Sidebar (Ctrl–Space or
via the dropdown menu) -> Export the nodes to the clipboard -> Copy
the code in the function field
WebAccess Engineering Manual 28. WebAccess Node-RED
2. Open the Sidebar (Ctrl–Space or via the dropdown menu) -> Import
the nodes to the clipboard -> Paste the code into the function field.
Flow: The simple flow consists of one input node, one GetProjectList node, and
one debug node.
WebAccess Engineering Manual 28. WebAccess Node-RED
[{
"ID": 5,
"Name": "Express",
}, {
"ID": 1,
"Name": "RptProject",
}]
Flow: The simple flow consists of one input node, one GetScadaList node, and
one debug node.
[{
"NodeName": "RemoteScada",
"Description": ""
}, {
"NodeName": "RptNode",
"Description": ""
}, {
"NodeName": "SCADA",
"Description": ""
}]
Flow: The simple flow consists of one input node, one GetTagList node, and one
debug node.
[{
"Name": "AoTag01",
}, {
"Name": "AoTag02",
}]
Flow: The simple flow consists of one input node, one GetTagValue node, and
one debug node.
WebAccess Engineering Manual 28. WebAccess Node-RED
[{
"name": "RptTagAi001",
"value": "601.00",
"quality": 0,
}, {
"name": "RptTagAi002",
"value": "102.00",
"quality": 0,
"disp": "RptTagAi002"
}, {
"name": "RptTagAi003",
"value": "670.00",
"quality": 0,
"disp": "RptTagAi003"
}]
Flow: The simple flow consists of one input node, one SetTagValue node, and
one debug node.
[{
"name": "RptTagAi001",
"value": "601.00",
"quality": 0,
}, {
"name": "RptTagAi002",
"value": "102.00",
"quality": 0,
"disp": "RptTagAi002"
}, {
"name": "RptTagAi003",
"value": "670.00",
"quality": 0,
"disp": "RptTagAi003"
}]
Mode None/Gmapvalue
Flow: The simple flow consists of one input node, one BuildinWidget node, and
one Dashboard node.
(2) External data source: data from other institute (e.g., The Central Weather
Bureau, CWB). The project flow can listens for a HTTP request from any
source.
Input:
(1) Data from WebAccess: Using the WebAccess IO node to receive data from
WebAccess.
Double click the WebAccess GetTagValue node, and choose the tag you want
to display on the widget.
WebAccess Engineering Manual 28. WebAccess Node-RED
Node-Red provides some function node which can receive data from http
requests, web socket, and the received data applied in the other function node
(e.g., ParseTemp node) to filter the useful property.
Double click the http request node, and edit data source path.
WebAccess Engineering Manual 28. WebAccess Node-RED
For internal and external data source, the format of wiring message must be as
follows.
webaccess: {
name: 'YourName',
value: 100,
time: now
Note - The information of editing the function node (see section 28.3.2).
Widget property setting: The widget properties are different from widget types.
WebAccess Engineering Manual 28. WebAccess Node-RED
Output : Trend, Bar, Area, Gauge, Pie, Text, Google Map Widget
WebAccess Engineering Manual 28. WebAccess Node-RED
Flow: The simple flow consists of one input node, one CustomWidget Node, and
one Dashboard node.
(2) External: Data from other institute (e.g., The Central Weather Bureau,
CWB). The project flow can listens for a HTTP request from any source.
Input:
WebAccess Engineering Manual 28. WebAccess Node-RED
(1) Data from WebAccess: Using the WebAccess IO node to receive data
from WebAccess.
Node-Red provides some function node which can receive data from http
requests, web socket, and the received data applied in the other function node
(e.g., ParseTemp node) to filter the useful property.
For internal and external data source, the format of wiring message must be as
follows.
webaccess: {
name: 'YourName',
value: 100,
time: now
Note - The information of editing the function node (see section 28.3.2).
Flow: The simple flow consists of one input node, some data nodes
(GetTagValue nodes/ HTTP request nodes), one waGroupAid node, and one
BuildinWidget node, and one Dashboard node.
Input:
Note - The information of editing the function node (see section 28.3.2).
Flow: The simple flow consists of one input node, some function nodes, one And
node, and one debug node.
Input:
28.6.2 Or Node
Description: The logical operators “OR” specify the relationship between the
input nodes in a logical expression.
Flow: The simple flow consists of one input node, some function nodes, one Or
node, and one debug node.
Input:
Flow: The simple flow consists of one input node, one function node, one Not
node, and one debug node.
Input:
Flow: The simple flow consists of one input node, some function nodes, one
Equal node, and one debug node.
Input:
Flow: The simple flow consists of one input node, some function nodes, one Not
Equal node, and one debug node.
Input:
Flow: The simple flow consists of one input node, some function nodes, one
XOR-Gate node, and one debug node.
Input:
Flow: The simple flow consists of one input node, some function nodes, one
NAND-Gate node, and one debug node.
Input:
Flow: The simple flow consists of one input node, two function nodes, one Less
Than node, and one debug node.
Input:
Flow: The simple flow consists of one input node, two function nodes, one
Greater Than node, and one debug node.
WebAccess Engineering Manual 28. WebAccess Node-RED
Input:
Flow: The simple flow consists of one input node, two function nodes, one
Greater or Equal node, and one debug node.
Input:
Flow: The simple flow consists of one input node, two function nodes, one Less
Or Equal node, and one debug node.
WebAccess Engineering Manual 28. WebAccess Node-RED
Input:
Flow: The simple flow consists of one input node, some function nodes, one
NOR-Gate node, and one debug node.
Input:
Flow: The simple flow consists of one input node, two function nodes, one
Compare node, and one debug node.
Input:
wiring messages represent the math operand. Output is the calculation result of the
mathematical computation.
Note - The information of editing the function node (see section 28.3.2).
Flow: The simple flow consists of one input node, some function nodes, one ADD
node, and one debug node.
Input:
Flow: The simple flow consists of one input node, two function nodes, one SUB
node, and one debug node.
Input:
Flow: The simple flow consists of one input node, some function nodes, one MUL
node, and one debug node.
WebAccess Engineering Manual 28. WebAccess Node-RED
Input:
Flow: The simple flow consists of one input node, two function nodes, one DIV
node, and one debug node.
Input:
WebAccess Engineering Manual 28. WebAccess Node-RED
Flow: The simple flow consists of one input node, one function node, one SQRT
node, and one debug node.
WebAccess Engineering Manual 28. WebAccess Node-RED
Input:
Flow: The simple flow consists of one input node, some function nodes, one MAX
node, and one debug node.
Input:
WebAccess Engineering Manual 28. WebAccess Node-RED
Output: The largest value in a set of input number (e.g., Max {1, 2, 3} =3)
Flow: The simple flow consists of one input node, some function nodes, one MIN
node, and one debug node.
Input:
WebAccess Engineering Manual 28. WebAccess Node-RED
Output: The smallest value in a set of input number (e.g., Min {1, 2, 3} =1)
Flow: The simple flow consists of one input node, one function node, one EXP
node, and one debug node.
Input:
Flow: The simple flow consists of one input node, one function node, one LOG
node, and one debug node.
Input:
Output: The logarithm of a number to the base you specify (e.g., log 1010=1)
28.7.10 LN Node
Description: Natural logarithm; Use the LN node to calculate the natural
logarithm. (Note: Logarithm base e)
Flow: The simple flow consists of one input node, one function node, one ADD
node, and one debug node.
Input:
Flow: The simple flow consists of one input node, one function node, one ABS
node, and one debug node.
Input:
Flow: The simple flow consists of one input node, some function nodes, one SIN
node, and one debug node.
Input:
Flow: The simple flow consists of one input node, some function nodes, one COS
node and one debug node.
Input:
Output: The cosine of the angle you specify (e.g., cos (-2) =-0.4)
Flow: The simple flow consists of one input node, some function nodes, one TAN
node, and one debug node.
Input:
Output: The tangent of the angle you specify (e.g., tan (-2) =2.19)
Flow: The simple flow consists of one input node, one WebAccess _IO nodes,
one FilterTagValue node, and one debug node.
Input:
[{
"name": "AI01",
"quality": -2,
"value": 0,
"disp": "W4012_CC0096-DI0"
}]
Note - The information of editing the function node (see section 28.3.2).
Flow: The simple flow consists of one input node, one function node, one
Conversion node, and one debug node.
WebAccess Engineering Manual 28. WebAccess Node-RED
Input:
Flow: The simple flow consists of one input node, one function node, one
Conversion node, and one debug node.
Input:
Output: String
Flow: The simple flow consists of one input node, one function node, one
Conversion node, and one debug node.
Input:
Output: Integer
WebAccess Engineering Manual 28. WebAccess Node-RED
Flow: The simple flow consists of one input node, one function node, one
Conversion node, and one debug node.
Input:
Flow: The simple flow consists of one input node, one function node, one
Conversion node, and one debug node.
Input:
Output: String
Flow: The simple flow consists of one input node, one function node, one
Conversion node, and one debug node.
Input:
Flow: The simple flow consists of one input node, one function node, one
Conversion node, and one debug node.
Input:
Output: Integer
28.9 Reference
[1] Node-RED manual, http://nodered.org/docs/