Connect Thermostat Device to IoT Central | Microsoft Azure IoT Developer Exam AZ-220

Connect Thermostat Device to IoT Central

Question

You are using IoT Central to manage your field devices.

You want to connect your previously registered thermostat device to IoT Central.

Here is the code your device uses for provisioning:

... # PROVISION DEVICE async def provision_device(provisioning_host, id_scope, registration_id, symmetric_key, model_id): provisioning_device_client =  ProvisioningDeviceClient.create_from_symmetric_key( provisioning_host=provisioning_host, registration_id=registration_id, id_scope=id_scope, symmetric_key=symmetric_key, ) provisioning_device_client.provisioning_payload = {"<......>": <......>} return await provisioning_device_client.register() ..

Which of the parameters used by the registration service to find the corresponding template for the device?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answer: C.

Option A is incorrect because the registration ID is required, but it is used to uniquely identify a device by the Device Provisioning Service.

Option B is incorrect because while the ID scope is required, it is used to identify the provisioning service the device will be registered by.

Option C is CORRECT because it is the device model that is used by the device provisioning service to associate the device with its corresponding device template.

This is used to determine the capabilities the device has.

Moodel_id of a device in the model description looks like this: "@id": "dtmi:com:example:Thermostat;1"

Option D is incorrect because the symmetric key is the key that will be used to create the shared access signature token to authenticate the device with DPS.

References:

In the given code, the device is provisioned using the Azure Device Provisioning Service (DPS) to obtain the device credentials for device authentication and secure communication with Azure IoT Hub. The parameters used in the provisioning process are:

  • provisioning_host: The provisioning service host URL for the Azure region in which the DPS instance is created.

  • id_scope: The unique identifier scope of the DPS instance. This is used to identify the specific DPS instance that the device is registered with.

  • registration_id: The unique registration ID for the device that is registered with the DPS instance.

  • symmetric_key: The shared secret key used for device authentication with the Azure IoT Hub.

  • model_id: The ID of the device model in IoT Central that the device is associated with.

In the context of the given question, the parameter used by the registration service to find the corresponding template for the device is the model_id parameter. This parameter identifies the device model that the device is associated with in IoT Central. The device model contains the configuration, properties, and telemetry definitions for the device, and is used by IoT Central to manage and monitor the device. By specifying the model_id parameter during device provisioning, the device is automatically associated with the corresponding device template in IoT Central.