Can't set cacheTime for remote property from Thing Shape
Some background, we were having some issues with properties connecting that do not change often. We changed the push type of the property to "Always" and this allowed good quality. According to best practices though, we shouldn't do this for many properties. In the same article, it mentions setting the Cache time would pull from the Edge device so we tried this in hopes these properties can pull these static values and connect.
Issue: We're having trouble with setting the cache time of a remote property via service. Here's the code, cacheTime grabbed from this article.
// properties and addresses from Kepware
propertiesAndAddresses = ["FlowMeterFlowRateAV","S7E_1501_1032.1032.3.DB74,DBW10",.....];
for(var i = 0; i < propertiesAndAddresses.length - 1; i+=2){
var aspects = {
"tagAddress": propertiesAndAddresses[i+1],
"scanRate": 500
};
me.SetRemotePropertyBinding({
propertyName: propertiesAndAddresses[i], // STRING
aspects: aspects,// JSON
cacheTime: 1 //1 second
});
}
me.RestartThing();
I receive this error when I try to run this script. "Error executing service bindProperties. Message :: Wrapped java.lang.NullPointerException - See Script Error Log for more details."
These properties that we are binding are from a Thing Template and Thing Shape. Could this be an issue? Because if we bind these properties without setting the cache method, the cache method box is grayed out.

Any thoughts? Thank you!

