0

I am at a bit of a loss and need a bright idea.

I have created a new device model in IoT Central which has two components and an interface. The interface is also in the default component.

Device Model

If I now send my data via mqtt, I do this via mqtt to the endpoint /devices//messages/events.

mqtt request

This works so far that my telemetry data can be assigned to the properties of the default component and the interface contained there.

raw data

However, I do not manage to assign data to the second component. These are always displayed as _unmodeleddata.

My question: Why is the telemetry data for the second component not matched against the data model?

Thank you for the explanation.

Best Regards Init5

Init5
  • 23
  • 4

1 Answers1

1

Sending the telemetry data must be done by component with a specific component name. Only a default component doesn't need this name.

The following example shows how can be setup this component name in the topic in the case of direct MQTT protocol:

devices/mydevice/messages/events/$.ct=application%2Fjson&$.ce=utf-8&$.sub=myComponentName

More details here.

Roman Kiss
  • 7,925
  • 1
  • 8
  • 21
  • Thank you, Roman. That was exactly the point. Do you have a link to a corresponding documentation? Unfortunately, I haven't found anything specific on the Microsoft pages. That would be great. Thanks Init5 – Init5 Jan 29 '21 at 17:27
  • have a look at the https://learn.microsoft.com/en-us/azure/iot-pnp/concepts-convention#telemetry – Roman Kiss Jan 29 '21 at 18:11