1.0.4 • Published 6 years ago

green-opcua v1.0.4

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

green-opcua

An OPC-UA client as a service for AWS Greengrass.

Green application CodeFactor

Current version: 1.0.4

Lead Maintainer: Halim Qarroum

Table of contents

Install

green add npm://green-opcua

Features

  • Allows remote provisionning of connection information associated with one or many OPC-UA server.
  • Supports unsecure connections as well as secure connections using Basic128, Basic128Rsa15, Basic192, Basic192Rsa15, Basic256, Basic256Rsa15 or Basic256Sha256 security policies.
  • Supports NONE, SIGN and SIGNANDENCRYPT message security modes.
  • Allows retrieval, mutation and observation of remote OPC-UA variables by Expressify clients.

Description

This application acts as a micro-service OPC-UA client for AWS Greengrass which can connect itself to one or many OPC-UA server instance(s), and receive requests from other green applications to read, be notified of, or update OPC-UA variables.

The API section outlines the different actions green application can request the green-opcua micro-service to perform on its own. The configuration associated with this application and provisionned by applications at the edge or in the cloud is saved in an internal database and is automatically restored when the application is started by AWS Greengrass.

API

This application exposes an Expressify API which is accessible from any green application locally, but also from the AWS IoT Core service from the cloud remotely. The available API endpoints are documented and described below.

MethodResourceReturn code(s)Payload requiredDescription
GET/servers200NoThis route returns the list of servers currently configured on green-opcua, along with their current connectivity state.
GET/servers/:id200NoThis route returns information on the server identified by the given id parameter.
POST/servers200YesThis route can be used by green applications to request green-opcua to connect to a new OPC-UA server, and contains in its associated payload the required information to do so. See the Models section to learn more about expected server objects.
DELETE/servers/:id200NoThis route removes the server associated with the given id parameter from the green-opcua application. Any connection opened to that server will be closed.
GET/servers/:id/container/:node200NoThis route browses and returns information on a the given container node on the server associated with the given id parameter.
GET/servers/:id/variable/:node200NoThis route reads and returns information on a the given variable node on the server associated with the given id parameter.
PUT/servers/:id/node/:node200YesThis route writes the given information associated with the given node node on the server associated with the given id.
SUBSCRIBE/servers/:id/variable/:node200NoThis route allows third party applications to subscribe to the given variable node and receive OPC-UA notifications on the mutation of the information associated with this node.

Events

  • Upon an event associated with a given node variable, green-opcua will send to the subscribed application(s) an event node.changed which will contain the new state of the node variable on the OPC-UA server.

  • Upon a state change associated with a given server, green-opcua will send to the subscribed application(s) an event state.changed which will contain the new state of the server on the OPC-UA server.

See also