Is it possible to access Hub pings from a SmartApp


(Andrea Kealy) #1

Hello all,

I’m trying to check hub uptime/downtime automatically using SmartApps. I noticed that when you select list events > from hub you can view pings from the hub:

My question is - can these pings be accessed from SmartApps?

Andrea


(Andy Rawson) #2

I don’t know of a way to get them directly but you could pull them in with the API link like this https://graph.api.smartthings.com/api/hubs/${hubid}/events?source=hub
then process each of those to see if it is a ping and then go from there. You can try the API link in your browser to see what you get, just replace ${hubid} with your hub id that can be found in the address for the list events page.

You can find out more about using the API calls from https://github.com/tmaiaroto/smartthings-unofficial-docs
I am not sure if there is an official API doc anywhere though.


(Andrea Kealy) #3

Great, thanks for your help!