cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Properties binded with Remote thing resets on Thingstart

amittal-3
14-Alexandrite

Properties binded with Remote thing resets on Thingstart

Hello,

I have a Remote thing, in which I have all the properties as persistent and logged. Those properties are binded to properties of another Generic thing, where these properties are also persistent and logged.

Now whenever I restart my Remote thing, all the properties in Remote thing are reset to 0 (zero). And because the same properties are binded to my Generic thing, those are also reset to 0 (zero). What is the reason for this behaviour? How can I prevent this?

Another interesting thing to note here is, if I query the properties from my generic thing, I can see that it returns the valuestream entries with latest timestamps (which were sent by Remote thing in previous sessions, before restarting it). However, if I execute the service, get current time, I get as Jan 1, 1970.

Any help on this aspect would be appreciated.

Thanks in advance

Aditya Mittal

 

ACCEPTED SOLUTION

Accepted Solutions
smanley
14-Alexandrite
(To:amittal-3)

Hello,

Yes, I would recommend setting Start-type to read edge value if you do not want the value reset to default when a connection is lost temporarily during the restart. It will get the first value from the edge instead of resetting to default.

 

Property aspects indeed give you more control over property configurations at creation through a service.

Please refer to the Help Center for all available property aspect configurations. 

 

Thanks,

Saeed

View solution in original post

3 REPLIES 3
smanley
14-Alexandrite
(To:amittal-3)

Hello,

 

Can you tell me if any of the property definitions are configured with a default value? There is also a "Start Type" setting that can either use a default value or Read an edge value. What is this set to?

amittal-3
14-Alexandrite
(To:smanley)

Hello,

Yes I have some properties which are configured with default values and some of them not. Also the Start-type setting for all of them is Use Default Value. Would you recommend to change that setting to Read Edge Value?

What is the impact of that Configuration combination?

Also I would like to understand what is the aspect parameter in 'SetLocalPropertyBinding'. I am using this service to bind the properties from RemoteThing to my Generic Thing. As of now I have kept this aspect as undefined, so maybe by fine-tuning this parameter we can have some more control over remote property bindings.

var params = {
            propertyName: 'myParam' /* STRING */,
            aspects: undefined /* JSON */,
            sourceThingName: induThingName /* STRING */,
            sourcePropertyName: 'remoteParamName' /* STRING */
        };
        me.SetLocalPropertyBinding(params);

Thanks for your reply.

Regards

Aditya

smanley
14-Alexandrite
(To:amittal-3)

Hello,

Yes, I would recommend setting Start-type to read edge value if you do not want the value reset to default when a connection is lost temporarily during the restart. It will get the first value from the edge instead of resetting to default.

 

Property aspects indeed give you more control over property configurations at creation through a service.

Please refer to the Help Center for all available property aspect configurations. 

 

Thanks,

Saeed

Announcements


Top Tags