- Azure IoT Hub - Cloud Device and Security management, for receiving data from device sensor
- Azure Event Grid - Send telemetry to event grid subscription
- Azure Functions - using event grid trigger to read from Event Grid subscription and update accordingly to Azure Digital Twin
- Azure Digital Twins - Store Current data in Twin and Export to Event Hub
- Azure Event Hub - intermediate store to push to Azure Data Explorer
- Azure Data Explorer - historical data storage for further analytics
Reference: https://learn.microsoft.com/en-us/azure/digital-twins/how-to-ingest-iot-hub-data
- Step 1: Set up Azure IoT Hub
- 1: Create an Azure IoT Hub instance
- 2: Create a device with a device id
- 3: Make note of the device connection string and replace in the TurbinetoIoTHub.py
- Step 2: Azure Digital Twins
- 1: Setup a digital twin instance
- 2: Using the Windturbine.json model (DTDL language) to describe the properties, relationships, and capabilities of your device.
- 3: Create a Twin with a matching twin id from the device id in IoT Hub
- Step 3: Set up the device sensor (Python)
- 1: Install the required Python libraries: pip install azure-iot-device azure-iot-hub
- 2: Running the TurbinetoIoTHub.py to send the data to Azure IoT Hub
- Step 4: Create Azure Function - C#
- 1: Using Visual Studio to create a Azure Function project (follow the step in the reference link). Using the IoTHubtoTwins.cs code to paste in the main code file
- 2: Configure the function app to connect to Azure Digital Twin
- Step 5: Connect the function to IoT Hub
- Step 1: Create an Event Hub namespace and event hub
- Step 2: Create a Kusto (Azure Data Explorer) cluster and database
- Step 3: Set up data history connection between the Azure Digital Twins instance, the event hub, and the Azure Data Explorer cluster.
- Step 4: Verify the data flow