---
title: "node-red-contrib-opcua • FlowFuse Integrations"
description: "node-red-contrib-opcua: A Node-RED node to communicate via OPC UA based on node-opcua library."
canonical_url: "https://flowfuse.com/integrations/node-red-contrib-opcua/"
meta:
  "og:description": "node-red-contrib-opcua: A Node-RED node to communicate via OPC UA based on node-opcua library."
  "og:title": "node-red-contrib-opcua • FlowFuse Integrations"
---

> Index of every page on this site: [llms.txt](https://flowfuse.com/llms.txt)

# **node-red-contrib-opcua**

A Node-RED node to communicate via OPC UA based on node-opcua library.

**Version:** 0.2.355**Weekly Downloads:** 7,161**Author:**Mika Karaila**Updated:** Aug 26, 2026

[![NPM download](https://img.shields.io/npm/dm/node-red-contrib-opcua.svg)](http://www.npm-stats.com/~packages/node-red-contrib-opcua) [![NPM version](https://badge.fury.io/js/node-red-contrib-opcua.png)](http://badge.fury.io/js/node-red-contrib-opcua)

![Node-RED OPC UA](http://b.repl.ca/v1/Node--RED-OPC_UA-blue.png)

# node-red-contrib-opcua

![opcuanodeLogo64](https://raw.githubusercontent.com/mikakaraila/node-red-contrib-opcua/master/images/opcuanodeLogo64.png)

A [Node-RED](http://nodered.org) nodes to communicate or serve via [OPC UA](https://www.npmjs.com/package/node-opcua).

based on [node-opcua](http://node-opcua.github.io/)

![nodeopcua64](https://raw.githubusercontent.com/mikakaraila/node-red-contrib-opcua/master/images/nodeopcua64.png)

## Install

Run command on Node-RED installation directory.

```
npm install node-red-contrib-opcua
```

or run command for global installation.

```
npm install -g node-red-contrib-opcua
```

## Usage

Use OpcUa-Item to define variables. Use OpcUa-Client to read / write / subscribe / browse OPC UA server.

See some flows under folder !\[examples]. Updated server sub-flow example OPCUA-TEST-NODES.json look commands: addFolder, addVariable, addMethod, setFolder. Added new opcua-rights node to set folder/variable access level and role & permissions.

Here you got some ready to use examples. You can use the Import in Node-RED in the right upper corner menu.

![node-red-opcua-flow](https://raw.githubusercontent.com/mikakaraila/node-red-contrib-opcua/master/images/Example.png)

Examples are available for Schneider IGSS and Prosys Simulation Server as Node-RED flow. Search for OPC UA on: http://flows.nodered.org/

![node-red-opcua-flow-Prosys](https://raw.githubusercontent.com/mikakaraila/node-red-contrib-opcua/master/images/PROSYS-OPC-UA-EXAMPLE2.png)

![New method node example](https://raw.githubusercontent.com/mikakaraila/node-red-contrib-opcua/master/images/PROSYS-OPCUA-METHOD-EXAMPLE.png)

![Events example](https://raw.githubusercontent.com/mikakaraila/node-red-contrib-opcua/master/images/PROSYS-OPCUA-EVENTS-EXAMPLE.png)

## Message parameters

## Input message

| ****Property**** | ****Function/Value**** | ****Notes**** |
| --- | --- | --- |
| payload | set interval for subscription or monitorItem | |
| interval | Subscription interval | |
| queueSize | Subscription queue size | |
| deadbandType | "a" abs. or "p" percent | Action monitor |
| deadbandValue | integer for deadband | Action monitor |
| topic | NodeId and DataType in format ns=3;s=Counter;datatype=Int32 | |
| action | subscribe | nodeId / variable |
|  | unsubscribe | nodeId / variable |
|  | deletesubscription | subscription |
|  | browse | nodeId / folder |
|  | info | nodeId |
|  | read | nodeId |
|  | write | nodeId & value |
|  | monitor | deadbandtype abs/pro |
|  | events | nodeId |
|  | readmultiple | \[nodeId + datatype] |
|  | writemultiple | \[nodeId + datatype + value] |

readmultiple to readmultiple items writemultiple to write multiple items clearitems to empty multiple items (readmultiple / writemultiple)

NOTE: With datatype=xxxArray msg.payload.range = "2:4" can used as indexRange to read/write partial array

## Output message

| ****Property**** | ****Function/Value**** | ****Notes**** |
| --- | --- | --- |
| payload | dataValue.value.value | |
| statusCode | OPC UA StatusCode | |
| sourceTimestamp | Source timestamp | |
| serverTimestamp | Server´s timestamp | |

Release history (only couple of older releases):

**v0.2.223**

Fixed: Namespace index used with variables (set value).  
 Enhancements: Initial value can be set to server variable, server returns nodeId as variable created. Added support for StringArray.

**v0.2.117**

Enhancement: Added users to server. Users.json contains username, password and role for each user.  

**v0.2.116**

Enhancement: server allow anonymous, added verbose to show trusted/rejected folders.  

**v0.2.115**

Enhancement: server node security settings; mode and policy  

**v0.2.114**

Fix: added to client certificate manager  

**v0.2.113**

Enhancement: server commands: registerNamespace and getNamespaceIndex, user can addVariables with registered namespaces like ns=5.  
 Enhancement: msg.topic = readmultiple AND msg.payload = ALL then msg.payload = values  

**v0.2.112**

Added DateTime to server.  

**v0.2.111**

Fixed DateTime conversion (write).  

**v0.2.110**

Added 2D and 3D array support. Examples:  
 ns=1;s=Float2D;datatype=FloatArray\[5,5]  
 ns=1;s=Float3D;datatype=FloatArray\[5,5,5]  
 NOTE: Write range uses msg.range  
 New feature msg.payload.range can be used to read part of Array  
 New feature msg.range can be used to write part of Array  
 Updated example OPCUA-TEST-NODES.json  

**v0.2.109**

Added array range examples (examples/OPCUA-TEST-NODES.json).  
 Send only if payload contains something.  
 Added msg.payload.range usage  
 New feature msg.payload.range can be used to read/write part of Array  
 Fix: FQDN -> hostname in makeAplicationUri  
 EventId and statustext as clear string  
 EventId as hex string  

**v0.2.108 and older**

Fixed support for server Array variables  
 Browse will create topic and datatype thus output can be connected. Next node can progress output msg.  
 Refactored browse action fast and simple  
 Merged event payload fix. Merge pull request #265 from list3f/master  
 Put OPC UA event data in msg.payload  

\# Advanced examples - needed from users (add links to examples folder)

# Authors

- since 2015 [Mika Karaila](https://github.com/mikakaraila)
- since 2016 [Klaus Landsdorf](https://github.com/biancode)

## Testing

```
karma start opcua.conf.js --log-level debug --single-run
```

## TBD List

| ****Nodes**** | ****Function**** | ****Done**** |
| --- | --- | --- |
| All |  | |
|  | Project structure | :white\_check\_mark: |
|  | Async calls | :waxing\_crescent\_moon: |
|  | UnitTesting | :new\_moon: |
|  | Documentation | :first\_quarter\_moon: |
| Item |  | :white\_check\_mark: |
| Browser |  | |
|  | Browse | :white\_check\_mark: |
|  | Simple UI interface | :first\_quarter\_moon: |
| Client |  | |
|  | Read | :white\_check\_mark: |
|  | Read Multiple | :white\_check\_mark: |
|  | Write | :white\_check\_mark: |
|  | Write Multiple | :white\_check\_mark: |
|  | Subscribe | :white\_check\_mark: |
|  | Unsubscribe | :white\_check\_mark: |
|  | DeleteSubscription | :white\_check\_mark: |
|  | Info | :white\_check\_mark: |
|  | Browse | :white\_check\_mark: |
|  | AE | :new\_moon: |
|  | reconnect on error | :waxing\_crescent\_moon: |
| Server |  | |
| Commands |  | |
|  | Restart | :white\_check\_mark: |
|  | Add Folder | :white\_check\_mark: |
|  | Set Folder | :white\_check\_mark: |
|  | Add Variable | :white\_check\_mark: |
|  | Add Object | :new\_moon: |
|  | Add Method | :new\_moon: |
|  | Add Equipment | :first\_quarter\_moon: |
|  | Add PhysicalAssets | :first\_quarter\_moon: |
|  |  | |
|  | Delete by NodeId | :white\_check\_mark: |
| Examples |  | |
|  | Methods | |
|  | Structures | |
|  | Variables | |
|  | Objects | |
|  | AE | |
|  |  | |
| Alarm and Events |  | |
|  | Subscribe | :white\_check\_mark: |
|  |  | |

[EMOJI CHEAT SHEET](http://www.emoji-cheat-sheet.com/)

## **Installation **

Install in Node-RED via the [**palette manager**](https://flowfuse.com/docs/node-red/getting-started/library/#using-the-palette-manager).

![Node-RED Palette Manager dialog with the node selected and the Install button visible.](https://flowfuse.com/images/integrations/palette-manager-install.png)

## **Quick Stats**

Current Version**0.2.355**

Weekly Downloads**7,161**

First Published**Oct 7, 2015**

Last Updated**Aug 26, 2026**

## **GitHub Stats**

[Open Issues ![GitHub Issues](https://img.shields.io/github/issues/mikakaraila/node-red-contrib-opcua.svg?style=flat-square)](https://github.com/mikakaraila/node-red-contrib-opcua/issues) [ Stars ![GitHub Stars](https://img.shields.io/github/stars/mikakaraila/node-red-contrib-opcua.svg?style=flat-square)](https://github.com/mikakaraila/node-red-contrib-opcua/stargazers) [ Forks ![GitHub Forks](https://img.shields.io/github/forks/mikakaraila/node-red-contrib-opcua.svg?style=flat-square)](https://github.com/mikakaraila/node-red-contrib-opcua/network/members)

## **External Resources**

[View on NPM](https://www.npmjs.com/package/node-red-contrib-opcua) [ View Repository](https://github.com/mikakaraila/node-red-contrib-opcua)

## **Need Help?**

Get professional support for your Node-RED projects with FlowFuse.

[**Contact Us**](https://flowfuse.com/contact-us/)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://flowfuse.com/#website","@type":"WebSite","description":"FlowFuse builds your first industrial solution with your team, proves it at one plant, then helps you roll it out to every plant, faster each time.","inLanguage":"en","name":"FlowFuse","url":"https://flowfuse.com/","alternateName":["FlowForge","Flow Fuse"],"publisher":{"@id":"https://flowfuse.com/#identity"}},{"@id":"https://flowfuse.com/integrations/node-red-contrib-opcua/#webpage","@type":"WebPage","description":"node-red-contrib-opcua: A Node-RED node to communicate via OPC UA based on node-opcua library.","name":"node-red-contrib-opcua","url":"https://flowfuse.com/integrations/node-red-contrib-opcua/","isPartOf":{"@id":"https://flowfuse.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://flowfuse.com/integrations/node-red-contrib-opcua/"]}],"primaryImageOfPage":{"@id":"https://flowfuse.com/#logo"}},{"@id":"https://flowfuse.com/#identity","@type":"Organization","legalName":"FlowFuse Inc.","name":"FlowFuse","url":"https://flowfuse.com","alternateName":["FlowForge","Flow Fuse"],"logo":{"@id":"https://flowfuse.com/#logo"},"sameAs":["https://twitter.com/FlowFuseinc","https://github.com/FlowFuse","https://www.linkedin.com/company/flowfuse/","https://www.facebook.com/FlowFuse/","https://www.youtube.com/channel/UCbBzP8NZbv3WDtlt4UouA-g"]},{"@id":"https://flowfuse.com/#logo","@type":"ImageObject","caption":"FlowFuse","contentUrl":"https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png","inLanguage":"en","url":"https://flowfuse.com/handbook/images/logos/ff-logo--square--dark.png"}]}
```

## Sitemap

See the full [sitemap](https://flowfuse.com/sitemap.md) for all pages.
