Skip to main content
Mar 22, 2018 12:34 PM UTC
Solved

Get Most Recent Stream Entry from Thing

Hi 

 

Does anyone know of the best practice to get the most recent stream entry without using: GetProperties or  GetPropertyValues? 

 

I am inputting CSV data into a stream. When I call either GetProperties or GetPropertyValues this returns 0 even though the QueryPropertyHistory has values.

 

Capture2.JPGCapture1.JPG

 

 

Any guidance would be appreciated!


Sean

mnarangAnswer
Mar 22, 2018 1:35 PM UTC

Hello,

 

It's the queryProertyHistory only which displays value being logged in a value stream. This can be used in a mashup to retrieve the values in a chart .The point is you can use this service in as dynaic ThingTemplate and that can take your thing name as entity name and will take out logged stream entries for your thing on the mashup.So basically you don't need a getPropertyValues/getProperty for this use case . 

 

I think i addressed your question in right direction .You can also see this kind of use in below video tutorial .

 

https://www.youtube.com/watch?v=Z4-ALgFKNpE&feature=youtu.be

 

Thanks,

Mukul Narang 

2 replies

mnarangAnswer
Mar 22, 2018 1:35 PM UTC

Hello,

 

It's the queryProertyHistory only which displays value being logged in a value stream. This can be used in a mashup to retrieve the values in a chart .The point is you can use this service in as dynaic ThingTemplate and that can take your thing name as entity name and will take out logged stream entries for your thing on the mashup.So basically you don't need a getPropertyValues/getProperty for this use case . 

 

I think i addressed your question in right direction .You can also see this kind of use in below video tutorial .

 

https://www.youtube.com/watch?v=Z4-ALgFKNpE&feature=youtu.be

 

Thanks,

Mukul Narang 

Apr 5, 2018 1:52 PM UTC

Hi @smayer

Just wanted to follow up to see if Makul's response answered your question.  If so, please indicate Accepted Solution. If not, please advise on your current status.

 

Thanks!

Leigh