'Looking for ways to access TIME parameter from Thingsboard

I am looking for a way a way to check from the Thingsboard server the status (ONLINE/OFFLINE) of the device connected to it. In other words, I'm looking for a way to check the device's heartbeat from Thingsboard.

The way I would implement this is that Thingsboard should ping the device every 5 seconds. If the device pings back, then we know the device is online. However, if Thingsboard pings and the device does not ping back, we know the device is offline.

However, I have a problem accessing the time parameter on Thingsboard (so I cannot know exactly the time when the device goes offline).

Are there ways to access the time parameter on Thingsboard server?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source