Azure / iot_central_python_sample

Interacting with Azure IoT Central using a device written in Python
MIT License
5 stars 6 forks source link

"iotcModelId" details in provisioning_payload #1

Closed ghost closed 3 years ago

ghost commented 4 years ago

Hi I was wondering that in iot_central_sample.py file how do we come to know the key "iotcModelId" for assigning a template to the device during device registration in line number 226 provisioning_device_client.provisioning_payload = '{"iotcModelId":"%s"}' % (model_identity)

Can we also send as a payload the name of the device along with model identity..?

If yes how can we do it...?

firedog1024 commented 3 years ago

You can get the value for iotcModelId from the IoT Central application by selecting the "device template" -> clicking the device template you want the id for -> then click View identity and copy the value in interface @id

image

Right now you cannot specify the device name in the payload but that is a feature that is being considered for addition as others have noted it would be useful.