Display last device connection timestamp independently of measurements

Hello everyone,

We are currently developing a Cumulocity application that needs to display the timestamp of a device’s last connection to the platform. Our initial idea was to use the availability monitoring feature by setting a sending interval via c8y_RequiredAvailability. According to the documentation, the platform should then save the last connection timestamp in the c8y_Availability fragment.

However, we encountered an issue: For certain devices, we calculate daily, weekly, and monthly values through a microservice that writes measurements back to the device. This process updates the timestamp in c8y_Availability, which causes it to no longer represent the last connection time of the device, but instead reflects the last measurement update.

Does anyone have suggestions on how we could implement a solution or work around this issue? Or are there any upcoming features that might support this use case?

Product/components used and version/fix level:

Application Version
Frontend 1018.503.106x1.1
Backend 1018.540.195

Question related to a free trial, or to a production (customer) instance?

Production

Hi,
this previous post might help you here: Device availability status not changing when measurments created using sdk api - #2 by Stefan_Witschel

When you’re adding the X-Cumulocity-Application-Key HTTP header to the requests of your microservice, they are ignored for the c8y_Availability status and time.

1 Like

Check your code and add the Header Korbinian mentioned to ignore the requests for the device connectivity status.

1 Like