• 4 min read

Enabling more device management scenarios with new features in IoT Hub

We are excited to announce two new features in IoT Hub that are being released in public preview at Build: automatic device management, and module identities and module twins...

We are excited to announce two new features in IoT Hub that have now been released: automatic device management, and module identities and module twins. Each of these features enable new scenarios to enhance device management capabilities within your IoT application built on Azure IoT Hub.

Automatic device management

Automatic device management in Azure IoT Hub automates many of the repetitive and complex tasks of managing large device fleets over the entirety of their lifecycles. With automatic device management, you can target a set of devices based on their properties, define a desired configuration, and let IoT Hub update devices whenever they come into scope. This is performed using an automatic device configuration, which will also allow you to summarize completion and compliance, handle merging and conflicts, and roll out configurations in a phased approach.

Automatic device configurations works by updating a set of device twins with desired properties and reporting a summary based on device twin reported properties. It follows the principle of desired state configuration, allowing developers to define a desired state and letting the system handle the complexities of updating targeted device twins, managing conflicts, automatically updating devices that come into scope, and summarizing compliance. The feature introduces a new class and JavaScript Object Notation (JSON) document called a Configuration which has three major parts:

  1. The target condition defines the scope of device twins that will be updated. The target condition is specified as a query on device twin tags and/or reported properties.

  1. The target content defines the desired properties to be added or updated in the targeted device twins. The content includes a path to the section of desired properties to be changed.

  1. The metrics define the summary counts of various configuration states such as Success, In Progress, and Error. Metrics are specified as queries on device twin reported properties. System Metrics are default metrics that measure twin update status, such as the number of device twins that are targeted and the number of twins that have been successfully updated.


Module identities and module twins

Similar experiences as device twin but at a finer granularity – Module identities and module twins are similar to Azure IoT Hub device identity and device twin, but provide finer granularity. While Azure IoT Hub device identity and device twin enable the back-end application to configure a device and provide visibility on the device’s conditions, a module identity and module twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system based devices or firmware devices, it allows for isolated configuration and conditions for each component. Module identity and module twin provide a management separation of concerns when working with IoT devices that have modular software components.

Use device twin and module twin together to isolate the development between different components – Originally in the development of an IoT solution development, a device twin is shared between different developers for device management. There was no isolation between components. With the introduction of module identity and module twin, developers can instantiate up to 20 module identities under 1 device identity, which implicitly creates 20 mapping module twins. Each component on the device can be registered as a module. This way each developer can work separately without having others access his or her twin content. Each component can work in isolation without the risk of corruption of the device twin. Additionally, with the creation of module twins, the device twin can then be used in shared device settings. If the App developer wants to isolate or control access to different settings for the single app, she can create two module twins and separate the settings that will be set by the different roles/personas. This enables a back-end application to control access (read and write) for the different sets of settings for the app.

Newly introduced as device management primitive but not new – If you are familiar with IoT Edge, you must have seen module twin before as part of IoT Edge module management service. Azure IoT Edge modules are the smallest unit of computation managed by IoT Edge and can contain Azure services (such as Azure Stream Analytics) or your own solution-specific code. However, outside of IoT Edge, a module can simply be a connection from the device to cloud. It doesn’t have to have any running code or logic.

More building blocks for IoT Hub device management

With today’s announcements, we are adding to existing device management primitives in IoT Hub, namely device twins and identities, queries, direct methods, and jobs. Module twins and identities represent another primitive to enable isolation between subsystems on a device, and over-the-air updates builds on top of these primitives to provide an additional convenience layer so that developers can focus on other challenges.




Get started today!

For more information about the module identity and module twin, visit understand and use module identity and module twin in IoT Hub documentation. For more information about over-the-air configuration, visit configuring devices at scale. Both features are now available in the Azure portal (East US, West US, Northern Europe, and Western Europe regions are excluded from the preview of automatic device management). You can also check out the Internet of Things Show on Channel 9 to learn more about device management in IoT Hub.