Search code examples
azure-iot-hubazure-iot-central

Sending Cloud-To-Device message for devices provisoned through IoT-central


I have been reading the documentation of this new SaaS offering, but I do not see any mention about being able to send a message to the device, eg: to switch ON/OFF an equipment.

https://learn.microsoft.com/en-us/azure/iot-central/tutorial-add-device

I do see there is a provision to change the settings of the device, by being able to alter device-twin.

Also, I read there is a way to send an "echo" to the device. But, these don't serve my exact purpose.

So, is there a way I can send a C2D message, using the connection-string, which can be built using the routine-? https://learn.microsoft.com/en-us/azure/iot-central/tutorial-add-device#prepare-the-client-code

I would like to send this C2D through an AzureFunction, but it would be good to know if this can be somehow integrated into the IoT-Central UI.

Any other inputs to achieve my requirement (switch ON/OFF an equipment) would be a great help too!


Solution

  • An API is now available to achieve this:

    https://learn.microsoft.com/en-us/rest/api/iotcentral/devices/executecomponentcommand