There's the steamsensor sample in the ThingWorx DotNet SDK 5.5.
I built the sample code and run and made it connected to the ThingWorx Server.
And created SteamSensor1 Thing implementing RemoteThing and did the temperature/pressure properties binded.
And checked 'logged' for those properties and set Valuestream on the SteamSensor1 thing.
But the test result of 'QueryProperyHistory' service has the timestamp of '0001-01-01 09:00:00'.
(So always only one row is returned.)
(In case of running 'QueryNumberPropertyHistory' for 'temperature' , it returns rows with the timestamp '0001-01-01 09:00:00'. )
I tested ThingWorx DotNet SDK 5.5/ 5.0 both and the result were same.
And I found the SteamSensor Example of ThingWorx C SDK works well.
(When the SteamSensor of C SDK connected, the timestamp of Valuestream are fine.)
There must be some bugs in ThingWorx DotNet SDK.
Could someone check this for me?
The SteamSensor example does not generate timestamps as it just calls SetProperty() by default. In order to generate individual timestamps, you would have to use SetPropertyVTQ() instead.
Here is a KCS article which has more information on this (including some sample code to enable timestamps) - https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS206137&lang=en_US
Note that there's a slight error in the example code in that TS article:
If you follow the example and use vtq.setTime(new DateTime()) that will set the timestamp to January 1, 0001 at 00:00:00.000. You need to use...
vtq.setTime(DateTime.Now); to get the current date and time set against the property update.
Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!