# NODE-Red , OPC-UA, CODESYS , UA EXPERT

**URL:** <https://forumautomation.com/t/node-red-opc-ua-codesys-ua-expert/14179>\
**Category:** Industrial Automation\
**Tags:** opc-ua\
**Created:** [June 6, 2026, 5:54am UTC](https://forumautomation.com/t/node-red-opc-ua-codesys-ua-expert/14179 "2026-06-06T05:54:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdullah\_Khanzada](https://forumautomation.com/user_avatar/forumautomation.com/abdullah_khanzada/32/8954_2.png) [@Abdullah\_Khanzada](https://forumautomation.com/u/Abdullah_Khanzada)\
**Post date:** [June 6, 2026, 5:54am UTC](https://forumautomation.com/t/node-red-opc-ua-codesys-ua-expert/14179/1 "2026-06-06T05:54:32Z")

</div>

Hi everyone,

I am trying to read a simple Boolean variable from a CODESYS V3 PLC (SoftPLC on Windows) into Node-RED using node-red-contrib-opcua, but I am consistently getting undefinedas the payload, even though the session seems to be connected.

**My Setup:**

- **PLC:** CODESYS Control Win V3 x64
- **Node-RED:** Running locally.
- **Library:** node-red-contrib-opcua
- **Auth Method:** Anonymous (Allowed in CODESYS Runtime Security Policy).
- **UaExpert:** Works perfectly. I can connect Anonymously and read/write the variables without issue.

**The Problem:** In Node-RED, the OpcUa-Clientnode connects successfully (I see the “Session active” status and the log userIdentity is ANONYMOUS). However, whenever I try to **READ** a variable, the debug node shows msg.payload : undefined.

**What I have tried so far:**

1. **Verified NodeID:** I copied the NodeID directly from UaExpert.

- _Example:_ ns=4;s=|var|CODESYS Control Win V3 x64.Application.PLC\_PRG.xStart

1. **Checked Namespace Index:**

- UaExpert showsns=4 .
- Node-REDOpcUa-Browser node shows objects at ns=2.
- I have tried forcing the inject topic to use ns=2, ns=3, and ns=4. All returns undefined.

1. **Direct Inject Method:**

- I bypassed the “Item” node and injected msg.topicdirectly into the Client node set to READ. Quiet undefined.

1. **Standard Server Test:**

- I tried reading the standard OPC UA ServerState variable ( ns=0;i=2259).
- **Result:** undefined .

**Logs/Output:** Node-RED Debug window shows:

Plain text

“userIdentity is ANONYMOUS” msg.payload : undefined

**Question:** Since UaExpert works with Anonymous, but Node-RED gets undefined even for standard server variables does CODESYS treat the Node-RED “Anonymous” session differently? Do I need to manually trust a certificate even for Anonymous login, or is there a specific setting in CODESYSControl.cfgI am missing?

Any help would be appreciated!
