title | description | author | ms.author | ms.date | ms.topic | ms.service | ms.custom | zone_pivot_groups |
---|---|---|---|---|---|---|---|---|
Device developer guide - IoT Plug and Play | Description of IoT Plug and Play for device developers. Includes examples in the following languages: C, C#, Java, JavaScript, Python, and Embedded C. | dominicbetts | dobett | 1/10/2025 | conceptual | azure-iot | devx-track-extended-java, devx-track-js, devx-track-python | programming-languages-set-twenty-seven |
IoT Plug and Play lets you build IoT devices that advertise their capabilities to Azure IoT applications. IoT Plug and Play devices don't require manual configuration when a customer connects them to IoT Plug and Play-enabled applications such as IoT Central.
You can implement an IoT device directly by using modules, or by using IoT Edge modules.
This guide describes the basic steps required to create a device, module, or IoT Edge module that follows the IoT Plug and Play conventions.
To build an IoT Plug and Play device, module, or IoT Edge module, follow these steps:
- Ensure your device is using either the MQTT or MQTT over WebSockets protocol to connect to Azure IoT Hub.
- Create a Digital Twins Definition Language (DTDL) model to describe your device. To learn more, see Understand components in IoT Plug and Play models.
- Update your device or module to announce the
model-id
as part of the device connection. - Implement telemetry, properties, and commands that follow the IoT Plug and Play conventions
Once your device or module implementation is ready, use the Azure IoT explorer to validate that the device follows the IoT Plug and Play conventions.
:::zone pivot="programming-language-ansi-c"
[!INCLUDE iot-pnp-device-devguide-c]
:::zone-end
:::zone pivot="programming-language-embedded-c"
[!INCLUDE iot-pnp-device-devguide-embedded-c]
:::zone-end
:::zone pivot="programming-language-csharp"
[!INCLUDE iot-pnp-device-devguide-csharp]
:::zone-end
:::zone pivot="programming-language-java"
[!INCLUDE iot-pnp-device-devguide-java]
:::zone-end
:::zone pivot="programming-language-javascript"
[!INCLUDE iot-pnp-device-devguide-node]
:::zone-end
:::zone pivot="programming-language-python"
[!INCLUDE iot-pnp-device-devguide-python]
:::zone-end
Now that you've learned about IoT Plug and Play device development, here are some other resources: