# zsbonc-node-opcua

> pure nodejs OPCUA SDK

Latest version **2.33.0** (published 2021-03-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install zsbonc-node-opcua
pnpm add zsbonc-node-opcua
yarn add zsbonc-node-opcua
bun add zsbonc-node-opcua
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; large bundle.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.33.0 |
| Published | 2021-03-23 |
| First published | 2021-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 70 |
| Unpacked size | 16.9 MB |
| Known vulnerabilities | 0 (+4 in 2 direct dependencies) |
| Install scripts | yes |
| GitHub stars | 1661 |
| Author | Etienne Rossignon |
| Maintainers | anson88616425 |
| Keywords | OPCUA, opcua, m2m, iot, opc ua, internet of things |

## Links

- npm: https://www.npmjs.com/package/zsbonc-node-opcua
- Repository: https://github.com/node-opcua/node-opcua
- Homepage: http://node-opcua.github.io/
- Issues: https://github.com/node-opcua/node-opcua/issues
- Funding: https://github.com/sponsors/erossignon
- npm.io page: https://npm.io/package/zsbonc-node-opcua

## Dependencies (70)

- [ltx](https://npm.io/package/ltx.md) ^2.10.0
- [exit](https://npm.io/package/exit.md) ^0.1.2
- [fqdn](https://npm.io/package/fqdn.md) ^0.0.3
- [hexy](https://npm.io/package/hexy.md) ^0.3.1
- [long](https://npm.io/package/long.md) ^4.0.0
- [once](https://npm.io/package/once.md) ^1.4.0
- [async](https://npm.io/package/async.md) ^3.2.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [lerna](https://npm.io/package/lerna.md) 4.0.0
- [sinon](https://npm.io/package/sinon.md) ^9.2.4
- [tslib](https://npm.io/package/tslib.md) ^2.1.0
- [yargs](https://npm.io/package/yargs.md) 15.4.1
- [byline](https://npm.io/package/byline.md) ^5.0.0
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [eslint](https://npm.io/package/eslint.md) ^7.21.0
- [lodash](https://npm.io/package/lodash.md) 4.17.21
- [mkdirp](https://npm.io/package/mkdirp.md) 0.5.5
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [semver](https://npm.io/package/semver.md) ^7.3.4
- [should](https://npm.io/package/should.md) ^13.2.3
- [vorpal](https://npm.io/package/vorpal.md) ^1.12.0
- [backoff](https://npm.io/package/backoff.md) ^2.5.0
- [bonjour](https://npm.io/package/bonjour.md) ^3.5.0
- [delayed](https://npm.io/package/delayed.md) ^2.0.0
- [dequeue](https://npm.io/package/dequeue.md) ^1.0.5
- [thenify](https://npm.io/package/thenify.md) ^3.3.1
- [treeify](https://npm.io/package/treeify.md) ^1.1.0
- [unirest](https://npm.io/package/unirest.md) ^0.6.0
- [bomstrip](https://npm.io/package/bomstrip.md) ^0.1.4
- [humanize](https://npm.io/package/humanize.md) 0.0.9
- [progress](https://npm.io/package/progress.md) ^2.0.3
- [typedocs](https://npm.io/package/typedocs.md) ^0.6.7
- [csv-parse](https://npm.io/package/csv-parse.md) ^4.15.3
- [env-paths](https://npm.io/package/env-paths.md) ^2.2.1
- [pretty-ms](https://npm.io/package/pretty-ms.md) ^7.0.1
- [cli-table3](https://npm.io/package/cli-table3.md) ^0.6.0
- [date-utils](https://npm.io/package/date-utils.md) ^1.2.21
- [easy-table](https://npm.io/package/easy-table.md) ^1.1.1
- [sprintf-js](https://npm.io/package/sprintf-js.md) ^1.1.2
- [underscore](https://npm.io/package/underscore.md) ^1.12.0
- [xml-writer](https://npm.io/package/xml-writer.md) ^1.7.0
- [@types/long](https://npm.io/package/@types/long.md) ^4.0.1
- [@types/node](https://npm.io/package/@types/node.md) ^14.14.33
- [@types/once](https://npm.io/package/@types/once.md) ^1.4.0
- [callbackify](https://npm.io/package/callbackify.md) ^1.1.0
- [deassertify](https://npm.io/package/deassertify.md) ^0.1.2
- [mocha-clean](https://npm.io/package/mocha-clean.md) ^1.0.0
- [vorpal-repl](https://npm.io/package/vorpal-repl.md) ^1.1.8
- [@types/async](https://npm.io/package/@types/async.md) ^3.2.5
- [@types/sinon](https://npm.io/package/@types/sinon.md) ^9.0.11
- [@types/yargs](https://npm.io/package/@types/yargs.md) 16.0.0
- [cli-truncate](https://npm.io/package/cli-truncate.md) ^2.1.0
- [js2xmlparser](https://npm.io/package/js2xmlparser.md) ^4.0.1
- [pretty-error](https://npm.io/package/pretty-error.md) ^3.0.3
- [@types/lodash](https://npm.io/package/@types/lodash.md) 4.14.168
- [@types/mkdirp](https://npm.io/package/@types/mkdirp.md) 0.5.2
- [@types/rimraf](https://npm.io/package/@types/rimraf.md) ^3.0.0
- [better-assert](https://npm.io/package/better-assert.md) ^1.0.2
- [object.values](https://npm.io/package/object.values.md) ^1.1.3
- [@types/bonjour](https://npm.io/package/@types/bonjour.md) ^3.5.8
- [node-opcua-pki](https://npm.io/package/node-opcua-pki.md) ^2.8.0
- [shebang-loader](https://npm.io/package/shebang-loader.md) ^0.0.1
- [set-prototype-of](https://npm.io/package/set-prototype-of.md) ^1.0.0
- [@types/underscore](https://npm.io/package/@types/underscore.md) ^1.11.0
- [@cucumber/cucumber](https://npm.io/package/@cucumber/cucumber.md) ^7.0.0
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.5.19
- [browser-process-hrtime](https://npm.io/package/browser-process-hrtime.md) ^1.0.0
- [zsbonc-node-opcua-crypto](https://npm.io/package/zsbonc-node-opcua-crypto.md) ^1.7.1
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^4.17.0
- [typedoc-plugin-external-module-name](https://npm.io/package/typedoc-plugin-external-module-name.md) ^4.0.6

## Recent versions

- 2.33.0 (latest) — 2021-03-23

## README

node-opcua
==========

node-opcua is an implementation of an OPC UA stack fully written in Typescript for NodeJS.


[![NPM download](https://img.shields.io/npm/dm/node-opcua.svg)](https://www.npmtrends.com/node-opcua)
[![NPM version](https://badge.fury.io/js/node-opcua.png)](http://badge.fury.io/js/node-opcua)
[![Build Status](https://travis-ci.com/node-opcua/node-opcua.png?branch=master)](https://travis-ci.com/node-opcua/node-opcua)
[![Build status](https://ci.appveyor.com/api/projects/status/8sgtm3n15aii98oc/branch/master?svg=true)](https://ci.appveyor.com/project/erossignon/node-opcua/branch/master)
[![HitCount](http://hits.dwyl.io/node-opcua/node-opcua.svg)](http://hits.dwyl.io/node-opcua/node-opcua)
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lernajs.io/)

<!-- [![Dependency Status](https://gemnasium.com/node-opcua/node-opcua.png)](https://gemnasium.com/node-opcua/node-opcua) -->
[![Coverage Status](https://coveralls.io/repos/node-opcua/node-opcua/badge.png)](https://coveralls.io/r/node-opcua/node-opcua)
[![Code Climate](https://codeclimate.com/github/node-opcua/node-opcua.png)](https://codeclimate.com/github/node-opcua/node-opcua)

[![OPC UA](http://b.repl.ca/v1/OPC-UA-blue.png)](http://opcfoundation.org/)
[![Gitter chat](https://badges.gitter.im/node-opcua/node-opcua.png)](https://gitter.im/node-opcua/node-opcua)


[![The Book](https://img.shields.io/static/v1?label=the%20book&message=NodeOPCUA%20by%20example&color=blueviolet&logo=leanpub)](https://leanpub.com/node-opcuabyexample)

[Node-opcua](http://node-opcua.github.io/) is the OPC-UA stack running on NodeJS.


Why NodeJS ?

Because nodeJs is a great framework to design asynchronous applications.


## Getting started

### installing node-opcua as a node package

    $ mkdir mytest
    $ cd mytest
    $ npm init 
    $ npm install node-opcua --unsafe-perms
    $ # create your first app.js file!


### installing node-opcua samples as a node package

```shell
$ mkdir myserver
$ cd myserver
$ npm init
$ npm install node-opcua-samples --unsafe-perms
$ ./node_modules/.bin/simple_server
```   

or
    
```shell
$ ./node_modules/.bin/simple_client  -e "opc.tcp://opcserver.mAutomation.net:4841" -n="ns=1;s=EVR2.system.RTC_SEC"
```

or 

```shell
$ ./node_modules/.bin/simple_client  -e "opc.tcp://opcuademo.sterfive.com:26543" 
```

## Minimum nodejs requirement 

  * nodejs version 10.23 or above

### API Documentation
   
 * check out the [API documentation](http://node-opcua.github.io/api_doc/index.html)
                
## tutorials and guided examples

[![The Book](https://img.shields.io/static/v1?label=the%20book&message=NodeOPCUA%20by%20example&color=blueviolet&logo=leanpub)](https://leanpub.com/node-opcuabyexample)

## Getting professional support

NodeOPCUA is developed and maintained by sterfive.com. 

To get professional support, consider subscribing to the node-opcua membership community:

[![Professional Support](https://img.shields.io/static/v1?style=for-the-badge&label=Professional&message=Support&labelColor=blue&color=green&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ5MS41MiA0OTEuNTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ5MS41MiA0OTEuNTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxnPg0KCQk8cGF0aCBkPSJNNDg3Ljk4OSwzODkuNzU1bC05My4xMDktOTIuOTc2Yy00LjgxMy00LjgwNi0xMi42NDItNC42NzQtMTcuMjczLDAuMzA3Yy03LjE0OCw3LjY4OS0xNC42NCwxNS41NTQtMjEuNzMsMjIuNjM0ICAgIGMtMC4yNzEsMC4yNy0wLjUwMSwwLjQ5My0wLjc2MywwLjc1NUw0NjcuMyw0MzIuNTA0YzguOTEtMTAuNjE0LDE2LjY1Ny0yMC40MSwyMS43My0yNi45NyAgICBDNDkyLjcyLDQwMC43NjIsNDkyLjI1NywzOTQuMDE5LDQ4Ny45ODksMzg5Ljc1NXoiLz4NCgk8L2c+DQo8L2c+DQo8Zz4NCgk8Zz4NCgkJPHBhdGggZD0iTTMzNC4zLDMzNy42NjFjLTM0LjMwNCwxMS4zNzktNzcuNTYsMC40MTMtMTE0LjU1NC0yOS41NDJjLTQ5LjAyMS0zOS42OTMtNzUuOTcyLTEwMi42NDItNjUuODM4LTE1MC41OTNMMzcuNjM0LDQxLjQxOCAgICBDMTcuNjUzLDU5LjQyNCwwLDc4LjU0NSwwLDkwYzAsMTQxLjc1MSwyNjAuMzQ0LDQxNS44OTYsNDAxLjUwMyw0MDAuOTMxYzExLjI5Ni0xLjE5OCwzMC4xNzYtMTguNjUxLDQ4LjA2Mi0zOC4xNjdMMzM0LjMsMzM3LjY2MSAgICB6Ii8+DQoJPC9nPg0KPC9nPg0KPGc+DQoJPGc+DQoJCTxwYXRoIGQ9Ik0xOTMuODU0LDk2LjA0MUwxMDEuMjEzLDMuNTNjLTQuMjI1LTQuMjItMTAuODgyLTQuNzI0LTE1LjY2NC0xLjE0NWMtNi42NTQsNC45ODMtMTYuNjQ4LDEyLjY1MS0yNy40NTMsMjEuNDk4ICAgIGwxMTEuOTQ1LDExMS43ODVjMC4wNjEtMC4wNiwwLjExMS0wLjExMywwLjE3Mi0wLjE3NGM3LjIzOC03LjIyOCwxNS4zNTUtMTQuODg1LDIzLjI5MS0yMi4xNjcgICAgQzE5OC41MzQsMTA4LjcxMywxOTguNjg0LDEwMC44NjMsMTkzLjg1NCw5Ni4wNDF6Ii8+DQoJPC9nPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+)](https://support.sterfive.com)

or contact [sterfive](https://www.sterfive.com) for dedicated consulting and more advanced support.


 ## :heart: Supporting the development effort - Sponsors & Backers</span> 

If you like node-opcua and if you are relying on node-opcua in one of your projects, please consider becoming a backer and [sponsoring us](https://github.com/sponsors/node-opcua), this helps us to maintain a high-quality stack and constant evolution of the stack. 


If your company would like to participate and influence the development of future versions of node-opcua please contact [sterfive](mailto:contact@sterfive.com).

## Road-map

Those are the items we would like to achieve in the next version of the API.
  
  * improved documentation 
  * Compliance testing and certification (CTT) 
  * Pub-sub support 
  * support for redundancy
  * more tutorials

## Advanced topics

### installing node-opcua from source

#### running the demo server from source

     $ git clone https://github.com/node-opcua/node-opcua.git
     $ cd node-opcua
     $ npm install -g pnpm 
     $ pnpm install
     $ pnpm recursive install
     $ pnpm build
     $ node packages/node-opcua-samples/bin/simple_server
    
#### running the demo client from source

     $ git clone https://github.com/node-opcua/node-opcua.git
     $ cd node-opcua
     $ npm install -g pnpm 
     $ pnpm install
     $ pnpm recursive install
     $ pnpm build
     $ node packages/node-opcua-samples/bin/simple_client.js -e "opc.tcp://opcserver.mAutomation.net:4841" -n="ns=1;s=EVR2.system.RTC_SEC"
        


### Tutorials

 * [create a server](https://github.com/node-opcua/node-opcua/blob/master/documentation/creating_a_server.md)
 * [create a client in typescript](https://github.com/node-opcua/node-opcua/blob/master/documentation/creating_a_client_typescript.md)
   

                     
## Contributing

    $ git clone git://github.com/node-opcua/node-opcua.git
    $ cd node-opcua
    $ npm install -g pnpm 
    $ pnpm install
    $ pnpm recursive install
    $ pnpm build
 

[![NPM](https://nodei.co/npm/node-opcua.png?downloads=true&stars=true)](https://nodei.co/npm/node-opcua/)

[![Project Stats](https://www.openhub.net/p/713850/widgets/project_thin_badge.gif)](https://www.openhub.net/p/node-opcua)



## Supported Features


| __**Service**__             |                          |                    |
|-----------------------------|-----------------------|---------------------------|
|  Discovery Service Set     |                        |         |
|                            |FindServers()           |  :white_check_mark:       |
|                            |GetEndpoints()          |  :white_check_mark:       |
|                            |RegisterServer()        |  :white_check_mark:       |
|                            |RegisterServer2()       |  :white_check_mark:       |
|                            |FindServersOnNetwork()  |  :white_check_mark:       |
| Secure Channel Service Set |                        |         |
|                            |OpenSecureChannel()     |  :white_check_mark:       |
|                            |CloseSecureChannel()    |  :white_check_mark:       |
| Session Service Set        |                        |         |
|                            |CreateSession()         |  :white_check_mark:       |
|                            |CloseSession()          |  :white_check_mark:       |
|                            |ActivateSession()       |  :white_check_mark:       |
|                            |Cancel()                |         |
| View Service Set           |                        |         |
|                            |Browse()                |  :white_check_mark:       |
|                            |BrowseNext()            |  :white_check_mark:       |
|                            |TranslateBrowsePathsToNodeIds() | :white_check_mark:|
|                            |RegisterNodes()                 | :white_check_mark:|
|                            |UnregisterNodes()      |:white_check_mark:|
| Attribute Service Set      |                       ||
|                            |Read()                 |:white_check_mark:|
|                            |Write()                |:white_check_mark:|
|                            |HistoryRead()          |:waxing_crescent_moon:|
|                            |HistoryUpdate()        |:waxing_crescent_moon:|
|MonitoredItems Service Set  |                       ||
|                            |CreateMonitoredItems() |:white_check_mark:|
|                            |ModifyMonitoredItems() |:white_check_mark:|
|                            |SetMonitoringMode()    |:white_check_mark:|
|                            |SetTriggering()        |:new_moon:|
|                            |DeleteMonitoredItems() |:white_check_mark:|
|Subscription Service Set    |                       ||
|                            |CreateSubscription()   |:white_check_mark:|
|                            |ModifySubscription()   |:white_check_mark:|
|                            |DeleteSubscriptions()  |:white_check_mark:|
|                            |Publish()              |:white_check_mark:|
|                            |Republish()            |:white_check_mark:|
|                            |TransferSubscriptions()|:white_check_mark:|
|Node Management Service Set |                       ||
|                            |AddNodes()             |:new_moon:|
|                            |AddReferences()        |:new_moon:|
|                            |DeleteNodes()          |:new_moon:|
|                            |DeleteReferences()     |:new_moon:|
|Query Service Set           |                       ||
|                            |QueryFirst()           |:new_moon:|
|                            |QueryNext()            |:new_moon:|


|                                        |                          |                    |
|----------------------------------------|:------------------------:|--------------------|
| __**Transport Protocol**__             |                          |                    |
| **Transport**                          | **Status**               | **Comment**        |
| UA-TCP UA-SC UA Binary                 |  :white_check_mark:      | OPC.TCP - Binary   |          
| SOAP-HTTP WS-SC UA Binary              |  :new_moon:              | HTTP/HTTPS - Binary|               
| SOAP-HTTP WS-SC UA XML                 |  :new_moon:              |                    |               
| SOAP-HTTP WS-SC UA XML-UA Binary       |  :new_moon:              |                    |               
| __**Security Policies**__              |                          |                    |
| **Policy**                             | **Status**               | **Comment**        |
| None                                   | :white_check_mark:       |                    |               
| Basic128Rsa15                          | :white_check_mark:       | deprecated in 1.04 |               
| Basic256                               | :white_check_mark:       | deprecated in 1.04 |               
| Basic256Sha256                         | :white_check_mark:       |                    |               
| **Authentication**                     | **Status**               | **Comment**        |
| Anonymous                              |:white_check_mark:        |                    |
| User Name Password                     |:white_check_mark:        |                    |
| X509 Certificate                       |:white_check_mark:        |                    |
| __**client facets**__                  |                          |                    |
| Base Client Behaviour                  |:white_check_mark:       | |
| AddressSpace Lookup                    |:white_check_mark:       | |
| Attribute Read                         |:white_check_mark:       | |
| DataChange Subscription                |:white_check_mark:       | |
| DataAccess                             |:white_check_mark:       | |
| Discovery                              |:white_check_mark:       | |
| Event Subscription                     |:white_check_mark:       | |
| Method call                            |:white_check_mark:       | |
| Historical Access                      |:first_quarter_moon:     | |
| Advanced Type                          |:white_check_mark:       | |
| Programming                            |:new_moon:               | |
| Auditing                               |:first_quarter_moon:               | |
| Redundancy                             |:new_moon:               |Sponsors wanted |
| __**server profiles**__                |                         | |
| Core Server                            | :white_check_mark:      | |
| Data Access Server                     | :white_check_mark:      | |
| Embedded Server                        | :white_check_mark:      | |
| Nano Embedded Device Server            | :white_check_mark:      | |
| Micro Embedded Device Server           | :white_check_mark:      | |
| Standard DataChange Subscription Server| :white_check_mark:                         | |
| Standard Event Subscription Server     | :white_check_mark:                         | |
| Standard UA Server                     | :white_check_mark:                         | |
| Redundancy Transparent Server          | :new_moon:              |Sponsors wanted |
| Redundancy Visible Server              | :new_moon:              |Sponsors wanted |
| Node Management Server                 | :new_moon:              |Sponsors wanted |
| Auditing Server                        | :first_quarter_moon:   | |
| Complex Type Server                    | :white_check_mark:                        |(sponsored) |
| Session Diagnostics                    |  :white_check_mark:                         | (sponsored)|
| Subscription Diagnostics               |  :white_check_mark:                         | (sponsored)|
| Alarms & Conditions                    |  :white_check_mark:                         | (sponsored)|
| Pub & Sub                              |  :new_moon:                         |Sponsors wanted |




## Feedback

  * if you're using node-opcua in one of your project, please feel free to leave a comment and a quick description in the [wiki](https://github.com/node-opcua/node-opcua/wiki)
  
  * if you have a particular wish or found a issue, let us known and [create an issue](https://github.com/node-opcua/node-opcua/issues?state=open)

---
_Source: https://npm.io/package/zsbonc-node-opcua · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
