-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to renew the sourceTimestamp of an item when its value remains unchanged. #697
Comments
Use new Date() not fixed integer value |
Dear sir, the message construction method: |
Try to put the timestamp in msg.timestamp; the following code should be the one that handles the request: node-red-contrib-opcua/opcua/102-opcuaclient.js Lines 1943 to 1945 in 67f36b4
|
Hello, IW3IJQ, newMsg = { |
Regarding the definition of the values of sourceTimestamp and serverTimestamp, based on protocols (7.7.3 SourceTimestamp) and (7.7.4 ServerTimestamp). 7.7.3 SourceTimestamp 7.7.4 ServerTimestamp 7.7.3 SourceTimestamp 7.7.4 ServerTimestamp |
hi, dear sir,
I encountered a problem while using OpcUa-Server. The value and state of a item remain unchanged for a certain period of time, but its sourceTimestamp needs to be updated. The following message was sent to OPCUA Server, and through observation by UA-Expert, the "Source Timestamp" in the UA Expert window was not updated.
May I ask for your advice for what message needs to be constructed to update the value of the "Source Timestamp" of item when the value unchanged.
Thank you very much for taking the time to reply amidst your busy schedule. Thank you very much.
Environment version:
node.js:v16.20.2
node-red:v3.1.9
node-red-contrib-opcua:v0.2.328
msg send to OpcUa-Server:
var newMsg ={
payload: 10,
topic: "ns=1;s=TestDevice",
sourceTimestamp:new Date(1715335200000),
datatype: "Float"
};
return newMsg;
2024/5/15 15:04:29[node: debug 181]
ns=1;s=TestDevice : msg : Object
object
payload: 10
topic: "ns=1;s=TestDevice"
sourceTimestamp: "2024-05-10T10:00:00.000Z"
datatype: "Float"
_msgid: "c13c4646c33aa2a3"
The text was updated successfully, but these errors were encountered: