Azure IoT Module Twin Synchronization

61 Views Asked by At
  1. If we attempt to add reported properties from .NET SDK for a property that is not defined as a desired property, is it possible?

  2. Does IoT edge runtime automatically sync the desired and reported properties or need to write custom code using SDK?

  3. How do module twin updates work when the device goes offline should we receive the update that we are listing using SDK? For example in .NET SDK there is one method that is SetDesiredPropertyUpdateCallbackAsync.

  4. What if the requirement comes to sync desired properties using reported properties? It is possible using .NET SDK?

Understand the flow of module twin synchronization of azure IOT hub.

1

There are 1 best solutions below

0
trial_and_error On

I'll try to answer your questions.

  1. Reported means reported back by the device. It reports that your desired property has been received by the device and successfully reported it back. So you can't really use that.

  2. You need some pieces of code to sync the twin

  3. It will be synced once it's back online

  4. Desired to reported is downstream (cloud to device) and reported can be used to trigger backend actions (device to cloud)

Have a further look at the docs: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-device-twins https://learn.microsoft.com/en-us/azure/iot-hub/module-twins-dotnet

Desired properties. Used along with reported properties to synchronize device configuration or conditions. The solution back end can set desired properties, and the device app can read them. The device app can also receive notifications of changes in the desired properties.

Reported properties. Used along with desired properties to synchronize device configuration or conditions. The device app can set reported properties, and the solution back end can read and query them.