Skip to main content
1-Visitor
October 21, 2019
Solved

Is a ValueStream needed to plot historic values for a property?

  • October 21, 2019
  • 1 reply
  • 1379 views

Hi Everyone,

I have only been introduced to TWx 2 days ago, so please excuse if this is a stupid question:

I have defined a GenericThing-based Thing called "MyThing" with Integer property "MyProperty".

If I want to plot a graph on a Mashup (using the line graph widget), of the property "MyProperty", as it changed over time, would I need to somehow map a ValueStream to this property? 

 

I have been trying to do this and I cannot figure out how to map the stream and property. I searched the tutorials and courses, but they don't show examples of this use-case.

 

Thank you in advance and kind regards,

Riaan

Best answer by PaiChung

You would need some sort of historical data store.

Value Stream or Stream is a structure that you can use.

It would be the easiest way for you to use a ValueStream and set logging to true and assign that valuestream to the Thing (then use QueryPropertyHistory services to pull data to display)

1 reply

PaiChung22-Sapphire IAnswer
22-Sapphire I
October 21, 2019

You would need some sort of historical data store.

Value Stream or Stream is a structure that you can use.

It would be the easiest way for you to use a ValueStream and set logging to true and assign that valuestream to the Thing (then use QueryPropertyHistory services to pull data to display)

riaanmarx1-VisitorAuthor
1-Visitor
October 21, 2019

Thank you PaiChung!

And does this ValueStream then replace the Integer Property I already created on the Thing, or would you then somehow bind the two so that the property only return the current value?

22-Sapphire I
October 21, 2019

The property shows the value in real time.

enabling logging on the property will now store this value over time as it varies.