Google Maps location sharing

I understand that this doesn’t require any extra apps installed / battery drain (for those already using google location) - but how does this compare with owntracks in terms of accuracy?

It was the same error message, just i’ve posted the first line, so this fix works for me too. Thanks!

Can I use two or more safe devices with this component and just one dummy account? Has anyone tried it?
device_tracker:

  • platform: gplus
    id: device1
    etc…
  • platform: gplus
    id: device2
    etc…

EDIT: I’ve tried now and it works

I’ve owntracks working for a while, now i will give a try to this component and compare both working at the same time, so in a few day i think i will have an answer for that.

I also had the "No module named “bs4” error message.

I then installed BeautifulSoup via the virtual environment and it installed in the following location (which I’m assuming is wrong since i still have the error).

/usr/lib/python3/dist-packages

I was easily able to obtain the needed info from the google page, just stuck on this now and looking for some insight.

Any help is greatly appreciated.

Bump.

I’d like to see this supported or at the least some insight as to why I might have this error still. Lot of google research has been fruitless as far as ways to install BeautifulSoup and why the “No module named bs4” error.

Zach. :persevere:

-EDIT-
I’m running python 3.4 if that helps/matters.

2017-07-10 12:58:29 ERROR (Thread-3) [custom_components.device_tracker.gplus] Google didn’t send the location. Updating data[‘at’]

I have all the data just as MrEmielH described

device_tracker 1:

  • platform: gplus
    id: emiel_android
    url: ‘URL-VALUE’
    cookie_sid: ‘SID-VALUE’
    cookie_hsid: ‘HSID-VALUE’
    cookie_ssid: ‘SSID-VALUE’
    data_freq: ‘FREQ_VALUE’
    home_url: ‘https://aboutme.google.com

what can be wrong still?

I have the same error as @rensvdn

  • EDIT - switched to self mode and now it works.

ahh, how? i followed the instructions for self mode, but still errors.
if i run the lines in the bash script:

import requests

headers = {…}
params = (…)
data = […]

api_request = requests.post(‘https://aboutme.google.com/_/ProfilesMeUi/data’, headers=headers, params=params, data=data)

than, ans = api_request.text
matched_lines = [line for line in ans.split(’\n’) if “www.google.com/maps/” in line]
matched_lines = zero, so there is no location data in my google account, how can i solve this then?

i did enable google tracking on locations and i can see my current location on my timeline.

****EDIT: i got it working, still needed to enable sharing in android.

I’m hoping to run in safe mode (I’m tracking more than one person, so it’s a lot simpler using safe mode as well) but am constantly getting errors like everyone else. I really want to avoid self mode if possible…

ERROR (Thread-5) [custom_components.device_tracker.gplus] Google didn't send the location. Updating data['at']

@aa755 Does Safe Mode work for you still?

Yes. Make sure that you have enabled location sharing properly: the location of the tracked account has to be shared with the dummy account used to login in the safe mode.

If I log into my dummy account and access either G+ or Google Maps, I see the main account’s location listed fine.

In the interest of debugging what I’ve done wrong: does the error I posted above imply that the cookie authentication is working fine, but for one reason or another the location didn’t come through?

Or is it still possible there’s something wrong with the values I plugged into config.yaml?

I would manually run the python code you get in the second last step at:

I would then manually inspect Google’s response. Does it contain the location?

I’m not sure I’m doing things right -

  1. I saved the curl -> python requests output into a .py file
  2. installed python
  3. installed python requests
  4. from the command line, ran

c:\users\username\appdata\local\programs\python\python36\python.exe c:\users\username\desktop\pythontest.py

But the command line just goes back to c:\ without an error or any other output.

I also noted that the Firefox instruments pane outputs a lot of different data?ds.extension listings… Are they all equally usable, or do I need to use a particular one?

I really appreciate your answering my mundane questions like this, by the way! Many thanks for that!

Does it still work with 2 devices for you.
I tried with first 1 self device, then another, but when i added them both one of them did not update or i had a error message.

@tismondo even I’m facing same error did you manage it to fix it?

2017-08-06 13:27:23 ERROR (Thread-18) [custom_components.device_tracker.gplus] Google didn't send the location. Updating data['at']```

@Ashfaaa Sadly, no. I’m not certain I’m using the right data?ds.extension file - the Firefox instruments pane ouputs a bunch of them and it wasn’t clear to me from the instructions if I need to use a specific one or if any would do.

I tabled working on it for now but plan to revisit it. Maybe something is different now that I’m running hass.io? (unlikely, but worth hopeful thoughts, haha)

1 Like

@tismondo & @ashfaaaa, it took me a while find the right payload for data_freq. In the end the one that worked looked like this sanitized string:

[[[00000000,[{"00000000":[null,null,[[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,[0,null,"000000000000000000000"]]]],[null,null,null,null,[[null,[0,null,"000000000000000000000"]]]],[null,null,null,null,null,null,null,null,null,null,null,null,[[null,[0,null,"000000000000000000000"]]]],[null,null,null,[[null,[0,null,"000000000000000000000"]],0,null]],[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,[0,null,"000000000000000000000"]]]],[null,null,null,null,null,null,null,null,null,null,[[null,[0,null,"000000000000000000000"]]]],[null,null,null,null,null,null,null,null,null,null,null,[[null,[0,null,"000000000000000000000"]]]],[null,null,null,null,null,null,null,null,[[null,[0,null,"000000000000000000000"]]]],[null,[[null,[0,null,"000000000000000000000"]],0]]],[null,[0,null,"000000000000000000000"]],null]}],null,null,0]]]

@NotoriousBDG in my config it looks similar but it not working. I have 2 things to clarify

  1. URL: if I’m not wrong this I have to get from the last line in python script which I converted from curl starts with # requests.post('https://aboutme.google.com/ and ends before, headers=headers,

2.home_url: this is a link for my [email protected] G+ which looks like this https://plus.google.com/+username if using as self-mode do I have to mention this?

and did you change anything on the android phone. if yes how? I read above that even if you’re using self-made you have to share location to dummy@gmail. I have done it.

@ashfaaaa, my url looks like this when using safe mode:

https://plus.google.com/u/0/_/PlusAppUi/data

The portion of the request looks like this:

requests.post(‘https://plus.google.com/u/0/_/PlusAppUi/data’, headers=headers, params=params, cookies=cookies, data=data)

All i did on my phone is share my location with the account that I’m using with this component.