# OPC UA . Read Value ok but Write not possible

**URL:** <https://discourse.nodered.org/t/opc-ua-read-value-ok-but-write-not-possible/30260>\
**Category:** Industrial\
**Created:** [17 July 2020 12:07 UTC](https://discourse.nodered.org/t/opc-ua-read-value-ok-but-write-not-possible/30260 "2020-07-17T12:07:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pfe](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@pfe](https://discourse.nodered.org/u/pfe)\
**Post date:** [17 July 2020 12:07 UTC](https://discourse.nodered.org/t/opc-ua-read-value-ok-but-write-not-possible/30260/1 "2020-07-17T12:07:09Z")

</div>

Hello Forum,

I have a OPC UA server where UaExpert, CTT ( conformity Test Tool) can Read/Write nodes without problems. If a make a simple flow with node-red using the `node-red-contrib-opcua` to read and write this boolean node , only read operation succeeded , the write operation gives an error ( without other details..) see below:

```auto
// read 
11:45:19:581 <<<<<< _on_message_received 29 ReadResponse Good (0x00000)
{ /*ReadResponse*/
 responseHeader /* ResponseHeader */: {
   timestamp /* DateTime */: 2020-07-17T11:45:19.581Z
   requestHandle /* UInt32 */: 29 0x1d
   serviceResult /* StatusCode */: Good (0x00000)
   serviceDiagnostics /* DiagnosticInfo */: { /*DiagnosticInfo*/
 namespaceUri /* Int32 */: null
 symbolicId /* Int32 */: -1
 locale /* Int32 */: -1
 localizedText /* Int32 */: -1
 additionalInfo /* String */: null
 innerStatusCode /* StatusCode */: Good (0x00000)
 innerDiagnosticInfo /* DiagnosticInfo */: null
};
   stringTable /* UAString [] */: [/* empty*/]
   additionalHeader /* ExtensionObject */: null
 }
 results /* DataValue [] */: [ /* length =1*/

   { /* DataValue */
      value: Variant(Scalar<Boolean>, value: true)
      statusCode: Good (0x00000)
      serverTimestamp: 2020-07-17T11:45:19.581Z $ 205.400.000
      sourceTimestamp: 2020-07-17T11:41:50.368Z $ 108.800.000
   }
 ]
 diagnosticInfos /* DiagnosticInfo [] */: [/* empty*/]
};

```

```auto
// write
17 Jul 13:46:06 - [error] [OpcUa-Client:f1a2b564.94ed28] Error

```

I have checked the permissions and the write Masks . All seems to be ok. The only currious details is that the description in the uaexpert attribute window of this node is ( written in red) :  
_`description:Invalid Datatype: Expected OpcUaType_LocalizedText, Received OpcUaType_Null`_  
But can not imagine that the description has an impact on the write operation...Any other ideas?  
thanks a lot for your reply.

---

<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:** [18 July 2020 02:51 UTC](https://discourse.nodered.org/t/opc-ua-read-value-ok-but-write-not-possible/30260/2 "2020-07-18T02:51:01Z")

</div>

Hi, I have edited your post to improve readability (surrounded code parts with ````` back ticks)

Have you looked at the [issues page](https://github.com/mikakaraila/node-red-contrib-opcua/issues) to see if there is an existing or closed issue that might help?

If not, then perhaps you need to raise an issue & link back to here for reference?

---

<div class="post-metadata">

**Author:** ![mikakaraila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikakaraila/32/37496_2.png) [@mikakaraila](https://discourse.nodered.org/u/mikakaraila)\
**Post date:** [19 July 2020 03:58 UTC](https://discourse.nodered.org/t/opc-ua-read-value-ok-but-write-not-possible/30260/3 "2020-07-19T03:58:48Z")

</div>

> [@pfe](#):
>
> description:Invalid Datatype: Expected OpcUaType\_LocalizedText, Received OpcUaType\_Null

Some servers do not accept to write timestamp & statuscode, only value write can be done.  
But in this case LocalizedText is actually not supported. Did you try to write variable with some other type?  
I added LocalizedText to latest version.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 September 2020 03:59 UTC](https://discourse.nodered.org/t/opc-ua-read-value-ok-but-write-not-possible/30260/4 "2020-09-17T03:59:05Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
