Can a device create or update its device template over MQTT

Suresh, Albin 36 Reputation points
2020-11-02T08:10:22.183+00:00

Does IoT Central support a device to create and publish its own device template over an MQTT connection (or even HTTP) before it starts sending any data conforming to that template? If creation from the device side over MQTT is not supported, is it at least possible to update an existing template by adding more telemetry fields to an existing template interface over MQTT?

I'm trying to add support for a device that doesn't have a fixed schema in terms of the telemetry types that it can send, and instead trying to build a mechanism where the device starts with an empty template and then keeps updating that device template with newer and newer telemetry data definitions as and when it receives a new type of telemetry data. Basically, I want the device to describe its own capabilities rather than an operator defining the device template up-front and then making the device connect to this static pre-defined template.

If there's some documentation on what kind of template manipulation is possible over MQTT, that would really help. If template manipulation is not possible over MQTT, then the REST API documentation would suffice too.

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.
222 questions
Azure IoT Central
Azure IoT Central
An Azure hosted internet of things (IoT) application platform.
357 questions
0 comments No comments
{count} vote

Accepted answer
  1. Matthijs van der Veer 4,376 Reputation points MVP
    2020-11-02T09:09:46.737+00:00

    There is no MQTT support for the features you described. There is however a REST API for IoT Central with which you can create a new Device Template. You could use that to create a new template, using an API token you create in IoT Central. There is also a way to create a device using the REST API. So in theory, your device could:

    1. Create a new template
    2. Create a new device
    3. Get the credentials for that device
    4. Use the credentials to connect to IoT Central and send telemetry

    This answer would be incomplete without the warning that by giving your device API credentials, you are giving it access to the entire API. So in theory, your scenario is possible. It also sounds like your case could benefit from IoT Plug and Play, but there is no built-in support for Central yet.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful