Skip to Main Content
Cumulocity IoT Feedback Portal
Status Planning / planned
Created by Guest
Created on Oct 10, 2023

LwM2M - Show the newest location of a device in the Map widget

Hi,

as defined by the LwM2M standard, while creating a new LwM2M observer the actual value will be returned. In addition, Cumulocity automatically creates a location event with a timestamp and position fragment without a timestamp while observing LwM2M object /6/0.


In our solution we are combining two sources of location information. On one hand, GPS locations are received from the device via the object /6/0. On the other hand, cell locations are created via a microservice.


The issue occurs, when after receiving a cell location, the device does a new registration. Depending on the device implementation, the following scenario could happen:


- GPS location 1 via the object /6/0 with timestamp 1

- CELL location 1 via the microservice with timestamp 2

- Device reset (New registration & Observer registration)

- GPS location 1 via the object /6/0 with timestamp 1 is retransferred again and shown for instance in the Map widget.


The following solutions could be considered to solve this issue:

- Option 1: Use the location with the latest timestamp in the Map widget. In this case, the c8y_position fragment could be extended with a timestamp.

- Option 2: GPS location via the object /6/0 with timestamp 0 could be ignored by Cumulocity. (Special solution for Location object)

- Option 3: A flag on observer level to ignore the returned value during observer creation. (General solution for LwM2M observers)


Thank you!

Best regards,

Attila


  • Attach files
  • Admin
    Aaron Raab
    Reply
    |
    Oct 30, 2023

    Hi Attila,

    thank you for sharing your observation! This behavior is caused by the automatically triggerd object instance actions. We already created a user story to introduce the option to disable these actions. Unfortunately, I cannot tell you when we will be able to address this topic.

    Best regards,

    Aaron

  • Guest
    Reply
    |
    Oct 10, 2023

    Hi,

    I tried to use the LwM2M operation "writeattr /6/0/5 gt=0" (timestamp) but it did not solve the issue. Upon new registration, the observed /6/0/ was read with the actual values, even if the timestamp was 0.

    Best regards,

    Attila