Information Reporting Interface
The LWM2M Server and the LWM2M Client MUST support all the operations in this interface.
The Information Reporting Interface is used by a LWM2M Server to observe any changes in a Resource on a LWM2M Client, receiving notifications when new values are available. This observation relationship is initiated by sending an “Observe” operation to the L2M2M Client for an Object, an Object Instance or a Resource. An observation ends when a “Cancel Observation” operation is performed.
Figure 11: Example flow for Information Reporting Interface for the RSSI Resource of the Connectivity Monitoring Object of the example client (Appendix E).
Observe
The LWM2M Server initiates an observation request for changes of a specific Resource, Resources within an Object Instance or for all the Object Instances of an Object within the LWM2M Client.
Related parameters for “Observe” operation are described in 5.3.4 Write Attributes and those parameters are configured by “Write Attributes” operation.
The Observe operation includes the following parameters:
Parameter | Required | Default Value | Notes |
---|---|---|---|
Object ID | Yes | - | Indicates the Object. |
Object Instance ID | No | - | Indicates the Object Instance to observe. If no Object Instance ID is indicated, then all the Object Instances of Objects are observed and Resource ID MUST NOT be specified. |
Resource ID | No | - | Indicates the Resource to observe. If no Resource ID is indicated, then the whole Object Instance is observed. |
Table 13: Observe parameters
When “Observe” operation contains only Object ID, the “Notify” operation MUST be done per Object Instance.
Notify
The “Notify” operation is sent from the LWM2M Client to the LWM2M Server during a valid observation on an Object Instance or Resource. This operation includes the new value of the Object Instance or Resource. The “Notify” operation SHOULD be sent when all the conditions (i.e., Minimum Period, Maximum Period, Greater Than, Less Than, Step) configured by “Write Attributes” operation for “Observe” operation are met.
Parameter | Required | Default Value | Notes |
---|---|---|---|
Updated Value | Yes | - | The new value included in the payload about the Object Instance or Resource. |
Table 14: Notify parameters
The following example shows how the Minimum and Maximum period parameters work as shown in Section 5.3.4. A LWM2M Server makes an observation for a Temperature Resource that is updated inside the LWM2M Client at irregular periods (based on change). The LWM2M Server makes an observation when the Minimum Period = 10 Seconds and Maximum Period = 60 Seconds have been set for that Resource. The LWM2M Client will wait at least 10 Seconds before sending a “Notify” operation to the LWM2M Server (even if the Resource has changed before that), and no longer than 60 Seconds before sending a “Notify” operation (even if the Resource has not changed yet). The “Notify” operation is sent anywhere between 10-60 seconds upon change.
Figure 12: Example of Minimum and Maximum periods in an Observation.
This example assumes the Minimum Period has been set to 10 and the Maximum Period set to 60 for the Resource /4/0/2 before making the observation.
Cancel Observation
The “Cancel Observation” operation is sent from the LWM2M Server to the LWM2M Client to end an observation relationship for Object Instance or Resource. The operation doesn’t contain any parameters at the LWM2M layer. The “Cancel Observation” operation MUST be used in the response of the “Notify” operation.
Please note that this enabler provides two ways for the LWM2M Server to cancel observation:
- By sending “Cancel Observation” operation
The restriction of this option is that if the LWM2M Server receives “Notify” operation which the LWM2M Server is not interested in any more, the LWM2M Server can send “Cancel Observation” as the response of “Notify” operation.
- By sending “Write Attributes” with cancel parameter.
This option does not have any restrictions. If the LWM2M Server sends “Write Attributes” with cancel parameter to a certain URI in the LWM2M Client, the LWM2M Client MUST cancel observation for the specified URI itself.