Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
hey folks,
i have a
little problem with this thingworx tutorial.
at the point where i start the command:
java -jar ./temperature-thing-jar-with-dependencies.jar ws://xxxxx.cloud.thingworx.com:80/Thingworx/WS <app-key>
i recive the temperature and the humidity of my wired sensor to my RPi...
There is also a "true" at the connection in my ThingTemplate, but my mashup wont show me the actual temp and hum, not on the LED and not on the gauge.
So i watched the working command and there seems to be a tiny error:
-----
Here is the standard output of the command:
stdout>Temp=23.0* Humidity=22.0%
Here is the standard error of the command (if any):
17:33:45.804 [main] ERROR c.p.tempthing.BaseEdgeServer - Error Processing Scan Request for [WKAThing]
java.lang.NumberFormatException: For input string: "23.0*"
-----
Do you know where i can locate my mistake? :X
regards,
Philipp
Hello,
Did you manage to connect the RPI to Thingworx? Did you manage to create an equivalent entity(RemoteThing) in Thingworx that has same name as the one from which you are sending data in your jar file? As i see in this error that you have posted, you have a WKAThing on which you should have the 2 properties(Temp and Humidity).
In order to check if you successfully connected your device to Thingworx you should check the value of the isconnected Property to be true on your WKAThing( which should be a RemoteThing). Also, in TWX, from the menu bar, you should access Monitoring and go to Remote Things. Here you will see two tabs(All and Unbound). If you have correctly connected your device to TWX you will see it in the All tab with green.
Thank you,
Adrian
Hey,
i checked all points you mentioned and everything seems to be o.k.!
the isCOnnected shows 'true', my thing appears in the monitoring at 'all' with a green symbol.
Also i changed the name of the thing in the main.c file to WKAThing. And thats the name i gave the Thing in TWX.
But that error still appears...
its just the problem, that my mashup wont show me the live data while i run the .jar file. But i dont know what the Error wants to tell me when i start the .jar program..
any other ideas?
regards
Philipp, does the properties on your Remote Thing (WKAThing) update?
hi,
when i go to Modeling - Things - WKAThing - Properties and start the .jar file it looks like this:
or did you think about something else?
Hi Philipp,
In this new version of the AdafruitDHT.py file the format in which the Temperature and Humidity values are returned has changed. It now returns the values in the form
The format in which it used to return data and which is expected in the TempAndHumidity.java includes also a C for Celsius after the temperature value
Could you make the following update:
Let me know if this solves the parsing issue.
Thank you,
Veronica
Thank you very much guys, the C in the AdafruitDHT:py file was the problem.
Best regards,
Philipp