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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Binding / unbinding remote properties programmatically

rvaaraniemi
1-Newbie

Binding / unbinding remote properties programmatically

Hi,

I tried binding and unbinding some remote properties with SetRemotePropertyBinding and RemoveRemotePropertyBinding. First I thought that they didn't work because the "Properties" page on my Thing did not show the bindings. However, when I checked the local values (refreshed the page) I noticed that they changed according to the remote values. I must have tried the binding process on Thing and Template levels so many times that I cannot unbind some of the values anymore with either RemoveRemotePropertyBinding or re-binding and unbinding them from the Properties page. My questions:

1) Why doesn't the Properties page show the bindings that are done with SetRemotePropertyBinding?

2) Is there any other way to unbind remote properties than the re-bind & unbind or RemoveRemotePropertyBinding?

BR,

Risto Vääräniemi

2 REPLIES 2

You are doing it the right way, are you remembering to also invoke a RestartThing?

Not sure exactly why you are now unable to bind/unbind some, perhaps a Tomcat restart will help?

Thanks for the tip. I added the RestartThing to my code just in case. It seems I have to close and re-open the thing in the composer to see the bindings. Refreshing the view does not update the binding status—only the values.

When I open the "Manage Bindings" I can now see the bound properties. There are also the remove binding button on each property except the problematic one. I still cannot unbind it either programmatically or manually. I restarted Tomcat but it did not help. Probably something weird in the TW platform. I'll probably need to delete the thing and re-create it.

BR,

Risto

Top Tags