I made this api for the university Hochschule Merseburg as a part of my bachelor thesis.
OPC Unified Architecture (OPC UA) is a cross-platform, open-source standard for data exchange from sensors to cloud applications developed by the OPC Foundation. It's one of the most important standards for Industry 4.0.
This api uses node-opcua to act as an OPC UA client and access OPC UA servers.
I designed this api towards the demands and requirements of my professor and the Hochschule Merseburg. So keep that in mind if you may ask yourself why I've done some things this way. OPC UA is a really complex standard with a lot of capabilities that aren't even fully supported by some of the biggest companies in the OPC Foundation. That's why this api is far from a finished state and it may not satisfy all your needs.
To use this api you have to set some process variables:
Name | Description |
---|---|
opcuaDiscoveryServerUrl | URL to the OPC UA Discovery Server |
debug | Set this to any value to see HTTP and WebSocket connections in the console. |
opcuaLocal | Must be set to any value if the api and any of the OPC UA Servers are running on the same machine. |
Right now only UA TCP endpoints with Security Mode Sign and Security Policy Basic256Sha256 are supported.
The username and password must be send via basic access authentication.
Feature | Corresponding OPC UA services | Status |
---|---|---|
Browse the address space | Browse, BrowseNext | 🟢 |
Read attributes | Read | 🟢 |
Write attributes | Write | 🟡 |
History read | HistoryRead | 🟢 |
Call a method | Call | 🟢 |
Subscribe | Subscription Service Set | 🟢 |
Change subscription settings | MonitoredItems Service Set | 🔴 |
Start a Query | QueryFirst, QueryNext | 🔴 |
- The api provides a translated form for most of the attributes, but some are still missing and can only be viewed in their raw form. (InverseName, ArrayDimensions, RolePermissions, UserRolePermissions)
- You can write attributes but OPC UA supports highly complex data structures, that may not be processed by this api right now.
- Give the user the ability to change the subscription settings.
- Queries
- Pagination for the reference resource.
- Support for different authentication methods.
- A better api documentation and description.