Forum Discussion

Bhavin163884's avatar
Bhavin163884
Copper Contributor
Jul 23, 2024

IOT device event twin change detect

What are the ways to catch IOT device event twin change in azure? I want to send notification or execute something like function app, when device twin event occur and reported property get change. I am using .net 8 and azure.

let me know all possible ways.

Thanks,
Bhavin Bhesaniya.

  • Bhavin163884
    Here are the ways to do it:
    Azure IoT Hub Events: Use Event Grid to subscribe to IoT Hub events, like device twin updates. Trigger a Function App or send notifications!
    Device Twin Queries: Use Azure IoT Hub's device twin queries to fetch updated device twins and trigger actions.
    Direct Methods: Use direct methods to invoke a Function App or perform actions when a device twin update occurs.
    Device Twin Subscriptions: Subscribe to device twin updates using the Azure IoT Hub SDK for .NET.
    Azure Functions: Create a Function that monitors device twin updates and triggers notifications or executes logic.
    Azure Logic Apps: Design a Logic App that listens to device twin updates and initiates workflows.
    Azure Event Hubs: Stream device twin updates to Event Hubs and process them using a Function App or other services.
    Azure Stream Analytics: Analyze device twin updates in real-time using Stream Analytics and trigger actions.
    Azure IoT Edge: Run a Function App or custom logic on an IoT Edge device to react to device twin changes.
    Webhooks: Configure webhooks in Azure IoT Hub to notify your app or services when device twin updates occur.
    Check out the Azure IoT Hub docs and SDKs for .NET to get started

Resources