Closed dkattan closed 3 years ago
Thanks for your question about IoT Hub. This repo is focused on the design and development of DTDL (Digital Twins Definition Language).
To help you with your question, the IoT Hub team says: currently IoT Hub does not route device connectivity state events. These are available via Event Grid. See this concept doc and tutorial on how to use them - here.
IoT Hub issues can be reported through the feedback link on the Overview portal page for your Azure IoT Hub portal or through the Azure IoT feedback forum: https://feedback.azure.com/forums/321918-azure-iot.
Query/Question According to this page, it is possible to use Message Routing to receive Device Connect and Disconnected events and route them to the internal Event Hub
In practice, we receive DeviceCreated events, but do not receive DeviceConnected or DeviceDisconnected events.
We tried creating Routes for all available Data Sources, to no avail:
I can watch the DeviceTwin connectedState change from Connected to Disconnected and vice-versa, but we do not receive any events when this happens.
My hypothesis is that this particular functionality (ability to receive lifecycle events on the built-in eventhub) is in some sort of public preview and needs to be enabled by some unpublished mechanism.
The information about this is inconsistent and sparse.
There is this Stack Overflow post from 2018 suggesting that this is not a supported feature of the IoT Hub.
But then there is this blog post from March 2020 suggesting it is a supported feature:
@briancr-ms @ridomin