Skip to main content

Using IoT Hub Direct Methods to Change Device Properties

Hands-On Lab


Photo of

Training Architect





The primary purpose for an Azure IoT hub is to be somewhere the devices, or "things," can send telemetry. But did you know it can talk back to the things as well? Standard Tiers of Azure IoT Hub allow for cloud-to-device communication. One of the options by which we can communicate from our back-end applications to our devices is by using direct methods. Direct methods are used for communications that require immediate confirmation of the result. Direct methods are often used for interactive control of devices. In this hands-on lab, we will create a device in a pre-provisioned Azure IoT hub and then use a Node.js application to simulate the physical device. As our "device" sends telemetry information back to the IoT hub, we will use another Node.js application to send a direct method to the device, forcing it to change the interval in which it provides telemetry.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.