Azure digital twin explorer is not showing telemetry data in twins

Shankar Parab 0 Reputation points

I have connected "Raspberry Pi Azure IoT Online Simulator" to stream data into Azure IoT hub. IoT Hub is sending that data to azure function via EventGrid. I have written python code for Azure function to take data from Event Grid and send it to Azure digital twins. I have added model in Azure digital twin explorer and created new twins with same name as IoT Hub device name. But Azure digital twins is not reflecting the temperature and humidity data.

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
393 questions
Azure Digital Twins
Azure Digital Twins
An Azure platform that is used to create digital representations of real-world things, places, business processes, and people.
224 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,631 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,156 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
350 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 31,116 Reputation points MVP

    Hello @Shankar Parab ,

    although I am not familiar with the details in Python, your code seems to resemble a lot of the C# examples seen here.

    There are two things I can think of right now.

    First, be sure your Azure Function has rights/permissions to alter twins in Azure Digital Twins.

    Also, you are using 'replace'.

    I remember this works well if the twin property has a value already.

    Please compare your code with these C# examples. And try out the C# examples next to your Python code.

    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.