# Display last device connection timestamp independently of measurements

**URL:** <https://community.cumulocity.com/t/display-last-device-connection-timestamp-independently-of-measurements/7777>\
**Category:** Forum\
**Tags:** device-connectivity, cumulocity\
**Created:** [November 6, 2024, 10:32am UTC](https://community.cumulocity.com/t/display-last-device-connection-timestamp-independently-of-measurements/7777 "2024-11-06T10:32:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhorst](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@jhorst](https://community.cumulocity.com/u/jhorst)\
**Post date:** [November 6, 2024, 10:32am UTC](https://community.cumulocity.com/t/display-last-device-connection-timestamp-independently-of-measurements/7777/1 "2024-11-06T10:32:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Korbinian\_Butz1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/korbinian_butz1/32/31227_2.png) [@Korbinian\_Butz1](https://community.cumulocity.com/u/Korbinian_Butz1)\
**Post date:** [November 6, 2024, 11:28am UTC](https://community.cumulocity.com/t/display-last-device-connection-timestamp-independently-of-measurements/7777/2 "2024-11-06T11:28:25Z")

</div>

Hi,  
this previous post might help you here: [Device availability status not changing when measurments created using sdk api - #2 by Stefan\_Witschel](https://community.cumulocity.com/t/device-availability-status-not-changing-when-measurments-created-using-sdk-api/3883/2)

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.

---

<div class="post-metadata">

**Author:** ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)\
**Post date:** [November 6, 2024, 11:30am UTC](https://community.cumulocity.com/t/display-last-device-connection-timestamp-independently-of-measurements/7777/3 "2024-11-06T11:30:20Z")

</div>

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

> [@Microservices Best Practices: Updating Device Connectivity Status with Java SDK](https://community.cumulocity.com/t/microservices-best-practices-updating-device-connectivity-status-with-java-sdk/491):
>
> Overview As you might have read in the [Microservice Best Practices: Getting Started](https://community.cumulocity.com/t/microservice-best-practices-getting-started/4392) article already, Microservices can be used to implement multiple patterns. One of the most used patterns for Cumulocity IoT is the server-side device agent which retrieves/fetches data from devices, maps it to the Cumulocity IoT Domain model, and implements the REST Open API to transport the data to Cumulocity. When updating the device connectivity status with a microservice this often leads to the case that t…

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [May 5, 2025, 11:30am UTC](https://community.cumulocity.com/t/display-last-device-connection-timestamp-independently-of-measurements/7777/4 "2025-05-05T11:30:47Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
