What product/components do you use and which version/fix level are you on?
Comulocity IoT
Is your question related to the free trial, or to a production (customer) instance?
We are IoTEP user. This is our tenat ID: bulut-dik-2021.cumulocity.com
What are you trying to achieve? Please describe it in detail.
Dear support team, I am Yumao Liu, a master student of mechanical engineering at TU Darmstadt. I am working as the research assistant at the Institute PLCM. I need to develop a program which retrieves the nodes values of OPC UA server and gives the data to a html for visualization. I have referred to the two documentations for the development:
First: Documentation for OPC UA
https://cumulocity.com/guides/protocol-integration/opcua/#operations
Especially the part of reading value of a node:
Second: REST API Documentation
https://cumulocity.com/api/10.13.0/#operation/postOperationCollectionResource
And I applied the method described in the part of creating an operation with Node.js.
I wrote a JS program, like this.
var url = 'https://bulut-dik-2021.cumulocity.com/devicecontrol/operations/';
var user = 'shuo.wang@stud.tu-darmstadt.de';
var password = 'dik2022adp..';
var authorizationData = 'Basic ' + btoa(user + ':' + password);
var unirest = require("unirest");
var req = unirest("POST", "https://bulut-dik-2021.cumulocity.com/devicecontrol/operations/")
.headers({
"Authorization": authorizationData,
"Accept": "application/json",
"Content-Type": "application/json"
})
.send(JSON.stringify( {
"deviceId" : "84459169",
"c8y_ua_command_ReadValue": {
"nodes": ["2"],
"timestampsToReturn": "Neither"
},
"description":"read value"
} ))
.end(function (res) {
console.log(res.raw_body);
});
And I runed this program on the Node.js terminal.
Do you get any error messages? Please provide a full error message screenshot and log file.
Have you installed all the latest fixes for the products and systems you are using?
I think yes.