About opcua-lua
opcua-lua is Real Time Logic’s OPC UA stack for Lua applications. It is
designed for systems where OPC UA connectivity must live close to the device,
gateway, web server, or embedded application instead of being isolated in a
large external service.
The stack supports the standard OPC UA Client/Server model and OPC UA PubSub over MQTT. This means the same Lua application can expose an address space, connect to another OPC UA server, publish selected values over MQTT, or consume PubSub messages.
Why Lua
Lua is small, embeddable, and fast to iterate with. In Real Time Logic products, Lua also runs inside the Barracuda App Server environment used by Mako Server, Xedge, and Xedge32. This makes it possible to combine industrial automation, device logic, web APIs, dashboards, and deployment scripts in one runtime.
The main benefits are:
- Lightweight embedded design
OPC UA functionality can run in constrained environments and edge devices without the footprint of many native desktop/server stacks.
- Rapid application development
Address-space logic, data sources, authentication callbacks, and PubSub workflows can be scripted and changed quickly.
- No native thread dependency
The client can use non-blocking cosocket mode, allowing asynchronous I/O without one operating-system thread per connection.
- Web and device integration
The same runtime can expose OPC UA data, serve web applications, and connect browser dashboards or cloud services.
- Client/Server and PubSub support
Applications can use browse/read/write/method calls when they need the OPC UA information model, and MQTT PubSub when they need message-based distribution.
Where it fits
opcua-lua is a good fit when the OPC UA layer needs to be part of an
application instead of a separate industrial gateway process.
Common use cases include:
Embedded devices that expose sensor or control data through OPC UA.
Edge gateways that translate local device data into OPC UA and MQTT.
Mako Server applications that combine OPC UA with web APIs or browser-based operator views.
Xedge32 applications that expose ESP32 device state through OPC UA.
Prototypes where the information model, authentication, and data source logic are still changing.
What to read next
Start with OPC UA overview if OPC UA itself is new to you. Read Client/Server vs PubSub over MQTT if you need to decide between a browseable OPC UA server and MQTT PubSub messages.