how to ingest iot hub data TUTORIAL error

ricardo pereira 1 Reputation point
2022-06-22T16:52:28.637+00:00

Hi community, I am trying to follow this https://learn.microsoft.com/en-us/azure/digital-twins/how-to-ingest-iot-hub-data#code-try-7
however I am not using the thermostat67 to simulate a device, I am using a device I created myself, however at the end of the tutorial when I do the last query I get a blank payload.
any thoughts on what I need to look out for if I am not using the suggested device?
maybe something I need to change in the function that processes the telemetry data?

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,157 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ricardo pereira 1 Reputation point
    2022-06-23T14:59:35.313+00:00

    @AshokPeddakotla-MSFT Really appreciate the time you invested to answer this, so I managed to make it work 10 min ago :)
    Basically my issue was that the payload I was sending from my device was not in the expected format for the C# function the tutorial uses.
    to solve it I opened the Thermostat67 code learned how the payload was being handled and emulated in the same way on my own device.
    Once I figured that out I was able even to extend the payload and now I am sending RH, CO2 and Temp. data to my digital twin using that workflow, very useful!

    following up with one question, am I right to say that the pipeline is in place now, correct? as long as I have a digital twin and a device with matching IDs I can always use this pipeline to send telemetry data to my twin and keep querying it.

    so if I have Device_A & Device_A on my IoThub and matching DTs ... once I start to send data using my script that simulates the devices, I will be getting the DT metadata updated on the other end.