# Device settings

Some technology-specific fields are essential for the agent when setting up an MQTT-based device (a.k.a., thing) in the IoTHub.

# Thing

A thing is a digital representation of a physical device (commonly termed "digital-twin").

TIP

As soon as the agent and the device are connected to the same MQTT broker. Then, the agent will automatically register your device. Optionally, you can also register the device in the IoTHub before connecting it with the agent, but be aware that you must correctly input the device's identifier that should be use for recognizing your device on the respective MQTT topics (see next section, Extra settings).

# Configuration

The configuration defines connection-related settings for communicating with the device. Here, essential technology-specific fields to set are:

  • identifier: This the device's identifier used to recognize the device via MQTT. This identifier can be any unique resource that can be used for discriminating a device from other devices. For instance, the Mobile Equipment Identity (IMEI) number or the Media Access Control (MAC) address are commonly used for this purpose.

WARNING

When the device is created by the agent, the initial identifier is either taken from the topic name (last element) or from the payload sent by the device (see next section, Extra settings).

# Properties

Properties represent all items that the agent should monitor; this means reading or writing data from or into them, respectively.

# Attributes

Here, each property contains the following technology-specific fields:

  • item: This defines a specific resource (or field) contained in the payload sent by the device. For instance, the agent automatically isolates each JSON-key in the top level of a given payload as a specific item.

# Actions

Actions are interaction affordances that allow to invoke specific functions on the device or retrieve information from it. Here, essential technology-specific actions are:

  • manual_configuration: Use this action to manually send the current configuration to the device.

# Events

Events are transition states that describe particular conditions or relevant changes in the interaction between the agent and the device. Here, essential technology-specific events are:

  • changed_identifier: This notifies when the device's identifier have been changed.
Last Updated: 1/14/2022, 2:02:00 PM