An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
Hello @Haris Papageorge ,
the same question is answered here too.
Please compare your setup with the steps seen there.
There are two common pitfalls:
- An Azure Function listening to IoT Hub messages uses the 'eventhub compatible endpoint' of the IoT Hub. This endpoint will turn by default into a fallback route once custom routes are added to the IoT Hub. Notice a separate endpoint is defined to route all messages to that 'eventhub compatible endpoint'. Otherwise, typically not a single message is sent to the endpoint (because there are no fallback messages).
- An Azure Function listening to IoT Hub messages uses the 'eventhub compatible endpoint' of the IoT Hub. Please add a separate consumergroup (like 'AF') in the IoT Hub and use that in the Azure Function (other than $default).
If this is setup correctly, all messages will arrive both in the IoT Explorer and the Azure Function.
The terminal logging should still work. It's advised to activate Application Insights for more detailed debug scenarios.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.