Community Tip - You can change your system assigned username to something more personal in your community settings. X
Are you able to subscribe to the update of a ValueStream that is assigned to a Thing to store the information of logged properties? The DataTable entity has 4 additional events that monitor for updates, deletions, etc. However the ValueStream does not have anything similar.
Solved! Go to Solution.
I had the same problem, and what I did it's the subscription to DataChange event check if an event on the same timestamp as been raised, on that case I've ignore the second event.
Can you describe the use case? I believe that there will be some easier way to resolve your problem.
Effectively, I need to mimic a subscription to a data change event. The problem with subscribing to the data change event now is that there is an issue with the remote binding which causes the data change event to fire twice for the exact same value and timestamp. This issue has been raised to PTC as an open support ticket and in the meantime I am looking for a workaround.
I had the same problem, and what I did it's the subscription to DataChange event check if an event on the same timestamp as been raised, on that case I've ignore the second event.
Interesting approach, thanks Carles. Where is the log of events that has been fired? IE: How would I monitor for another event with the same time stamp?
I've aggregated a JSON property as a Cache of last property values:
{
"propertyName1": timestamp,
"propertyName2": timestamp,
...
}
And just checked in front of if ( I just did this code on the fly on the forum, check it...):
var process = true; if (me.myCacheJson[propertyName]==undefined) { me.myCacheJson[propertyName] = timestamp; } else { if (dateDifference(me.myCacheJson[propertyName],timestamp)==0) { process = false; } else { me.myCacheJson[propertyName] = timestamp; } } if (process) { // do whatever }