3 Replies Latest reply on Jul 20, 2016 8:35 AM by meghan RSS
    asingla Newbie

    Temperature sensor connection using Thingworx java SDK

    Hi All,

     

    i am making one IOT project in Thingworx for getting temperature sensor value and update thingworx properties using thingworx java SDK.

     

    I have installed Thingworx extension in eclipse and make 1 thinhgworx project.

     

    I have few question:

    1. How can i create thingtemplate , thing using java SDK.

    2. How to update thing properties when sensor value changed.

     

    Please give some pointer.

     

    Thanks.

      • Re: Temperature sensor connection using Thingworx java SDK
        meghan Communicator

        Just to clarify, are you using the Edge Java SDK, or the Extension SDK which is written in Java?

         

        When using the Edge Java SDK:

        1. If you want to use a simple REST call to the EntityServices Resource's service CreateThingTemplate, that would be the best way to create a ThingTemplate with the Java SDK. Here is a quick tutorial on sending REST calls from the Java SDK: POSTing via a REST call in Java

         

        2. Regarding question 2, have you taken a look at the SteamSensor example provided with the Java SDK? This provides a great starting point to show how to send property values. You'll see that the setProperty() function is being called to set values to properties that have been defined through annotations at the beginning of the SteamThing.java file, and the updateSubscribedProperties() function is called to push all of the registered properties to the ThingWorx server.

         

        Meghan