# How to write a method by "node-red-contrib-opcua"

**URL:** <https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629>\
**Category:** General\
**Created:** [22 August 2019 06:57 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629 "2019-08-22T06:57:25Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.nodered.org/u/Jack)\
**Post date:** [22 August 2019 06:57 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/1 "2019-08-22T06:57:25Z")

</div>

Sorry for my bad English,I want to use "node-red-contrib-opcua0.2.43" to deploy a opc-ua server,the help of "OPC UA Compact Server" is said that " AddressSpace:  
A function like programming editor to construct your own address space in the server." I want to write a method in this node,but I can't find a example to write a method on it ,have anyone can give us an advice or a example ? Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [22 August 2019 07:01 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/2 "2019-08-22T07:01:22Z")

</div>

Hello again Jack.

Sorry to say this again, but of you change to the IIOT nodes, you will gain more support and many examples.

> [@OPCUA communication slow](https://discourse.nodered.org/t/opcua-communication-slow/10356/13):
>
> Look in tool bar. No pub, no sub - but many others. There are even a shed load of built in samples/demos...

---

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.nodered.org/u/Jack)\
**Post date:** [24 August 2019 03:52 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/3 "2019-08-24T03:52:28Z")

</div>

thank you, but i can't find an example of write method function in a server...😳

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [24 August 2019 05:23 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/4 "2019-08-24T05:23:08Z")

</div>

Try to add an issue/ask the author directly at github, you may have better luck there

> **[mikakaraila/node-red-contrib-opcua](https://github.com/mikakaraila/node-red-contrib-opcua/issues)**
>
> A Node-RED node to communicate OPC UA. Uses node-opcua library. - mikakaraila/node-red-contrib-opcua

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [24 August 2019 05:28 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/5 "2019-08-24T05:28:32Z")

</div>

Servers don't write. Clients do. The server just serves tags for a client to read and write. If you're making a server in node red, then you'll need to connect to it with client nodes.

In short, look under the client samples.

---

<div class="post-metadata">

**Author:** ![iwaresk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iwaresk/32/12211_2.png) [@iwaresk](https://discourse.nodered.org/u/iwaresk)\
**Post date:** [16 September 2019 19:51 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/6 "2019-09-16T19:51:36Z")

</div>

Hi Jack,  
did you found a Solution for your problem?  
I tried the same but didn't find an example for a Server Method.  
Thx  
ingo

---

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.nodered.org/u/Jack)\
**Post date:** [7 October 2019 07:52 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/7 "2019-10-07T07:52:20Z")

</div>

I still haven't found a solution.Ｉ had add an issue to ask the author at github, He suggested to read the example in the nodered, but 1 can't find an example for a Server Method.🤣

---

<div class="post-metadata">

**Author:** ![Jack](https://avatars.discourse-cdn.com/v4/letter/j/cc9497/32.png) [@Jack](https://discourse.nodered.org/u/Jack)\
**Post date:** [14 October 2019 01:35 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/8 "2019-10-14T01:35:59Z")

</div>

By looking at the source code with repeated attempts, I've successfully written an example,If you need it, send me a message.

---

<div class="post-metadata">

**Author:** ![iwaresk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iwaresk/32/12211_2.png) [@iwaresk](https://discourse.nodered.org/u/iwaresk)\
**Post date:** [15 October 2019 05:30 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/9 "2019-10-15T05:30:53Z")

</div>

Hi Jack,  
That would be great if you can me send this example.  
Thanks  
Ingo

---

<div class="post-metadata">

**Author:** ![windsurfer](https://avatars.discourse-cdn.com/v4/letter/w/f475e1/32.png) [@windsurfer](https://discourse.nodered.org/u/windsurfer)\
**Post date:** [23 June 2020 17:02 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/10 "2020-06-23T17:02:24Z")

</div>

Dear Ingo or Jack,

i've the same problem and this is the only thread about it.

would you please provide your solution?

thank you

windsurfermaik(at)[web.de](http://web.de)

---

<div class="post-metadata">

**Author:** ![iwaresk](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/iwaresk/32/12211_2.png) [@iwaresk](https://discourse.nodered.org/u/iwaresk)\
**Post date:** [1 July 2020 09:20 UTC](https://discourse.nodered.org/t/how-to-write-a-method-by-node-red-contrib-opcua/14629/11 "2020-07-01T09:20:52Z")

</div>

Hi Windsurfer,  
the Solution that Jack sent me was node-red-contrib-iiot-opcua where a Method call was included. Unfortunately this Package was deleted from GitHub and is no longer available.  
So at the Moment i again have no Solution.  
Regards  
Ingo
