Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi,
I am Successfully reading Sensor values to Thingworx, I have kept 5secs for autorefresh widget,
the values are updating every 5secs ,but i want all Values should be stored in Valuestream every second ,In "QueryPropertyHistory" its showing only 2-3 values., i want to see each and every reading that had been sent to Thingworx proprties. How to do it??
please help
And I chose "Valuestream",, should i try with "Remote value stream"??
Akshayakumar p : Can you share your property Data Change type option for Temperature and Humidity. Is it set to Always ?
Hereit is sir
"Data change type" is not always sir!
should i set it to always??
Akshaya, ValueStream is the right option for you. Remote Value Stream has different purpose (i.e when you are setting up federated ThingWorx). How fast is the value changing on the edge device? What is the Data Change Type for the property in the Thing? How often are you scanning for property change on the edge? All of these parameters will affect how many values you are seeing in a given time period in your value stream.
It really depends if you want all values, doesn't matter whether its changing or not to be pushed to the platform then you can set to always. In that case every time scan is performed by the SDK value will be pushed to the platform.
Usually in production environment you are mostly interested when the values do change for e.g. changing from 1 to 2 this will create a event and value will be pushed to the platform with the next scan. If it will change again back to 1 from 2 it will again be pushed to the platform. (Note i am not including yet the Threshold in discussion here, so assuming its not set.)
So I think you should check how fast you are scanning for value change on the edge side. BTW, the screenshot you have shared appear to show that data change type is set to Always. So with that you will get all the values with every scan.
Which SDK are you working with?
Actually i am using EMS,
now i changed "DataChangeType" to always!,
so that all the values will be stored in Valuestream sir??, can i see them in "QuryPropertyHistory"
Yes you should be able to see them in the QueryPropertyHistory. Are you using Lua together with the EMS? What scanrate has been set in the configuration file? See Configuring the scanRateResolution for more detail . Note default value is set to 60000ms.
Scan rate has been set to 1000 sir,
actually i am seeing Values in QueryPropertyHistory but its showing only 3 readings.
but i want each and every reading that has been updated in every 5 seconds.
can you please share your lua configuration for the thing and the ValueStream configuration? Is the property in the ValueStream set to persistent?
sir,I have created Luascript for only Thing, not Valuestreams sir.
i just Created valuestreams incomposer and assigned it to the Thing thats it sir.
here is my Luascript for Thing
scripts.log_level = "INFO"
scripts.PiThing = {
file = "thing.lua",
template = "PiTemplate",
scanRate = 1000,
taskRate = 30000
}
scripts.rap_host = "127.0.0.1"
scripts.rap_port = 80
Thanks for sharing the lua config. Sorry if i was not completely clear, definitely you don't create script for value stream. What i meant was that how is the value stream configured in the ThingWorx Composer which you are using for recording these values.
i just created a valuestream "Pithing_valuestream" and tagged it to a model tag,
assigned this Valuestream to my Thing "PiThing" sir!