@node-i3x/demo-embedded
v0.5.4
Published
End-to-end demo: OPC UA server + i3X REST API wired via PseudoSession
Readme
@node-i3x/demo-embedded
See i3X in action -- OPC UA + REST API in 30 seconds.
Quick Start
npx @node-i3x/demo-embeddedThat's it. In ~5 seconds you get:
- An OPC UA server with a simulated Smart Factory (Pump, Heater, Conveyor)
- i3X REST API at http://localhost:8080
- Live-updating simulated sensor values
Try the API
# Health check
curl http://localhost:8080/health
# Server info
curl http://localhost:8080/v1/info
# List namespaces
curl http://localhost:8080/v1/namespaces
# Browse objects
curl -X POST http://localhost:8080/v1/objects/listLive Dashboard
In a second terminal, launch the ANSI dashboard client:
npx @node-i3x/demo-embedded --clientOr point it at any running i3X server:
npx @node-i3x/demo-embedded --client --url http://my-server:8080(Note: the --client flag is for future use; for now run the client separately with npx tsx src/client.ts)
Options
| Option | Default | Description |
|---|---|---|
| --rest-port <port> | 8080 | REST API port |
| --opcua-port <port> | 48410 | OPC UA server port |
| -h, --help | | Show help |
What's Inside
The demo creates a simulated Smart Factory with three assets:
| Asset | Variables | Update Rate | |---|---|---| | Main Coolant Pump | Temperature, Pressure, FlowRate, Running | 800ms | | Process Heater | Temperature, HeaterOn, Setpoint, Power | 1000ms | | Assembly Conveyor | Speed, ItemCount | 1200ms |
Values drift realistically -- temperature rises, pressure fluctuates, the heater toggles every 15 seconds.
How It Works
This demo uses @node-i3x/pseudo-session-connector to wire the i3X domain services directly to the OPC UA AddressSpace in memory. No network roundtrip -- microsecond latency.
See the Embedding Tutorial for a step-by-step guide.
License
Dual-licensed:
- AGPL-3.0-or-later -- you may use, modify, and distribute this software freely, provided that all derivative works and network-accessible deployments also make their complete source code available under the AGPL.
- Sterfive Commercial License -- allows proprietary and closed-source use without copyleft obligations.
See LICENSING.md for details, or contact Sterfive for commercial licensing.
