Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hello,
I successfully simulated my computer as several device, sending simulated data, generated from the Lua Script Agent running there, to the ThingWorx platform.
You can see on this first screen one of my device, with inside 3 parameters :
- AirHumidity
- FloorHumidity
- Temperature
which are updated automatically with the wsems and luascript running on my computer, as you can see on the screen below.
When i created my mashup, as i did during the first tutorial which works well, this time i had no data displayed.
To be sure of what happened, i decided to try something with the Time Series Chart, and if you look on the
bottom left of the screen below, on the DataField1 section, you will only see the local property testFloorHumidity, and not the other properties, catched from remote device.
My question is, how can I do to display data from remote device on Mashup Composer ?
Cheers,
Solved! Go to Solution.
Jordan Goasdoué : The issue seems to be that you have not logged the below properties:
- AirHumidity
- FloorHumidity
- Temperature
To fix it , edit the property and tick logged.
After doing this you should see the property values from your remote device.
-Durgesh
Jordan Goasdoué : The issue seems to be that you have not logged the below properties:
- AirHumidity
- FloorHumidity
- Temperature
To fix it , edit the property and tick logged.
After doing this you should see the property values from your remote device.
-Durgesh
Hi Jordan Goasdoué,
To add what Durgesh mentioned; the TimeSeries shows only Series Data.
If we are not logging the Property; there will no Series created for that property. Also, the QueryPropertyHistory Service won't even have that coumn as output.
So, we need to log the Data to show it in the Chart.
Thanks,
Ankit Gupta
Hi Ankit Gupta, Jordan Goasdoué,
I have similar kind of issue. I have a value stream for my remote thing. When I test the QueryPropertyHistory I see the result as below.
Prop_yaxis | Prop_xaxis | timestamp |
---|---|---|
-0.051 | -0.251 | 2017-05-05 11:15:10.251 |
-0.029 | -0.256 | 2017-05-05 11:15:10.181 |
-0.178 | -0.093 | 2017-05-05 11:15:09.941 |
-0.093 | -0.056 | 2017-05-05 11:15:09.679 |
-0.063 | -0.161 | 2017-05-05 11:15:09.628 |
0.0 | -0.12 | 2017-05-05 11:15:09.365 |
-0.095 | -0.015 | 2017-05-05 11:15:09.296 |
-0.237 | -0.071 | 2017-05-05 11:15:09.257 |
-0.103 | -0.134 | 2017-05-05 11:15:09.018 |
I want to show these data on timeseries chart. So binded ALL Data from returned data to timeseries chart, the DataField1 and DataField2 are empty here which is causing no data to be displayed when I view the mash up.
Thanks,
Azim
Hi azim hawaldar,
What is the DataType of Prop_yaxis and Prop_xaxis?
Are you seeing anything in the dropdown for DataField1 and DataField2?
baseType for both the field is String. I am not seeing anything in the dropdown for DataField1 and DataField2.
That's the issue. String is not a valid DataType for TimeSeries Chart.
You have two option:
Option 1: Change the DataType to number.
Option 2: Create a custom service to parse String data to number. Note: This option would increase the load on processor as the amount of Data will increase.
I hope it helps.
Hi Ankit Gupta,
I changed the base type to NUMBER and also the value being set for property is of double data type. One weird thing I noticed is the value being pumped into platform is not exactly the value being set using setProperty("Prop_xaxis",xaxis). In platform its either 0 or 0.1. My Virtual thing property definition is as below. Can you please tell me what is not correct below?
@ThingworxPropertyDefinitions(
properties={
@com.thingworx.metadata.annotations.ThingworxPropertyDefinition(name="Prop_xaxis", description="Xaxis reading of bearing1", baseType="NUMBER", aspects={"dataChangeType:ALWAYS", "dataChangeThreshold:0", "cacheTime:-1", "isPersistent:TRUE", "isReadOnly:TRUE","isLogged:TRUE", "pushType:VALUE"}),
@com.thingworx.metadata.annotations.ThingworxPropertyDefinition(name="Prop_yaxis", description="yaxis reading of bearing1", baseType="NUMBER", aspects={"dataChangeType:ALWAYS", "dataChangeThreshold:0", "cacheTime:-1", "isPersistent:TRUE", "isReadOnly:TRUE","isLogged:TRUE", "pushType:VALUE"})
}
)
Hi azim hawaldar,
Double is also a valid Datatype for Time Series chart.So, you can use Double too. String is not valid for TimeSeries chart.
Hi Ankit Gupta,
I think I didn't clarified you what problem I am facing. Sorry for that. When I was using string base type the value from Java sdk and the value in platform were same. But as per your suggestion when I changed the base type to NUMBER, the values are not matching. Why is that so please let me know
As per my understanding you mean that the data is getting trimmed after some decimals.
If yes, that's only for display. ThingWorx trims data to some decimals for display. But the complete data entry is there in the DB. Try creating a custom Service to read the properties and see if it shows correctly?
String Data is not trimmed that's why you might be seeing the complete data entry before.
Do let me know if I am missing anything here.
Hi Ankit Gupta,
Yes you were right. The value shown was trimmed. When I executed QueryPropertyHistory it was showin exact values. Marking your answer as right one. Thanks a lot. I will come to you if I have any doubts. Thanks again.
Hi Ankit Gupta,
Back to you again.
There were couple of questions again. Please help me .
1) Though the QueryPropertyHistory returned exact values when I executed the service, the values shown on mash up was trimmed one. How can I avoid this? I need exact values.
2) I remember for one of my question How to show Fast Fourier transform for a set of readings from accelerometer in mash up? u had said to use seriesType1 property of the xy widget to line to get a line. I didn't find this in XY chart. Its present only in time series chart. How can I get line view here?
Thanks,
Azim
Thank you for both your answers, it fixes my problem.
Cheers !