title | description | author | ms.author | ms.date | ms.topic | ms.service | ms.tool | ms.custom | services |
---|---|---|---|---|---|---|---|---|---|
Monitor device connectivity with Azure IoT Central CLI |
Monitor device messages and observe device twin changes using Azure IoT Central CLI commands to verify device connectivity |
dominicbetts |
dobett |
06/13/2023 |
how-to |
iot-central |
azure-cli |
device-developer, devx-track-azurecli, engagement-fy23 |
iot-central |
Use the Azure CLI IoT extension to:
- See the messages your devices are sending to IoT Central.
- Observe changes in the device twin.
- Diagnose issues where device messages don't reach the cloud.
- Diagnose issues where devices don't respond to twin changes.
Visit the Azure CLI extensions reference for more details
A work or school account in Azure, added as a user in an IoT Central application.
[!INCLUDE azure-cli-prepare-your-environment-h3]
Run the following command from your command line to install:
az extension add --name azure-iot
Check the version of the extension by running:
az --version
You should see the azure-iot extension is 0.14.1 or higher. If it isn't, run:
az extension update --name azure-iot
The following sections describe common commands and options that you can use when you run
az iot central
. To view the full set of commands and options, pass
--help
to az iot central
or any of its subcommands.
Start by signing into the Azure CLI:
az login
In Application > Management, copy the Application ID. You use this value in later steps.
Monitor the messages that are being sent to your IoT Central app from your devices. The output includes all headers and annotations.
az iot central diagnostics monitor-events --app-id <app-id> --properties all
View the current read and read/write device properties for a given device.
az iot central device twin show --app-id <app-id> --device-id <device-id>
A suggested next step is to learn Troubleshoot why data from your devices isn't showing up in Azure IoT Central.