Data Export against specific device template seems to not work as expected..

Darren Wainwright 56 Reputation points
2021-03-29T16:16:29.883+00:00

Hey folks,

I'm attempting to use the Data Export feature in IoT Central and facing an issue trying to limit messages based on the device template.

Here's the skinny...

I have create a webhook destination; currently NGROKing to my local machine.

I have created a data export that applies 2 filters

1) Where a particular telemetry value contains a string 00:0
2) Where a device template equals a specific template - I select the template from the drop down

When I power up my device it connects into IoT Central and begins sending telemetry.

If i exclude the filter #2 above then my webhook is called.

As soon as i include the template filter, i no longer receive webhook data.

When i inspect the payload received in my webhook (without the template filter) I see a template Id that looks nothing like the template Id that the device is actually using. In fact, everything after dtmi: looks random.

I've exported all templates from IoT Central to see their ID's and find nothing that matches the template Id being fed through.

Am I doing something wrong here?

Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
342 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dom 1,466 Reputation points Microsoft Employee
    2022-09-15T09:25:54.64+00:00

    In IoT Central, a device template contains a device model (and other information such as cloud property definitions).

    On the device template definition screens, if you select Edit DTDL you see the device model ID at the top of the DTDL. The device model ID looks like "@id": "dtmi:com:example:Thermostat;1". The model ID is unique ID for the model that's being used and is included if you chose to import a device model. You can find a repository of these models here: https://github.com/Azure/iot-plugandplay-models. You can find a definition of the device model ID here: https://github.com/Azure/opendigitaltwins-dtdl/blob/master/DTDL/v2/dtdlv2.md#digital-twin-model-identifier

    Internal to your IoT Central application, each device template is assigned an ID that's used just by this application. You see this identifier in the card that appears if you hover over a device in the device list:
    241404-image.png

    When a device connects to IoT Central, it should include the device model ID so that IoT Central can identify the correct model to use. IoT Central then locates the device template that incudes this device model.

    When IoT Central exports data, it includes the device template id in the export payload - it's this value that the export definition uses to filter.

    0 comments No comments