Getting Started Azure IoT Hub
Azure IoT Fundamentals

Overview of Azure IoT Hub
Quick Starts
0. Install Azure Cli
$ brew update && brew upgrade azure-cli
$ az extension add --name azure-cli-iot-ext- Send Telemetry (Python)
1.1 Create an IoT hub
1.2 Register a device
known bug with MacOS and Python3.5

1.3 Send simulated telemetry
1.4 Read telemetry from your hub
2. Control a device (Python)
Register a device
- Add the IoT Hub CLI extension and create the device identity. Replace
{YourIoTHubName}with the name of your IoT hub:
$ az extension add --name azure-cli-iot-ext
$ az iot hub device-identity create --hub-name {YourIoTHubName} --device-id MyPythonDevice2. Run the following command to get the device connection string for the device you just registered:
$ az iot hub device-identity show-connection-string — hub-name {YourIoTHubName} — device-id MyPythonDevice — output table3. You also need a service connection string to enable the back-end application to connect to your IoT hub and retrieve the messages. The following command retrieves the service connection string for your IoT hub:
$ az iot hub show-connection-string — hub-name {YourIoTHubName} — output tableCall the direct method
The back-end application connects to a service-side endpoint on your IoT Hub. The application makes direct method calls to a device through your IoT hub and listens for acknowledgements. An IoT Hub back-end application typically runs in the cloud.
Troubleshooting:
https://developers.de/2018/08/13/device-identity-is-not-in-the-az-iot-hub

