I´m using the Azure IoT SDK for Java DeviceTwin functionality. On calling startDeviceTwin()
, I receive the reported and desired properties once in the TwinPropertyCallBack
.
However, inside of the Property
sent, I can only get the version
of the 'root node', not for the sub-properties or TwinCollection
s (they are all null
). On Azure Portal, I can clearly see that all of them have their own versions in the metadata section of the JSON. Example:
...
"properties": {
"desired": {
"Broadcast": {
"0": {
"Scene": 2,
"Brightness": 13
}
},
"$metadata": {
"$lastUpdated": "2020-12-01T07:53:53.0372127Z",
"$lastUpdatedVersion": 17,
"Broadcast": {
"0": {
"$lastUpdated": "2020-12-01T07:53:53.0372127Z",
"$lastUpdatedVersion": 17,
"Scene": {
"$lastUpdated": "2020-12-01T07:53:53.0372127Z",
"$lastUpdatedVersion": 17
},
"Brightness": {
"$lastUpdated": "2020-12-01T07:28:08.5730028Z",
"$lastUpdatedVersion": 15
}
},
"$lastUpdated": "2020-12-01T07:53:53.0372127Z",
"$lastUpdatedVersion": 17
}
},
"$version": 17
},
...
How can I receive these versions for the nested TwinCollection
s? Is it some configuration or is it just not supported currently?
In the above example, I want to prevent re-processing of the Brightness value, as my local state is already at 'Version 15'.
Related Github issue posted at:Azure/azure-iot-sdk-java/issue
Below is the response from MicrosoftTeam.
Please comment below if you need further help in this matter.