Difference between revisions of "IoTGateway/Node-Red for GW EIS"

From ESS-WIKI
Jump to: navigation, search
m (change demo video url)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Introduction =
 
= Introduction =
  
[http://nodered.org/ Node-RED] is a visual wiring tool for the Internet of Things and is provided by [https://www.ibm.com/blogs/emerging-technology/ IBM Emerging Technologies]. [http://nodered.org/ Node-Red] has several features, including browser-based flow editing, built on [https://nodejs.org/en/ Node.js] and social development. Because of browser-based, the user can use it more easily. [http://nodered.org/ Node-Red] is based on [https://nodejs.org/en/ Node.js], so user can use its nodes by using JavaScript. [http://nodered.org/ Node-Red] also have many active communities. If the user finds bugs, he can find a solution and fix it easily. The user can use JSON format string to import or export the created flow easily.<br/>RMM server provides many [https://en.wikipedia.org/wiki/Representational_state_transfer restful API]. But some API is maybe required complex parameter, it usually makes the user to call [https://en.wikipedia.org/wiki/Representational_state_transfer restful API] more difficultly. Hance RMM team creates several common nodes in [http://nodered.org/ Node-Red]. These nodes can help the user to use [https://en.wikipedia.org/wiki/Representational_state_transfer restful API] that RMM server provided more easily and fast.
+
[http://nodered.org/ Node-RED] is a visual wiring tool for the Internet of Things and is provided by [https://www.ibm.com/blogs/emerging-technology/ IBM Emerging Technologies]. [http://nodered.org/ Node-Red] has several features, including browser-based flow editing, built on [https://nodejs.org/en/ Node.js] and social development. Because of browser-based, the user can use it more easily. [http://nodered.org/ Node-Red] is based on [https://nodejs.org/en/ Node.js], so user can use its nodes by using JavaScript. [http://nodered.org/ Node-Red] also have many active communities. If the user finds bugs, he can find a solution and fix it easily. The user can use JSON format string to import or export the created flow easily.<br/>A lot of useful nodes are provided by Advantech NodeRed Server IoTGateway installer, including [[SW_Service/Node-Red_for_SW_Service#node-red-contrib-flow-dispatcher|node-red-contrib-flow-dispatcher]], [[SW_Service/Node-Red_for_SW_Service#node-red-contrib-susi|node-red-contrib-susi]] and [[SW_Service/Node-Red_for_SW_Service#node-red-contrib-virtual-app-node|node-red-contrib-virtual-app-node]]. In this section, we are gonna introduce another two node groups, ui-flow-creator and&nbsp;WISE-PaaS-RMM. ui-flow-creator&nbsp;provides nodes to&nbsp;quickly, easily and automatically&nbsp;generate flows to&nbsp;represent&nbsp;dashboard for Advantech platforms supported by SUSIIoT.&nbsp;WISE-PaaS-RMM nodes make communications between NodeRED nodes and RMM agent can be easily achieved.
 
+
<p style="text-align: center;">[[File:Node-RED Server Iot Gateway Sample.png|800px|Node-RED Server Iot Gateway Sample.png]]</p>
<br/>[[File:NodeRedSample.png|800px|NodeRedSample.png]]
 
 
 
 
 
  
 
= Node-Red Plug-ins Catogries =
 
= Node-Red Plug-ins Catogries =
  
[[File:Node-RED Nodes for IoTGW EIS.png|Node-RED_Nodes_for_IoTGW.jpg]]
+
[[File:Node-RED Nodes for IoTGW EIS.png|320px|Node-RED_Nodes_for_IoTGW.jpg]]
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 17: Line 14:
 
! Nodes
 
! Nodes
 
|-
 
|-
| style="white-space: nowrap;" | UI-Flow-Creator
+
| UI-Flow-Creator
| Provid &nbsp;functions to auto-generate a dashboard flow with [https://github.com/node-red/node-red-dashboard node-red-dashboard] nodes.&nbsp;UI-Flow-Creator nodes depend on [https://github.com/ADVANTECH-Corp/node-SUSI node-susi] and [https://github.com/ADVANTECH-Corp/node-SUSIIoT node-susiiot] packages to read data and control devices.
+
| Provid &nbsp;functions to auto-generate a flow with [https://github.com/node-red/node-red-dashboard node-red-dashboard] nodes to represent a device dashboard.<br/>UI-Flow-Creator nodes depend on [https://github.com/ADVANTECH-Corp/node-SUSI node-susi] and [https://github.com/ADVANTECH-Corp/node-SUSIIoT node-susiiot] packages to read data and control devices.
 
| 1.nr_ui_flow_creator<br/>2.ui_ui_creator_ctrl
 
| 1.nr_ui_flow_creator<br/>2.ui_ui_creator_ctrl
 
|-
 
|-
| WISE-Cloud
+
| style="white-space: nowrap;" | WISE-PaaS-RMM
 
|  
 
|  
<span style="line-height: 1.6;">WISE-Cloud provide nodes&nbsp;to communicate&nbsp;with [[WISE-PaaS/RMM_Agent|RMM Agent]].&nbsp;Sending data to agent, receiving messages from agent and response RMM RESTful requests.</span>
+
WISE-PaaS-RMM<span style="line-height: 1.6;">provides nodes&nbsp;to communicate&nbsp;with [[WISE-PaaS/RMM_Agent|RMM Agent]].&nbsp;Sending data to agent, receiving messages from agent and response RMM RESTful requests.</span>
  
 
| style="white-space: nowrap;" |  
 
| style="white-space: nowrap;" |  
1.WISE-Cloud-Sender<br/>2.WISE-Cloud-Receiver<br/>3.WISE-Cloud-Responder
+
1.WISE-PaaS-RMM-Sender<br/>2.WISE-PaaS-RMM-Receiver<br/>3.WISE-PaaS-RMM-Responder
  
 
|}
 
|}
Line 32: Line 29:
 
= NodeRed Plug-ins Description =
 
= NodeRed Plug-ins Description =
  
{|
+
{| class="wikitable"
 
|-
 
|-
 
! Node Name
 
! Node Name
 
! Description
 
! Description
! Input
+
! style="width: 17%;" | Input
! Output
+
! style="width: 17%;" | Output
 
|-
 
|-
| Alljoyn Actions
+
| nr_ui_flow_creator
| Get action descriptions from any Alljoyn services and perform action via remote call
+
| Auto-generate flow with node-red-dashboard nodes to represent the device dashboard according to user selected groups.<br/>Require [https://github.com/ADVANTECH-Corp/node-SUSI node-susi] and [https://github.com/ADVANTECH-Corp/node-SUSIIoT node-susiiot] packages.
| A timer or button triggered events.
+
| Auto-generated an inject node after flow deployment.
| Outputs a&nbsp;'''msg'''&nbsp;containing&nbsp;'''msg.topic'''&nbsp;which defaults to the sensor name, and&nbsp;'''msg.payload'''containing the reading.<br/>
+
| Auto-generated outputs according to user selected groups after flow deployment.
 
|-
 
|-
| Alljoyn ControlPanel (In)
+
| nr_ui_creator_ctrl
| Node to get/set the property of Alljoyn
+
| Control devices according injected values&nbsp;.<br/>Require [https://github.com/ADVANTECH-Corp/node-SUSI node-susi] and [https://github.com/ADVANTECH-Corp/node-SUSIIoT node-susiiot] packages.
| A timer or button triggered events.
+
| SUSIIoT control information in <span style="color:red">'topic'</span> propery and control value in <span style="color:red">'payload'</span> property.
| Outputs a&nbsp;'''msg'''&nbsp;containing&nbsp;'''msg.payload'''containing the JSON description of reading or result.<br/>
+
| Control result returned by SUSIIoT.
 
|-
 
|-
| Alljoyn Control Panel ( Out )
+
| WISE-PaaS-RMM-Sender
| Node to get/set the property of Alljoyn
+
|  
| A timer or button triggered events.
+
Send injected IPSO JSON string to [[WISE-PaaS/RMM_Agent|RMM agent]].
| Outputs a&nbsp;'''msg'''&nbsp;containing&nbsp;'''msg.payload'''containing the JSON description of reading or result
+
 
 +
| A <span style="color:red">string</span> in <span style="color:red">'payload'</span> property which will be passed to RMM agent.<br/>
 +
| None
 
|-
 
|-
| wsn gw
+
| WISE-PaaS-RMM-Receiver
| Node to get the information and set functions of a Advantech WSN gateway platform,triggered by an input message. Outputs a msg with msg.payload containing the JSON description of reading or result. During configuration, it will automatically detect available options for Network, Category, and Attribute in real time.<br/>
+
|  
| A timer or button triggered events.
+
Receive messages from [[WISE-PaaS/RMM_Agent|RMM agent]] with specified name and topics.
| Connectivity information with JSON string format.
 
|-
 
| wsn senhub
 
| Node to get the information and set functions of a remote SensorHub (ex. WISE-1020) controlled by Advantech WSN gateway platform, triggered by an input message. Outputs a msg with msg.payload containing the JSON description of reading or result. During configuration, it will automatically detect available options for Network, on-line sensorhub, and Attribute in real time.<br/>
 
| A timer or button triggered events.<br/>
 
| Sensor Hub and Sensor information with JSON string format.
 
|}
 
 
 
 
 
  
= Demo Video Clips =
+
| None
 
+
| The received message (or RESTful request) from RMM agent is included in <span style="color:red">'req'</span> property.
{|
 
|-
 
! Video Demo Title
 
! Link
 
|-
 
| IoTGW Node-RED - Alljoyn Control Panel and Action on Node-RED demo
 
| [https://www.youtube.com/watch?v=ZqjQ4C-787w&feature=youtu.be link]<br/>
 
 
|-
 
|-
| IoTGW Node-RED - WSN senhub node Demo
+
| style="white-space: nowrap;" | WISE-PaaS-RMM-Responder
 
|  
 
|  
[https://www.youtube.com/watch?v=-7inIBghIxE&feature=youtu.be link]
+
Response RESTful requests. The injected data must contain the source request information.
  
 +
| Source request is included in <span style="color:red">'req'</span> property and the corresponding response is in <span style="color:red">'rep'</span> property.
 +
| None
 
|}
 
|}
  
 +
= Demo Video Clips =
  
 
+
{| class="wikitable"
= Usage Example =
 
 
 
{|
 
 
|-
 
|-
! Example
+
! Video Demo Title
 
! Link
 
! Link
 
|-
 
|-
| Get SenHub List
+
| style="padding-left: 1em;padding-right: 1em;" | NodeRED server IoT gateway installation and demonstration<br/>
|
+
| style="padding-left: 1em;padding-right: 1em;" | [https://www.youtube.com/watch?v=pJxf92nhcXA&feature=youtu.be link]<br/>
[http://ess-wiki.advantech.com.tw/view/IoTGateway/Node-Red#Example:_Get_SensorHub_List link]
 
 
 
|-
 
| Get CO2 Reading
 
|
 
[http://ess-wiki.advantech.com.tw/view/IoTGateway/Node-Red#Example:_Get_CO2_Reading link]
 
 
 
|-
 
| Connect to Freeboard
 
|
 
[http://ess-wiki.advantech.com.tw/view/IoTGateway/Node-Red#Connect_to_Freeboard link]
 
 
 
 
|}
 
|}

Latest revision as of 05:45, 16 February 2017

Introduction

Node-RED is a visual wiring tool for the Internet of Things and is provided by IBM Emerging Technologies. Node-Red has several features, including browser-based flow editing, built on Node.js and social development. Because of browser-based, the user can use it more easily. Node-Red is based on Node.js, so user can use its nodes by using JavaScript. Node-Red also have many active communities. If the user finds bugs, he can find a solution and fix it easily. The user can use JSON format string to import or export the created flow easily.
A lot of useful nodes are provided by Advantech NodeRed Server IoTGateway installer, including node-red-contrib-flow-dispatcher, node-red-contrib-susi and node-red-contrib-virtual-app-node. In this section, we are gonna introduce another two node groups, ui-flow-creator and WISE-PaaS-RMM. ui-flow-creator provides nodes to quickly, easily and automatically generate flows to represent dashboard for Advantech platforms supported by SUSIIoT. WISE-PaaS-RMM nodes make communications between NodeRED nodes and RMM agent can be easily achieved.

Node-RED Server Iot Gateway Sample.png

Node-Red Plug-ins Catogries

Node-RED_Nodes_for_IoTGW.jpg

Category Description Nodes
UI-Flow-Creator Provid  functions to auto-generate a flow with node-red-dashboard nodes to represent a device dashboard.
UI-Flow-Creator nodes depend on node-susi and node-susiiot packages to read data and control devices.
1.nr_ui_flow_creator
2.ui_ui_creator_ctrl
WISE-PaaS-RMM

WISE-PaaS-RMMprovides nodes to communicate with RMM Agent. Sending data to agent, receiving messages from agent and response RMM RESTful requests.

1.WISE-PaaS-RMM-Sender
2.WISE-PaaS-RMM-Receiver
3.WISE-PaaS-RMM-Responder

NodeRed Plug-ins Description

Node Name Description Input Output
nr_ui_flow_creator Auto-generate flow with node-red-dashboard nodes to represent the device dashboard according to user selected groups.
Require node-susi and node-susiiot packages.
Auto-generated an inject node after flow deployment. Auto-generated outputs according to user selected groups after flow deployment.
nr_ui_creator_ctrl Control devices according injected values .
Require node-susi and node-susiiot packages.
SUSIIoT control information in 'topic' propery and control value in 'payload' property. Control result returned by SUSIIoT.
WISE-PaaS-RMM-Sender

Send injected IPSO JSON string to RMM agent.

A string in 'payload' property which will be passed to RMM agent.
None
WISE-PaaS-RMM-Receiver

Receive messages from RMM agent with specified name and topics.

None The received message (or RESTful request) from RMM agent is included in 'req' property.
WISE-PaaS-RMM-Responder

Response RESTful requests. The injected data must contain the source request information.

Source request is included in 'req' property and the corresponding response is in 'rep' property. None

Demo Video Clips

Video Demo Title Link
NodeRED server IoT gateway installation and demonstration
link