Istorn
Istorn

Reputation: 596

Azure IoT Hub: "onChangeStatus" trigger with C# solution

Once I got a devices connected to my hub, I would like to listen its own status changes and catch them.

Moreover the classic pattern (creating an async task, given the previous device obtained through query, repeat and see if the status has been changed then get the event's datetime) is there any kind of built-in method which could help me?

Upvotes: 0

Views: 288

Answers (2)

Roman Kiss
Roman Kiss

Reputation: 8265

The following docs can help you for your eventing:

The above documents described how to capture and route the device twin change events to the EventHubTrigger function.

Upvotes: 1

silent
silent

Reputation: 16198

The integration of IoT Hub with Azure Event Grid sounds exactly like what you are looking for: https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-event-grid

enter image description here

There is also a sample/tutorial using Logic Apps: https://learn.microsoft.com/en-us/azure/event-grid/publish-iot-hub-events-to-logic-apps

Upvotes: 1

Related Questions