Skip to main content
19-Tanzanite
Nov 30, 2016 1:43 PM UTC
Question

Get specific data from Value stream

Hi,

I have created a thing with 4 property S1 , S2, S3 & TC from hardware device. Am logging the data to my value stream. Now I have to extract particular data using timestamp.

For Ex: S1 S2 S3 and TC are Count of a product per day. In mashup when I select date using widget, Count for that particular date should be displayed in using ValueDisplay/ LED widget. Help me with this.

Regards,

Vel

8 replies

5-Regular Member
Nov 30, 2016 9:25 PM UTC

If you look under "Snippets" in the Services Editor, you can find one called "Create query for Stream". Select the stream name, and then add a timestamp filter. Pass the timestamp in as a parameter, import this service into a mashup, and bind everything as needed. Hope this helps!

Translate
1-Visitor
Oct 17, 2017 4:07 PM UTC

Hi Tori,

I was trying to implement similar but I can't find my ValueStream in stream name list. What else I should do to achieve the same ?

Regards,

Neety

Translate
5-Regular Member
Oct 17, 2017 7:15 PM UTC

valuestream and stream are 2 different entity types.. while valuestream stores timeseries data, stream gives you capability to create your own data structure...

for your case all you have to do is look at the basetype of your defined property (ex:NUMBER, STRING etc) and then use the corresponding Queryservice available on your Thing (or ThingTemplate) depending on what your mashup needs... for instance if the basetype is Number then there is a service called QueryNumberPropertyHistory... you just have to pass property name and timestamp and it will return the required values...

Translate
Velkumar19-TanzaniteAuthor
19-Tanzanite
Dec 3, 2016 4:35 AM UTC

Hi Tori,

I tried to do that, the problem in that snippet I need to select thing but I cant find my thing.

Translate
5-Regular Member
Dec 5, 2016 2:27 PM UTC

Are you able to find the thing using the spotlight search field?

Translate
5-Regular Member
Jan 17, 2018 1:21 PM UTC

do you still need help with this or the answer I gave above in the thread solves your problem ?

Translate