helenkwok opened a new issue, #5247:
URL: https://github.com/apache/streampipes/issues/5247
### Describe the bug
The OPC UA data sink builds the value it writes with `new DataValue(v)`
(`streampipes-connectors-opcua/.../sink/OpcUa.java`). In Eclipse Milo, this
constructor sets the
source timestamp (and server timestamp) to `DateTime.now()`, in Milo 0.6.16
(used by 0.98.0) and in Milo 1.1.1
(used on `dev`).
OPC UA Part 3 (AccessLevelType) says that writing a SourceTimestamp requires
the `TimestampWrite` bit of the
variable's AccessLevel. Servers that check this refuse every write from the
sink. open62541 1.5 does:
the write returns `Bad_WriteNotSupported` (0x80730000). The sink only names
`Bad_TypeMismatch` and
`Bad_NotWritable` in its log, so the user only sees "Value: ... could not be
written to node Id ...".
### To reproduce
1. An OPC UA server built with open62541 1.5.x, one Float variable writable
by the user (AccessLevel
CurrentRead | CurrentWrite, no TimestampWrite).
2. StreamPipes 0.98.0: a pipeline from any stream to the OPC UA sink,
writing a numeric field to that node.
3. Every event logs "could not be written"; the server returns
`Bad_WriteNotSupported`.
The same server accepts the write from other clients that send the value
only (for example Python asyncua).
### Expected behavior
The sink writes the value only. Milo has `DataValue.valueOnly(v)` for this;
with it the write contains no
status code and no timestamps, and the server sets the timestamps itself.
### Environment
- StreamPipes 0.98.0 (Docker images), `dev` has the same code
- Server: open62541 1.5.10 on QNX 8.0, SecurityMode SignAndEncrypt, user
name login
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]