Skip to main content
1-Visitor
March 22, 2018
Solved

Get Most Recent Stream Entry from Thing

  • March 22, 2018
  • 2 replies
  • 1879 views

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

Best answer by mnarang

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

mnarang5-Regular MemberAnswer
5-Regular Member
March 22, 2018

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 

5-Regular Member
April 5, 2018

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