Skip to main content
16-Pearl
October 14, 2020
Solved

How can I set "Start Type" within a "AddPropertyDefinition" call?

  • October 14, 2020
  • 1 reply
  • 1672 views

I have a Remote Thing and want to add its remote properties automatically via a subscription / service.

This works well so far - I go through the GetRemoteMetadata's propertyDefinition and can create a property with correct names, types, categories, thresholds etc.

 

In the AddPropertyDefinition service there is a parameter named remoteBindingAspects

I would suspect I can use it to define the remote binding aspects - as in the UI.

However, most of them have their own parameter, i.e. remotePropertyName, timeout, pushType, pushTreshold etc.

 

There no hint on where to set the Start Type.

It's a default of "Use Default Value" which I need to change to "Read Edge Value" when adding the property.

 

Any ideas or examples for the remoteBindingAspects JSON would be appreciated.

 

Thanks,

Michael

Best answer by mneumann
var remoteBindingAspects = {
 "startType": "readEdgeValue"
};

me.AddPropertyDefinition({
 remoteBindingAspects: remoteBindingAspects /* JSON */,
 [...]
});

 

I browsed through the RemotePropertyDefinitions of properties I've already changed.

This allowed me to use above value to manipulate the aspects on adding a new property.

1 reply

mneumann16-PearlAuthorAnswer
16-Pearl
October 15, 2020
var remoteBindingAspects = {
 "startType": "readEdgeValue"
};

me.AddPropertyDefinition({
 remoteBindingAspects: remoteBindingAspects /* JSON */,
 [...]
});

 

I browsed through the RemotePropertyDefinitions of properties I've already changed.

This allowed me to use above value to manipulate the aspects on adding a new property.