Reputation: 33
In the Azure Hub device twin we have Desired Properties and Reported Properties. I guess that is like a setpoint and actual value.
So when I want to change a value I update the Desired Property and then wait for the corresponding Reported property to be updated with the actual value would that be right?
When updating the Desired Property, is it normal practise to not touch the corresponding Reported Property? I mean set it to null or something to indicate that we do not have an actual reported value yet... If the device property was indeed updated but the the report message from the device fails to arrive we will have an old reported value. I would think it should not be updated and maybe there are timestamps for these properties to see if the reported value is not yet updated.
Upvotes: 0
Views: 1167
Reputation: 4085
It's not normal practice to change the reported properties of a device when changing the desired property. If the device has not reported that property, it simply won't be available in the reported properties. So to answer both of your questions, here's a scenario:
$lastUpdated
value with a timestamp.Reported properties are just that, reported. A device can report properties that aren't in the desired properties, or update a reported property without receiving a new desired property.
Upvotes: 1