OPC UA Technology Demonstration

Using OPC UA with JavaScript, JSON and simple REST like APIs.

OPC UA has a layered architecture that is designed to be independent of the implementation technology. Many of the OPC UA stacks have been designed with pluggable apis that make it easy to add support for new transports and data encodings. This website provides a demonstration of how to develop OPC UA applications using HTTPS with JSON messages.

This website interacts with an instance of the ReferenceServer which is available as part of the UA-.NETStandard codebase. The website server is configured to forward web requests to the HTTPS endpoint on this server.

The code used to build this website is also on GitHub.

Questions and feedback can be provided on the forum.

This website uses an OAuth2 server associated with a WordPress instance. All HTTP requests will fail with the BadUserIdentityTokenRejected error until the web application acquires an authorization token from the OAuth server. This happens when the use clicks the 'Login' button at the top right. The following figure illustrates the process:

Login Sequence Diagram

Logging requires a user with access to the WordPress intance. Two test accounts have been created with the password 'password':

  • Alice
  • Bob
More information about OPC UA support for OAuth2 can be found here.

The JSON encoding used by these pages is defined in Part 6 of the OPC UA Specification. The Read, Write, Call and Subscribe services are defined in Part 4.

The demonstration has 4 pages that illustrate common tasks OPC UA clients need to do: