Google Maps location sharing

@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.

@NotoriousBDG i tried setup safe mode and i got this errors

2017-08-07 10:38:11 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "C:\Users\mohammed\AppData\Local\Programs\Python\Python35\lib\asyncio\tasks.py", line 239, in _step
    result = coro.send(None)
  File "C:\Users\mohammed\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\components\device_tracker\__init__.py", line 274, in async_see
    dev_id = cv.slug(str(dev_id).lower())
  File "C:\Users\mohammed\AppData\Local\Programs\Python\Python35\lib\site-packages\homeassistant\helpers\config_validation.py", line 236, in slug
    raise vol.Invalid('invalid slug {} (try {})'.format(value, slg))
voluptuous.error.Invalid: invalid slug locate me (try locate_me)

@ashfaaaa, check out the thread Invalid slug. It looks similar to your issue.

1 Like

@NotoriousBDG that was it. I had space between ID… thank you so much. it works now.
how long you’re using this ? does it work better than Owntracks?

i put in gplus.py in custom_components/device_tracker , started fine did ‘pip install BeautifulSoup4’ but looks like i unable to find rith data_freq string

it must be this big ?

Can anyone help me with my configuration? This isn’t working:

device_tracker:
  platform: google_loc
  id: vishal_phone
  url: 'https://plus.google.com/u/0/xxxxxxxxxxxxxxx?pageId=none'
  cookie_sid: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxx.'
  cookie_hsid: 'xxxxxxxxxxxxxxxxxxxxxx'
  cookie_ssid: 'xxxxxxxxxxxxxxxxxxxxxx'
  data_freq: '[[[xxxxxxxxxxxx,[{"xxxxxxxxxxxx":[null,null,[[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]]]],[null,null,null,null,[[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]]]],[null,null,null,null,null,null,null,null,null,null,null,null,[[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]]]],[null,null,null,[[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]],5,null]],[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]]]],[null,null,null,null,null,null,null,null,null,null,[[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]]]],[null,null,null,null,null,null,null,null,null,null,null,[[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]]]],[null,null,null,null,null,null,null,null,[[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]]]],[null,[[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]],3]]],[null,[2,null,"xxxxxxxxxxxxxxxxxxxxxxxxxx"]],null]}],null,null,0]]]'
  home_url: 'https://plus.google.com/xxxxxxxxxxxxxxxxxxxx'

All I get is this error in Home Assistant:

2017-08-17 04:01:59 ERROR (Thread-4) [custom_components.device_tracker.google_loc] No response received to the location query
2017-08-17 04:01:59 ERROR (Thread-4) [custom_components.device_tracker.google_loc] Google didn't send the location. Updating data['at']

Also, every time I try to get this data in Chrome, I get different a different value for the ‘URL’ field. I don’t know what to choose. I am trying to do this in safe mode.

i think that for this custom component you must to use platform: gplus

@virualdo @djj @aa755 I get an error using platform: gplus

ERROR (MainThread) [homeassistant.loader] Unable to find component device_tracker.gplus

Where do I have to put the gplus.py file in raspberry pi?

put the file in the /-config directory-/custom_components/device_tracker/gplus.py

@virualdo ok now I get an error:

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

try this, i’ve the same error and this works for me.

how do I get the home url? is it https://aboutme.google.com ?

in Self Mode https://aboutme.google.com
in Safe Mode, log into [email protected], and visit the Google Plus profile page of [email protected]. The url of this page goes to the home_url field above

according this page:

What space did you have?

I had space between two words

id: Ashu android

it should be like this

id: Ashu_android

honestly this seems to be a simple task but every information I try and obtain from all Chrome and Firefox doesnt help. There are many data?ds.extension and I have selected one of it. Is it a specific one to choose?

I keep getting the same error: ERROR (Thread-3) [homeassistant.components.device_tracker.gplus] Google didn't send the location. Updating data['at']

Is it possible if you could please share your device_tracker in your configuration.yaml ?
Thanks.