Device Identity Messages

Device Identity Messages

To retrieve device configuration, attributes, settings, rules, child devices, and pending commands/OTAs — the device sends a JSON message with a specific message type (mt) to the di topic. The platform responds with the requested data.

Message types

mt Description Applies To
200 Get Device Hello Message All devices
201 Get Device Template Attributes All devices
202 Get Device Template Settings/Twin All devices
203 Get Edge Rule Edge devices only
204 Get Child Devices Gateway devices only
205 Get Pending OTAs All devices
206 Get Pending Commands All devices
209 Get Pending OTAs and Commands All devices
221 Create Child Device Gateway devices only
222 Delete Child Device Gateway devices only

All messages are published to the di topic from the Identity API response. The platform responds on the c2d topic.

mt: 200 — Hello Message

Send this as the FIRST message after MQTT connection. Returns device metadata, protocol info, and ability flags.

mt: 201 — Get Attributes

Fetch template attribute definitions. Required before sending telemetry — platform will reject data if attributes are not synced.

mt: 202 — Get Settings/Twin

Fetch device twin/shadow desired properties defined in the template.

mt: 204 — Get Child Devices

Gateway devices only. Retrieves list of registered child devices.

mt: 205 — Get Pending OTAs

Check for pending firmware updates queued for this device.

mt: 221 — Create Child Device

Gateway devices can dynamically register new child devices.

mt: 222 — Delete Child Device

Gateway devices can remove decommissioned child devices.

ⓘ NOTE

Always send mt: 200 (Hello Message) as the first message after MQTT connection. Check the has object in the response to determine which additional messages to send (201 for attributes, 202 for settings, 204 for child devices, etc.).