Presence Sensor based on pings

You have to enable oAuth on a basic endpoint smartapp. Here is a good example