Forum Discussion

CraigBreenHogg's avatar
CraigBreenHogg
Copper Contributor
Jul 11, 2023

Issue receiving simulated telemetry data in azure digital twins

Hey there,

 

I am still pretty new to digital twins/IoT and am currently working on a digital twin solution using simulated data from the IoT Hub VS Code extension. I can successfully send the simulated telemetry data to my IoT Hub however when I try to forward it onto my ADT instance using a Function file it is not being received.

 

From my thoughts there are 3 possible causes that might stop it from receiving the telemetry data.

  1. The Azure Function code - I have checked this over a couple times and have even checked with chat gpt to ensure this is correct.

  2. The DTDL model in ADT - I based this off of the working version of a twin I made before using a virtual raspberry pi and just added the simulated data sources which I was including.

  3. The Event Grid - Not 100% sure about this being the cause as from what I know of the process however I did the exact same set up as I did with my previous working project.

Any help will be greatly appreciated as I have hit a bit of a wall with it today!

1 Reply

  • Hello CraigBreenHogg ,

    please check this blog post about starting with Azure Digital Twins.

    Without the actual error message, it's hard to answer the question in a direct way.

    If the IoT hub messages are arriving in the Azure Function, the first step is successful.

    Then, check if the Azure Function has enough rights to manipulate the ADT environment (using a managed identity).

    A problem I faces was adding versus updating Twin properties. Make sure the properties already have a default value (you can add them in the Digital Twin Explorer if needed).

    Chat GPT is fun but reading the actual documentation and doing the ADT workshop is more useful.

    I am not sure why you have put an event grid between IoT Hub and the Azure Function. Check out the IoT Hub trigger for Azure Functions for a direct connection.

     

    ---

     

    If this post helped you, mark it as the best response so others with the same question recognize this.

     

Resources