|
| 1 | +--- |
| 2 | +title: Get started with module identity and module identity twins |
| 3 | +titleSuffix: Azure IoT Hub |
| 4 | +description: Learn how to create module identities and update module identity twins using the Azure IoT Hub SDKs. |
| 5 | +author: kgremban |
| 6 | +ms.author: kgremban |
| 7 | +manager: lizross |
| 8 | +ms.service: azure-iot-hub |
| 9 | +ms.devlang: csharp |
| 10 | +ms.topic: how-to |
| 11 | +ms.date: 09/03/2024 |
| 12 | +zone_pivot_groups: iot-hub-howto-c2d-2 |
| 13 | +ms.custom: mqtt, devx-track-csharp, devx-track-dotnet |
| 14 | +--- |
| 15 | + |
| 16 | +# Get started with IoT Hub module identities and module identity twins |
| 17 | + |
| 18 | +Module identities and module identity twins are similar to Azure IoT Hub device identities and device twins, but provide finer granularity. While Azure IoT Hub device identities and device twins enable the back-end application to configure a device and provide visibility on the device's conditions, a module identity and module identity twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system devices or firmware devices, module identities and module identity twins allow for isolated configuration and conditions for each component. For more information, see [Understand Azure IoT Hub module twins](iot-hub-devguide-module-twins.md). |
| 19 | + |
| 20 | +[!INCLUDE [iot-hub-basic](../../includes/iot-hub-basic-whole.md)] |
| 21 | + |
| 22 | +This article shows you how to develop two types of applications: |
| 23 | + |
| 24 | +* Device apps that view and update module identity twin reported properties and handle requests to update desired properties. |
| 25 | +* Service apps that can read and set module identity desired properties. |
| 26 | + |
| 27 | +> [!NOTE] |
| 28 | +> This article is meant to complement [Azure IoT SDKs](iot-hub-devguide-sdks.md) samples that are referenced from within this article. You can use SDK tools to build both device and back-end applications. |
| 29 | +
|
| 30 | +## Prerequisites |
| 31 | + |
| 32 | +* An IoT hub |
| 33 | +* An IoT hub device |
| 34 | +* An IoT hub device module identity |
| 35 | + |
| 36 | +* If your application uses the MQTT protocol, make sure that **port 8883** is open in your firewall. The MQTT protocol communicates over port 8883. This port may be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see [Connecting to IoT Hub (MQTT)](../iot/iot-mqtt-connect-to-iot-hub.md#connecting-to-iot-hub). |
| 37 | + |
| 38 | +:::zone pivot="programming-language-csharp" |
| 39 | + |
| 40 | +[!INCLUDE [iot-hub-howto-module-twins-dotnet](../../includes/iot-hub-howto-module-twins-dotnet.md)] |
| 41 | + |
| 42 | +:::zone-end |
| 43 | + |
| 44 | +:::zone pivot="programming-language-python" |
| 45 | + |
| 46 | +[!INCLUDE [iot-hub-howto-module-twins-python](../../includes/iot-hub-howto-module-twins-python.md)] |
| 47 | + |
| 48 | +:::zone-end |
| 49 | + |
| 50 | +:::zone pivot="programming-language-node" |
| 51 | + |
| 52 | +[!INCLUDE [iot-hub-howto-module-twins-node](../../includes/iot-hub-howto-module-twins-node.md)] |
| 53 | + |
| 54 | +:::zone-end |
0 commit comments