Skip to main content

Azure Command

This block is triggered when a cloud-to-device command is received from Azure IoT Hub. Use it to handle remote control commands sent from the cloud.

Azure Command Block

Overview​

The Azure Command block enables your device to receive and respond to commands sent from Azure IoT Hub, allowing remote control and configuration of your device from cloud applications.

Configuration​

  • Command: The command to listen for

Command Parameters​

Commands from Azure can include parameters:

  • Parse JSON payload from command
  • Extract parameter values
  • Store in variables for processing
  • Validate parameter format and values

Use Cases​

Common scenarios for Azure commands:

  • Remote device control (turn on/off equipment)
  • Configuration updates from cloud
  • Firmware update triggers
  • Diagnostic mode activation
  • Emergency shutdowns or overrides

Response​

After processing a command, you can:

  • Send acknowledgment back to Azure
  • Report command execution status
  • Return result data
  • Log command execution

Example Flow​

  1. Azure IoT Hub sends command to device
  2. Azure Command block triggers
  3. Command parameters extracted
  4. Application logic executes command
  5. Confirmation sent back to Azure (optional)

See Also​