What product/components do you use and which version/fix level are you on?
Cumulocity IoT
Is your question related to the free trail, or to a production (customer) instance?
a production (customer) instance
What are you trying to achieve? Please describe in detail.
I want to read values from opc ua nodes and display these values in my customized widget. I applied the method described in this link"OPC UA - Cumulocity IoT Guides". I refered to this paragraph.
I wrote the following code to send the message to gateway and wish to get the value of node with node id 8.
readNodeValvue() {
let formData = `{
"deviceId" : "replaceID",
"c8y_ua_command_ReadValue": {
"nodes": [8],
"timestampsToReturn": "Neither"
},
"description":"read value"
}`;
formData = formData.replace("replaceID", this.deviceID)
let formDataJSON = JSON.parse(formData)
this.http.post(this.url,formDataJSON, this.options).subscribe(res =>{console.log(res);});
alert(this.message);
}
I also defined a button to send the message. Here is the code for button.
<div class="container">
<label class="u-label">Read value of node: </label>
<button class="button" [disabled]="canClick" (click)="readNodeValvue()">Read</button></div>
After running my localhost, I pressed the button for node value reading. I got following errors.
Do you get any error messages? Please provide a full error message screenshot and log file.
Have you installed all the latest fixes of the products and systems you are using?
Yes