How add digital twin tags to body messages of iot Devices

Masaniello 65 Reputation points
2023-01-25T09:13:37.6366667+00:00

Let's say i got 4 devices connected to my IOT HUB, and the messages sent from the devices to the iot hub contains only the parameters that i'm interested to(humidity temperature). I assigned a tag to every devices, using device twin, so i can filter them. Then i have created a route that send data to a Blob storage. When i went inside the blob to see what i got, i noticed that the device twin tags are not there.; i can only see deviceId and the body message. Is there a way to send to blob storage the message and the device twin tags that the IOT HUB assigned to it? I need the tags to filter message using a query.

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
383 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.
220 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,438 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,126 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde 28,796 Reputation points MVP
    2023-01-25T16:07:29.9333333+00:00

    Hello @Masaniello ,

    So you have tags added to your devices and set up a route to blob storage using a certain custom routing endpoint.

    Check out the enrichment feature in the IoT Hub:

    User's image

    Here you can add one or more tags to your incoming messages as extra context.

    These will appear as application properties in the outgoing messages.


    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.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful