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.
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
- Azure IoT Hub sends command to device
- Azure Command block triggers
- Command parameters extracted
- Application logic executes command
- Confirmation sent back to Azure (optional)
Related Blocks
- Azure Telemetry: Send data to Azure
- Variable Set: Process command parameters
- If Condition: Validate command values