Google Maps location sharing

yep, that would be nice

Right are you saying it updates even if you are in the same location for more then one minute?

@virualdo, few questions:

What android device are you using?
What android OS version is the device using?
Do you know if any other apps are using the phones GPS (this has kept the phone updating more frequently for me)
Are you using self or safe mode?

what I say is that sometimes the devices are not updated so often on the google maps server. then we will not see the updated device tracker either. Here you can see that the updates are in different minutes, not every 10 minutes
image

LG G6 with android 7.0, safe mode.i’ve google location history activated and android high accuracy mode selected.

OK I have the same settings as you and I am hoping it would update like yours.

Looks like they’ve changed their API as parsing isn’t right (at least for me). Here is each word in the important line (sanitized). I know word 15 and 16 are lat and log respectively. I assume word 18 is accuracy?

 [["af.adr"
0
{"64399324":[null
null
[[null
null
null
null
null
null
null
null
null
[null
[1
43.585428
-79.4452249
1510849531312
19
"Mississauga
ON
Canada"
"//www.google.com/maps/vt/data\u003d889XtE3H8Df_CM5VIpAwkbdgtYtH9O8bmuDIlqDFf8gbuTHkXzx74JyuybG0ZoOx81LkY0ijCS8"]

i am getting an error ‘‘Unable to find component device_tracker.gplus’’

my config:

device_tracker:
platform: gplus
id: name
url: https://plus.google.com/?pageId=none
cookie_sid: *******************************************************************************
cookie_hsid: ********************
cookie_ssid: ************************
data_freq: [[[
,[{"***********":[[null,3]]}],null,null,0]]]
home_url: https://plus.google.com/
*******************

what do i wrong ?

Is this working? My wife and I use google location on our devices and it appears pretty accurate. I would love to integrate this into my HA setup.

Me too. Did anyone get it back to and running? Would love to see this working.

Looks like they gave up on google maps


I am not smart enough but if anyone else is


@Corey_Johnson
What you sent looks like it provide location only after you send details of nearby cell tower or wifi AP visible. So I believe this is used by application on phone and provide locations details for the phone.

On our Androids, there is an option so 'Share your real-time location" which then populates a screen with either a ‘timed duration’ or ‘until you turn this off’ and it has a large number of opttions to share to: FB Messenger, Gmail, Email, text, Google Drive, and others.

Could any of these be used as a way to relay the coordinates? Perhaps if it saved to a file on Google drive and HA read it (or it otherwise transmitted to HA) then it could work.

I have an excel file on my Google drive that checks whether or not my HA instance is reachable and it emails/texts me if it does not receive a response.

Those only work with time-limited sharing. Persistent sharing must be done directly via Google Account.

It certainly would be great to piggyback off this data.

I have build a library that accesses that data from a google account and presents it in a friendly way. No need to copy cookies and such, it handles the authentication nicely and all is required right now is to make a custom component around that. I will get around to do that in the next days but if anyone is willing to do it before I do be my guest! The library can be found here https://github.com/costastf/locationsharinglib.git and the documentation here http://locationsharinglib.readthedocs.io/en/latest/ . It should be pretty straight forward :slight_smile:
Basically it requires another google account to be used as a tracking account of the primary account that would share its location “Until you turn this off” as the previous picture shows. I have also implemented some caching for 30 seconds so we don’t spam the service. Feedback is welcome!

5 Likes

It just occurred to me that I have some values hard coded for the netherlands were I live that would probably not work for other locations. So I will update the code with debugging logging and anyone willing to provide feedback on using the library and fixing it for global usage will be more than welcome. It could be of course that it is already working but sadly I do not have any way of knowing :slight_smile:

@costas awesome! What about the pb variable you send to https://www.google.com/maps/preview/locationsharing/read? Seems pretty hardcoded, any idea what it means?

Not really. Some part of it is static and some is changing over time but it works with the same query anyhow. Have you tried the library and does it work for you, and if so where are you based? I have asked friends in Germany and in Greece to provide feedback on whether it is working for them and waiting on that. It would be great if it worked with the hard coded value, else I have to reverse all the JavaScript which I really am not looking forward to doing :slight_smile:

Just stumbled onto this https://andrewwhitby.com/2014/09/09/google-maps-new-embed-format/ so what I get from that is that the pb is only used for the rendering and it probably had nothing to do with the data returned from the query about the shared locations so I would expect the library to work world wide. Feedback of course is welcome.

@aa755 would you be willing to build a component around my library? I have briefly looked into different solutions on trackers and they all seem a bit confusing and I am guessing that since you did it already it should be fairly straight forward for you. Of course if you can just give me some pointers or guide me to some helpful documentation that would be ok too. Thoughts?

1 Like