Google Android equivalent to iCloud Binding?

Since 2.2 now officially has the iCloud Binding, I’m wondering, if Google Cloud offers a similar API? I searched, but only get results for App-API, meaning you can use it within a Google App. But I’d like to see, if I can get the current (lastknow would suffice) location from my Android devices also.
is there something equivalent? - I know of owntracks/Tracker/… but I’d like to have something, Google already knows and don’t need special Apps. You can have all of that information within … There must be a way to get this information via Google Developer API?

I think it might be possible but it will take a bit of research to verify.

It looks like you can get to the API using OAuth2, but looking through the Device API at least I’m not seeing any relevant information we would care about like location or battery level.

Further searching around is not definitive but it looks like Google does not provide this sort of API. You will have to use a third party app like OwnTracks, IFTTT, Tasker, etc.

1 Like

IFTTT fails completely, in my experience it sometimes lags in >10minutes. No big deal for lets say a shopping list, but not a presence detection… :wink:
owntracks is worh looking for - and tasker.

Best thing in my eyes would be using the data google already gets and consuming an API in the Google Cloud. Today I stumpled across an old entry of 2014 in some forum and they were talking about a deprecated function in Google API called latitude. It was discontinued in 2013 and in 2014 there was no alternative…

Don’t miss this thread (read the full thread, it’s not too long).

Yes. OwnTracks (I think it was still called MQTTitude back then) got a lot of users moving to them because of the shutdown of Lattitude.

In my experience, no GPS based solution will be fast enough to detect presence to be useful. But some people use OwnTracks for that purpose quite happily.

Latitude was shut down in favor of location sharing in Google+…
Google+ location sharing was shut down in favor of Google Maps location sharing; I have no API expertise with Google products, but perhaps maps offers something for you @binderth?

If not, I can assist in the other thread with telegram-cli or openhab cloud rest api (still testing some things with tasker and openhab).

I don’t see anything in the Maps API that would let one get the current location of an Android device remotely. All the APIs seem to be focused on calculating the location of the device querying the API.

Personally, I think that the best thing for an end user will be for the existing OH Android app to include Geofencing directly.

The app already has access to OH (either directly, or via an openhab cloud instance), and can be extended to respond to intents triggered by Google’s location tracking already in place, the simplest way might be to utilise a Switch item for whether the user is inside or outside the Geofence.

OwnTracks is a rabbit warren to set up, I have had to sign up for CloudMQTT, and configure OH to talk to this as an additional server, and as it has to monitor location itself and not rely on the Geofence API, I have found that it can be severely affected by Android’s power saving. Or, it could be a few taps in the OH app to create a Geofence and select a Switch item…


Yes, openHAB-app could do that, but - as so every often - this would draw a bit more requirements like:

  • batterystatus
  • lastknownlocation


Just be aware that google lication IS NOT as accurate, at least in location tracking as one may think. Google has showed my history with incorrect locations, by quite a bit of distance; and on multiple days. I hear owntracks works well.

yes, that’s right. But in my experience, if Google knows your home (and work) location, it’s quite accurate at least for those.

Yes, i agree.

Funny though how the company that drives android would have such inaccuracies, even though we know our phones are capable of so much more.

I think that’s a feature. Accurate GPS-Location drains the battery - My experience is, if I deactivate the energy save mode, the location gets a bit better. And on top I bet a fiver, the more the battery is down, the fuzzier the location gets… :wink:
only if I use another App for location (of course Maps, but also camera, Facebook, …) in this time, the GPS-location is updated for Google in every case.

I’ll just mention that it is only accurate for those when you have your wifi enabled. It augments the GPS geolocation with known WiFi APs as well as cell tower locations.

It is a little appreciated fact that GPS really is not all that accurate. It only appears to be accurate when using something like Maps or Waze because those apps can make some assumptions that it can use it throw out bad readings (e.g. if you are on a road and the next reading puts you off the road it is probably a bad reading). But for general geolocation, it can’t make that sort of assumption so it ends up showing you jumping around.