Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... ·...

13
Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 12401078053 Category FAQ SOP Related OS Microsoft Windows7 Abstract WebAccess Cloud Introduction Keyword WebAccess, Rest API, MQTT, NodeRed Related Product N/A Problem Description: This document describes the new WebAccess SCADA structure. WebAccess SCADA has transformed from private cloud to public cloud, and it can also integrate 3 rd party data. In this document, user will also lean the basic concept of Rest API, MQTT and NodeRed. Introduction:

Transcript of Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... ·...

Page 1: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

                                                                                                                                   

                                                                                                                                                Page 1 

Advantech AE Technical Share Document Date  2016 / 3 / 10  SR#  1‐2401078053 

Category  ■ FAQ    □ SOP  Related OS  Microsoft Windows7 

Abstract  WebAccess Cloud Introduction 

Keyword  WebAccess, Rest API, MQTT, Node‐Red 

Related Product  N/A 

 

Problem Description:   

This document describes the new WebAccess SCADA structure. WebAccess SCADA has transformed from 

private cloud to public cloud, and it can also integrate 3rd party data. In this document, user will also lean 

the basic concept of Rest API, MQTT and Node‐Red. 

 

Introduction: 

 

 

 

Page 2: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

1

AgendaAgenda

WebAccess REST API

MQTT Communication

WebAccess Node-RED

1

REST API Function ClassificationREST API Function Classification

Login

Project

Node

Port

Device

Tag

Block

2

Tag Value

Station Status

Data Log

Alarm

Action Log

Page 3: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

2

Developer ManualDeveloper Manual

3

HTTP Request Header for REST APIHTTP Request Header for REST API

User-Agent: Fiddler

Authorization: Basic YWRtaW46d2E=

Content-Type: application/json

Host: wavm.cloudapp.net

4

Page 4: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

3

HTTP Request Body for GetTagValueHTTP Request Body for GetTagValue

{

"Tags": {

[

{ "Name": "A01" },

{ "Name": "A02" }

]

}

}

5

Fiddler – A Web Debugging ToolFiddler – A Web Debugging Tool

6

http://www.telerik.com/fiddler

Page 5: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

4

Programming in HTML/JavascriptProgramming in HTML/Javascript

7

WebAccess CloudWebAccess Cloud

WebAccess/HMI WebAccess/SCADA

WebAccess Cloud

WISE 4000

3rd Party APIs

3rd Party Smart Devices

3rd Party Services

WebAccess Node-RED WebAccessDashboard

Page 6: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

5

MQTT is a publish/subscribe messaging protocol designed for lightweight M2M communications. It was originally developed by IBM and is now an popular standard for IoT.

Why MQTT?Why MQTT?

What is MQTT?What is MQTT?

MQTT Broker

Publisher 1

Publisher 2

Publisher 3

Subscriber 1

Subscriber 2

Subscriber 3

Topic 1

Topic 2

Page 7: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

6

MQTT CommunicationMQTT CommunicationWindows VM

Super SCADA

Cloud Project

WebAccessSCADA

WebAccessHMI

WISE 4000

MQTT Broker

WebSocket MQTT WebSocket MQTT WebSocket MQTT

Data

MQTT Driver (Data)

Config

MQTT Agent (Config)

Command

MQTT over WebSocket AdvantagesMQTT over WebSocket Advantages

Lightweight- portable for embedded device

Efficient- publish/subscribe(event trigger), not polling based

Firewall Friendly- based on HTTP/HTTPS

Security- SSL/TLS support

12

Page 8: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

7

MQTT Connection ParameterMQTT Connection Parameter

Broker IP or Domain

Cloud Project Name

Cloud SCADA Name

Quality of service:QoS 0:

At most once

QoS 1:At least once

QoS 2(not support):Exactly once

Username / Password

SSL/TLS

Example: SCADA MQTT Connection UIExample: SCADA MQTT Connection UI

Page 9: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

8

HiveMQ: 3rd Party WebSocket MQTT ToolHiveMQ: 3rd Party WebSocket MQTT Tool

15

http://www.hivemq.com/demos/websocket-client/

Configuration on CloudConfiguration on Cloud

16

Plug and Play is still in development !!

Page 10: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

9

Node-RED Enter PointNode-RED Enter Point

17

Node-RED EditorNode-RED Editor

18

Page 11: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

10

Node-RED Editor : Built-in NodesNode-RED Editor : Built-in Nodes

19

Nodes ClassificationNodes Classification

I/O- get/set value…

Dashboard- generate dashboard & widget

Conversion- data type transformation

Logic- and, or, not…

Math- add, subtract, multiplication…

20

Page 12: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

11

Coding JavaScript in Node-REDCoding JavaScript in Node-RED

21

Debug MessageDebug Message

22

Page 13: Advantech AE Technical Share Documentdownloadt.advantech.com/ProductFile/Downloadfile2/1... · 2017-08-03 · Page 1 Advantech AE Technical Share Document Date 2016 / 3 / 10 SR# 1‐2401078053

2016/3/22

12

Multiple Data Source, Auto-Generate DashboardMultiple Data Source, Auto-Generate Dashboard

23

3rd Party Data/APIs

Data source can be from 3rd or WebAccess