Skip to content

Device Profiles

The device profile describes a type of device within the EdgeX system. Each device managed by a device service has an association with a device profile, which defines that device type in terms of the operations that it supports.

For a full list of device profile fields and their required values see the device profile reference.

Identification

The profile contains various identification fields.

  • The Name field is required and must be unique in an Edge Xpert deployment.
  • Other fields are optional. They are not used by device services but may be populated for informational purposes:
    • Description
    • Manufacturer
    • Model
    • Labels

DeviceResources

A device resource specifies a sensor value within a device that may be read from or written to either individually or as part of a device command.

The device service allows access to device resources via its device REST endpoint. Find examples of this in Device Service API in Edge Xpert API.

A device resource entry has the following:

  • A name for identification and a description for informational purposes

  • Attributes are specific to the device service and are required to access the value

    • Each device service implementation will have its own set of named values that are required here. For example, a BACnet device service may need an Object Identifier and a Property Identifier whereas a Bluetooth device service could use a UUID to identify a value.
  • Properties describe the value and, optionally, request some simple processing to be performed on it. It is not necessary to use all property fields in each device resource, only those which are relevant. The following property fields are available:

    Property Description
    valueType Required. The data type of the value. Supported types are
    • bool
    • int8 to int64
    • uint8 to uint64
    • float32, float64
    • string
    • binary
    • Arrays of the primitive types (ints, floats, bool). Arrays are specified as float32array, boolarray, and so forth.
    readWrite R, RW, or W indicating whether the value is readable, writable, or both.
    units Indicates the units of the value, for example: Amperes, degrees celsius
    minimum The minimum value allowed in a SET command, out of range will result in error
    maximum The maximum value allowed in a SET command, out of range will result in error
    defaultValue Default value to be used when a SET command does not specify one
    assertion A string value to which a reading is compared after processing. If the reading does not match the assertion value, the device's operating state will set to disabled. This can be useful for health checks.
    base The power a raw reading should be raised to before the value is returned
    scale The factor by which to multiply a raw reading before the value is returned.
    offset The value to be added to a raw reading before the value is returned.
    mask A binary mask which will be applied to an integer reading.
    shift The number of bits by which an integer reading will be shifted right

    Note

    The processing defined by base, scale, offset, mask and shift is applied in that order. This is done within the SDK. A reverse transformation is applied by the SDK to incoming data on set operations. mask transforms on set are NYI.

DeviceCommands

Device commands define read and write access for multiple simultaneous device resources.

Device commands may be useful when readings are logically related. For example, with a 3-axis accelerometer, it is helpful to read all axes together.

Each named device command should contain a number of resourceOperations. A resource operation consists of the following properties:

Property Description
deviceResource The name of the deviceResource to access
defaultValue Optional. A value that will be used if a SET command does not specify one.
mappings Optional. Allows readings of String type to be re-mapped.

The device service allows access to device commands via the same device REST endpoint as is used to access device resources.

Device Configuration Tool

You can also use IOTech's Device Configuration Tool to create and save device profiles. For further information on this tool, see the Device Configuration Tool Documentation.