Closed sanlop73 closed 6 years ago
It looks like dataValue.value
is null, this causes the exception in the monitoredItem.on("change",..)
event handler function in this line:
var readmessage = JSON.stringify({'timestamp':dataValue.serverTimestamp,'value':dataValue.value.value});
I would try:
monitoredItem.on("changed",function(dataValue){
var readmessage = dataValue.toString();
console.log(readmessage);
});
Please check carefully the dataValue.statusCode
which is probably not StatusCodes.Good
, this will give you some hint about why the dataValue.value
is null
.
Hi:
I am trying to create an small script to browse and subscribe the browse result. Could you please help me to identify if i m doing something wrong? Script is giving this error in every item, just once, then the script continues. The problem is i am using async.series and the tasks defined after this one are not being executed due the error.
Thanks in advance for your help.
And here is my code.