@sterfive/i3x2ua-node

Bring the i3X REST API to Your OPC UA Server

Executive Summary

Your OPC UA servers already hold rich, structured data β€” typed objects, variables, namespaces, historical values. But exposing that data to web applications, AI/ML pipelines, and enterprise systems typically requires custom REST APIs, complex middleware, or expensive integration platforms.

@sterfive/i3x2ua-node eliminates that work. It is a complete implementation of the i3X Beta API specification that translates your OPC UA address space into clean, standardized REST/JSON endpoints. Any developer who can call fetch() gets instant access to your industrial data β€” no OPC UA SDK required.

For decision-makers and system architects, this component delivers:

  • Standards-Based: Implements the CESMII i3X specification β€” the emerging vendor-neutral API standard for smart manufacturing.
  • Zero Separate Infrastructure: Integrates directly into your existing OPC UA server β€” no separate gateway, no additional deployment.
  • Web-Native Access: REST/JSON + Server-Sent Events (SSE). Any language, any platform, any cloud.
  • Accelerated IT/OT Convergence: IT teams consume OPC UA data via standard web APIs, without learning the OPC UA stack.

Architecture

The component is built with a hexagonal (ports & adapters) DDD architecture, ensuring clean separation of concerns and easy extensibility:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    @i3x/app                          β”‚
β”‚             (Composition Root / Wiring)               β”‚
β”‚                                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚  @i3x/rest-server β”‚    β”‚  @i3x/opcua-connector  β”‚ β”‚
β”‚  β”‚  Fastify routes   β”‚    β”‚  node-opcua client      β”‚ β”‚
β”‚  β”‚  INBOUND ADAPTER  β”‚    β”‚  OUTBOUND ADAPTER       β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚           β”‚  uses ports      implements ports        β”‚
β”‚           β–Ό                          β–Ό               β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
β”‚  β”‚                 @i3x/core                        β”‚β”‚
β”‚  β”‚   Domain Models β€” Services β€” Port Interfaces     β”‚β”‚
β”‚  β”‚                ZERO DEPENDENCIES                 β”‚β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
PackageRole
@i3x/corePure domain β€” models, services, port interfaces. Zero external dependencies.
@i3x/opcua-connectorOPC UA adapter β€” implements IDataSourcePort using node-opcua
@i3x/rest-serverFastify REST routes β€” the full i3X API surface
@i3x/appComposition root β€” wires all packages together

The OPC UA β†’ i3X Mapping

The component automatically translates your OPC UA address space into the i3X data model:

OPC UAi3XDescription
ObjectassetA container β€” machine, sensor, subsystem
VariablepropertyA data point β€” temperature, speed, state
MethodactionAn operation β€” Start, Stop, Brew
NamespacenamespaceLogical scope for types and instances
ObjectTypeobjectTypeSchema with JSON Schema definition
ReferencerelationshipTyped link between objects

Stable Element IDs

Element IDs are deterministic SHA1 hashes of namespace-URI-qualified browse paths β€” not volatile OPC UA NodeIds. This means IDs survive server restarts, even when namespace indices shift.


Key Features

Decomposable Asset Model

The component's most powerful feature: query any OPC UA object and receive its entire internal state in a single REST call.

POST /v1/objects/value
{ "elementIds": ["nsu=http://example.org/:CNCMachine"], "maxDepth": 0 }

β†’ {
    "isComposition": true,
    "components": {
      "SpindleSpeed":  { "value": 12000, "quality": "Good", "timestamp": "..." },
      "FeedRate":      { "value": 500,   "quality": "Good", "timestamp": "..." },
      "ToolId":        { "value": 7,     "quality": "Good", "timestamp": "..." }
    }
  }

Set maxDepth to control recursion: 1 = this element only, 0 = infinite depth. The isComposition flag signals whether an element has internal structure.

Smart Monitoring Defaults

The component detects each node's DataType and auto-selects the optimal OPC UA monitoring strategy:

Node TypeStrategy
Boolean / EnumsamplingInterval: 0 (event-driven) β€” catches every transition
Numeric (analog)samplingInterval: 1000, queueSize: 10
CountersamplingInterval: 0, queueSize: 100 β€” no count lost

Full i3X API Surface

Endpoint GroupCapabilities
ExploreBrowse namespaces, object types, objects, relationships
QueryLast known values, historical data with time range filters
UpdateWrite current values, insert historical values
SubscribeCreate subscriptions, register monitored items, SSE stream, sync polling

Real-Time Streaming (SSE)

Subscribe to value changes via Server-Sent Events β€” composite updates with all child properties in a single event stream.

@sterfive/opcua-optimized-client Integration

For high-performance deployments, the component auto-detects and uses the optional @sterfive/opcua-optimized-client module for up to 200% throughput improvement:

  • Intelligent transaction batching
  • Automatic server-limit handling
  • Advanced auto-healing connection logic

No code changes required β€” just install the module and it's detected automatically.


Quick Start

Environment Variables

VariableDefaultDescription
I3X_OPCUA_ENDPOINTopc.tcp://localhost:4840OPC UA server endpoint
I3X_OPCUA_SECURITY_MODENoneNone, Sign, or SignAndEncrypt
I3X_PORT8000HTTP server port
I3X_HOST127.0.0.1Bind address
I3X_SUBSCRIPTION_INTERVAL_SECONDS5Subscription polling interval
I3X_MODEL_PRELOAD_ON_STARTUPtruePreload model on startup
I3X_LOG_LEVELinfoLog level

Run with Docker

docker build -t i3x2ua-node .
docker run -p 8000:8000 \
  -e I3X_OPCUA_ENDPOINT=opc.tcp://your-server:4840 \
  i3x2ua-node

Run in Development

npm install
npm run dev

Extensions & Roadmap

Beyond the i3X Beta specification, we are developing extensions that address known gaps between i3X and OPC UA's full capabilities. These are extensions we would be happy to propose to the i3X standard once they are battle-tested in production.

ExtensionStatusDescription
Command invocationπŸ”œ In developmentPOST /v1/objects/{elementId}/invoke β€” call OPC UA Methods with typed arguments and transactional StatusCode responses
Alarms & ConditionsπŸ”œ RoadmapAlarm lifecycle management via SSE, acknowledgement endpoints, active alarm queries
OPC UA event subscriptionsπŸ”œ RoadmapSubscribe to audit events, state machine transitions, and custom event types
Dynamic model refreshπŸ”œ RoadmapDetect GeneralModelChangeEvent and automatically re-browse changed subtrees
Semantic change detectionπŸ”œ RoadmapDetect SemanticChangeEvent and refresh cached metadata (engineering units, ranges)

Licensing

@sterfive/i3x2ua-node is dual-licensed to fit both open-source and commercial use cases:

LicenseUse CaseRequirements
AGPL-3.0Open-source projects, research, evaluationIf deployed as a network service, your complete source code must be shared under AGPL-3.0
CommercialProprietary / closed-source products, SaaS deploymentsNo copyleft obligations. Includes dedicated support and maintenance.

The AGPL-3.0 restrictions can be lifted by acquiring a commercial license. Contact contact@sterfive.com for pricing and terms.


Related Components

Learn More


Get Started

Ready to bring i3X to your OPC UA infrastructure? Whether you need open-source flexibility or enterprise-grade support, we have you covered.

Contact Sterfive for Licensing & Support or visit sterfive.com for more information.

i3X-to-OPC UA Bridge | Sterfive | Sterfive