green-opcua v1.0.4
green-opcua
An OPC-UA client as a service for AWS Greengrass.
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
orBasic256Sha256
security policies. - Supports
NONE
,SIGN
andSIGNANDENCRYPT
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.
Method | Resource | Return code(s) | Payload required | Description |
---|---|---|---|---|
GET | /servers | 200 | No | This route returns the list of servers currently configured on green-opcua , along with their current connectivity state. |
GET | /servers/:id | 200 | No | This route returns information on the server identified by the given id parameter. |
POST | /servers | 200 | Yes | This 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/:id | 200 | No | This 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/:node | 200 | No | This route browses and returns information on a the given container node on the server associated with the given id parameter. |
GET | /servers/:id/variable/:node | 200 | No | This route reads and returns information on a the given variable node on the server associated with the given id parameter. |
PUT | /servers/:id/node/:node | 200 | Yes | This route writes the given information associated with the given node node on the server associated with the given id . |
SUBSCRIBE | /servers/:id/variable/:node | 200 | No | This 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 eventnode.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 eventstate.changed
which will contain the new state of the server on the OPC-UA server.
See also
- The green-cli command-line tool.
- The node-opcua client for Node.js.
- The green-sdk software development kit for green applications.
- The Expressify framework.