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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Property change event using Java Edge SDK

jtuomainen
1-Visitor

Property change event using Java Edge SDK

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

0 REPLIES 0
Announcements


Top Tags