as far as I can tell you have this correct.
with a Push type of Value or Always, the device should be writing the value to the platform every time either when it scans or when the scan runs and the value has changed at the device side.
On the platform you should just set it to Always Read From Cache (I think it may say Read from Server Cache) this means you are depending on the Push from Device to Platform and you will never go to the device to fetch the value, when you are reading the property value on the platform.
For some reason, my Temperature property is not getting updated.
Here are the annotations:
description="The device temperature",
I can see the values sending updates on the server, but when i refresh the properties there are no changes.
Here are the attributes in composer:
If i change the cacheTime to a positive value like 1, then it picks up the values from the cache.
Seems that you have to set a cacheTime value > 0 to see values refresh. I believe this means that if the value in the cache has expired, it will fetch from the Virtual Thing. This is not the behavior i want. I only want the values read from the cache.
What am i doing wrong?
I'm using Thingworx Edge SDK 6.0.0 and Thingworx 7.2.
Nope...setting cacheTime = -1 will cause the RemoteThing to fetch from the VirtualThing on each value request. That's not what i want. I just want the RemoteThing to read from the property cache and the VirtualThing to push to the property cache.
dataChange threshold controls when a data change event occurs on the platform. It works in conjunction with dataChangeType.
Has nothing to do with how the platform retrieves data for a property.
Hi Robert ,
I Would like to give a detailed description of how Cache Time works , I believe that will help you understand as if whats happening here. I think System is Working as designed we can configure cache time to get what we want.
If you want Remote Thing to read from Property cache , you will have to cache that value , which as you rightly said will be decided by the time mentioned in Cache time.
Cache Time in little detail :
cacheTime — Tells the ThingWorx server how to behave when reading a remote property. This parameter can take the following values:
-1 — Indicates that the VirtualThing always sends its value, and the server should never request it from the remote application. The value returned always comes from the in-memory cache of the server. Use this value for properties that are configured to be pushed to the server.
0 — Indicates that every time the server uses the value, it should request it from the VirtualThing.
Any other positive value — Indicates that the server should cache the value for that many seconds and then retrieve it from the VirtualThing only after that time expires.
This setting is important for properties that may be accessed frequently by many users. For example, if 100 users attempt to access a property value within a 10 second period, you may want to set this value to 30 seconds. That would ensure that only a single request for the property is sent to the edge every 30 seconds. However, the value returned by the platform could be out of date by up to 30 seconds.
Please share your thoughts as I think behavior, you are witnessing from Thingworx is Normal .
Robert , I think there was slight confusion which I understood now , With Cache time = 0 , the values in Remotething on Thingworx server should change , and if its not changing with cache time = 0 , it and its changing with cache time greater than few seconds , it could be related to some other factor like server taking time to update property value directly from Edge, as the new values getting pushed every time .