Resource Attributes

Last modified: Mar 8, 2019 @ 13:42

Overview

This feature is accessible through the Admin GUI at Settings > Hardware Templates > Smart Object Templates: Resource Attributes.

According to the Open Mobile Alliance (OMA) specification, Attributes are metadata which can be attached to an Object, an Object Instance, or a Resource.

The role of these attributes is either communicate helpful information to an LwM2M Server, for example, easing data management or provide the parameters to the “Notify” operation of any readable Resource.

The value of an attribute is LwM2M Server-specific. The supported attributes are specified by OMA in the following document:

In DDM, this feature is known as Resource Attributes. Currently, Resource Attributes can be written to the device on Smart Object Type level (e.g. /3315) or Smart Object Type Instance level (e.g. /3315/0). This is done by setting attribute values on a Smart Object Template. The attributes and their values on the Smart Object Template cannot be exported or imported between the Device Networks.

If all the Smart Object Type Instances within a Device Template use the same Smart Object Template, the Resource Attributes values are written on Smart Object Type level. 

If one or more of the Smart Object Type Instances within the Device Template use a different Smart Object Template, the Resource Attributes values are written on Smart Object Type Instance level. 

If a Device registers at an Object level, the Resource Attributes values are sent at object level. If there are multiple instances of a Smart Object Type for a Device, the template which is associated with the Smart Object Instance ID 0 is applied.

Define Resource Attributes on a Smart Object Template

This section provides instructions on how to define a resource attribute on a Smart Object Template.  

On Save, the Smart Object Template applies the new Resource Attributes to all devices that are associated with the Smart Object Template. 

  1. Click the drop-down arrow on the Settings button. 
  2. Select Hardware Templates The Hardware Templates page opens. 
  3. Click to select the Smart Object Templates tab. 
  4. Select an existing smart object template. The Smart Object Template configuration page opens. 
  5. In the Resource Attributes section, click + Add. The Resource Attributes section expands.

  6. Click the drop-down arrows and select an appropriate option. 

Note: These options are defined by OMA and only choices that are relevant to the device are available. 

 Apply Resource Attributes to a Device

Resource attribute values defined on a Smart Object Template are sent to the device in the following situations: 

Single device: 

  • When the device registers or re-registers. 
  • When changing the Device Template for the device. Only resource attribute values set in the Smart Object Template of the new Device Template are sent. 

To all devices with affected smart objects: 

  • When the resource attribute values are updated on a Smart Object Template, then only the updated values are sent. 
  • When changing a Smart Object Template for a Smart Object Type Instance on a Device Template, only the resource attribute values set in the new template will be sent. 

Supported Attributes in DDM

LwM2M allows the attributes to be assigned at Object/Object Instance/Resource level. However in DDM, the attributes with assignment level as Object Instance and/or Object are only supported.

Note: The Attributes introduced by LwM2M V1.1 are not supported.

The table below shows the summary of the supported attributes vs assignment level:

Attribute Name CoRE Link Param Attachment Assignment Level Supported
Minimum Period pmin Resource Object Instance,
Object
Maximum Period pmax Resource Object Instance,
Object

Read Resource Attributes 

Resource Attributes that have been written to a device (either from DDM or from any other source), can be retrieved and viewed in the Resource details view of all the resources of the device.   

This section explains how to read a Resource Attribute from the Device detail view: 

  1. From a location, click to select a Device which has a smart object. The Device page opens. 
  2. In the Smart Objects section, under Data Management, select a resource to expand it. 
  3. Click the drop-down arrow on the Actions button. 
  4. Select Read Attributes. A pop-up message confirms that a read attributes request has been sent.
    Note: The retrieval can take a few minutes. This generates several requests to the device to retrieve Resource Attributes that are set for all smart objects on the device from both the Smart Object Type level and the Smart Object Type Instance level. 
  5. Click to expand a resource.
    Note: The presented values are inherited and belong to the corresponding smart objects, and not the resources.  

As a result of the above procedure, the Activity Log should show one new entry for each Smart Object Type (/XXXX) of the device, and one for each Smart Object Type Instance (/XXXX/0, /XXXX/1 etc) of the device, indicating that a discovery request has been sent.

Resource Attribute Definitions

The available Resource Attributes in DDM can be retrieved using the following API call:

GET /api/v3/resourceattributedefinitions

This will return a list of all Resource Attribute Definitions.