Have ideas to improve npm?Join in the discussion! »

node-red-contrib-opcua

0.2.109 • Public • Published

NPM download NPM version

Node-RED OPC UA

node-red-contrib-opcua

opcuanodeLogo64

A Node-RED nodes to communicate or serve via OPC UA.

based on node-opcua

nodeopcua64

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 Examples. Updated server sub-flow example OPCUA-TEST-NODES.json look commands: addFolder, AddVariable, setFolder.

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

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

New method node example

Events example

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.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.109 Added array range examples (examples/OPCUA-TEST-NODES.json). Send only if payload contains something. Added msg.range usage New feature msg.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, version++ 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

Testing

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

TBD List

Nodes Function Done
All
Project structure
Async calls 🌒
UnitTesting 🌑
Documentation 🌓
Item
Browser
Browse
Simple UI interface 🌓
Client
Read
Read Multiple
Write
Write Multiple
Subscribe
Unsubscribe
DeleteSubscription
Info
Browse
AE 🌑
reconnect on error 🌒
Server
Commands
Restart
Add Folder
Set Folder
Add Variable
Add Object 🌑
Add Method 🌑
Add Equipment 🌓
Add PhysicalAssets 🌓
Delete by NodeId
Examples
Methods
Structures
Variables
Objects
AE
Alarm and Events
Subscribe

EMOJI CHEAT SHEET

Install

npm i node-red-contrib-opcua

DownloadsWeekly Downloads

1,048

Version

0.2.109

License

Apache-2.0

Unpacked Size

24.2 MB

Total Files

73

Last publish

Collaborators

  • avatar