IoT Hub Direct Turn on/off devices

Umair Akhtar 41 Reputation points
2022-11-10T08:55:11.17+00:00

Hi,

So I would like to know turn on/off commands for iot hub cloud to device communication. I have looked in to iot hub commands i.e. 'Reboot', 'SetTelemetryInterval' but I have not yet found commands to turn on/off devices. I have to describe code that sends commands to turn on/off the device. I am creating Azure function C# for this problem. Function will be called from PowerApps.

Thank you

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
377 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,112 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Vishu Tyagi 1 Reputation point
    2022-11-28T09:11:31.397+00:00

    @Umair Akhtar
    I think you should use the Device Update feature. It was in preview and recently added as GA.
    https://learn.microsoft.com/en-us/azure/iot-hub-device-update/understand-device-update
    You can run firmware updates with the help of this feature and combine it with automatic device management to categorize the devices and
    run updates in batches.

    and in case of running direct methods (giving and command device)you can use Jobs

    0 comments No comments