IoT Plug And Play device samples

These samples demonstrate how a device that follows the IoT Plug and Play conventions interacts with IoT Hub or IoT Central, to:

  • Send telemetry.
  • Update read-only and read-write properties.
  • Respond to command invocation.

The samples demonstrate two scenarios:

  • An IoT Plug and Play device that implements the Thermostat model. This model has a single interface that defines telemetry, read-only and read-write properties, and commands.
  • An IoT Plug and Play device that implements the Temperature controller model. This model uses multiple components:
    • The top-level interface defines telemetry, read-only property and commands.
    • The model includes two Thermostat components, and a device information component.

Configuring the samples in Visual Studio

These samples use the launchSettings.json in Visual Studio for different configuration settings, one for direct connection strings and one for the Device Provisioning Service (DPS).

The configuration file is committed to the repository as launchSettings.template.json. Rename the file to launchSettings.json and then configure it from the Debug tab in the project properties.

Configuring the samples in VSCode

These samples use the launch.json in Visual Studio Code for different configuration settings, one for direct connection strings and one for DPS.

The configuration file is committed to the repository as launch.template.json. Rename it to launch.json to take effect when you start a debugging session.

Quickstarts and tutorials

To learn more about how to configure and run the Thermostat device sample with IoT Hub, see Quickstart: Connect a sample IoT Plug and Play device application running on Linux or Windows to IoT Hub.

To learn more about how to configure and run the Temperature Controller device sample with: