Hub and devices uptime

Hi Guys

Is there a way to check ST’s hub and it devices(Zwave/Zigbee) uptime (period when the device remains connected) in programming perspective?

https://graph.api.smartthings.com > My Hub: will get you close. it will show you Last Activity time, and Last Ping From Hub. if you scroll down and click list event and from hub you’ll see 7 days worth of pings and notifications if the hub tried to communicate to a device and the device did not respond/was unavailable.

Example:

2015-09-15 12:07:08.303 PM CDT
12 hours ago HUB ping ping ping
2015-09-15 12:04:53.234 PM CDT
12 hours ago HUB Front Door Light [03]: Not re… Front Door Light [03]: Not responding
2015-09-15 12:04:51.221 PM CDT
12 hours ago HUB ping ping ping

Yes, but i want it in programming perspective in writing smartApps
something like hub.uptime or device.uptime

Wth the logs you have all the needed info to code it.

Is it written in groovy since SmartApp can only use groovy?
With those log, how to call it from SmartApp IDE?