Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi,
I have created a thing (RemoteThing as thing template) in Thingworx platform, for which I've created a VirtualThing counterpart using Java Edge SDK. With the Edge SDK, binding the thing, reading properties etc. work fine. However, having defined a property changed listener and data change for the remote thing properties the platform, the change listener does not fire upon property change.
MyThing myThing = new MyThing(); //MyThing extends VirtualThing, initializes properties using annotations
myThing.addPropertyChangeListener(new VirtualThingPropertyChangeListener()
{
@Override
public void propertyChangeEventReceived(VirtualThingPropertyChangeEvent event)
{
Property property = event.getProperty();
String name = property.getPropertyDefinition().getName();
}
});
I'm also not able to see the remote thing properties using "manage bindings". The thing connected state is properly reflected. I have initialized the Edge SDK thing properties using annotations and looking at the created VirtualThing (while debugging) the properties do exist, but trying to retrieve remote properties in Thingworx results in an error text "Error browsing properties. Be sure the remote device/server is connected and configured properly".
What are the requirements/steps in order to get the property changed listener working with the Java Edge SDK?
-Jarno