Google Maps location sharing

It’s moment in which I regret lack of python skills.
I’d like to use it as a component in device_tracker too…

I did not see this option when I set this up and signed in and am getting the same error as @bachoo786 .

Can any one please confirm whether this gplus.py is working fine till now ?

I’m having hard time updating data[‘at’] = sdict[ xxxxxx ] in the script which is giving me Key error on Home assistant.

still working fine for me.

Could you perhaps help debug then?

- platform: gplus
  id: CJ_Phone
  url: 'https://plus.google.com/u/2/_/PlusAppUi/data'
  cookie_sid: '4heZG13XP32rhxgg/AOEpU9oHW-6ihy_4K'
  cookie_hsid: 'A7MI_qQeoZV6P75mG'
  cookie_ssid: 'ANWiAs3DJAOYchKtM'
  data_freq: '[[[########,[{"########":[null,null,[[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,[2,null,"#####################"]]]],[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,[2,null,"#####################"]]]],[null,null,null,null,[[null,[2,null,"#####################"]]]],[null,null,null,null,null,null,null,null,null,null,null,null,null,null,[2,[[[2,null,"#####################"]]]]],[null,null,null,null,null,null,null,null,null,null,[[null,[2,null,"#####################"]]]],[null,[[null,[2,null,"#####################"]],3]],[null,null,null,null,null,null,null,[[null,[2,null,"#####################"]],3]],[null,null,[[null,[2,null,"#####################"]]]],[null,null,null,[[null,[2,null,"#####################"]],8,null]],[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[null,[2,null,"#####################"]]]],[null,null,null,null,null,null,null,null,[[null,[2,null,"#####################"]],null,true]]],[null,[2,null,"#####################"]]]}],null,null,0]]]'
  home_url: 'https://plus.google.com/u/2/+CoreyJohnsonWW'

quick debug [I’m at work right now]: use p0rn mode [incognito ;)] in your browser and log in to only one account, so the url won’t have the /u/XYZ/ scheme - maybe it will help

1 Like

Can also confirm the component is still working.

One thing I found when trying to use initially was the same error updating data [ 'at ] but I was using Google Chrome to try and get the sid info for component (this DID NOT WORK). I had to use Firefox and I couldn’t tell you why that made a difference but as soon as I did, the component worked.

For anyone having issues, try using Firefox. I’m using the component in safe mode.

I’ll try to take some screenshots tonight to help.

That did the trick… helps to read ALL of the instructions. I used FireFox and took @pejotigrek suggestion of incognito as well to get the correct values. Now to tap into the wife’s phone, lol.

Well, I thought it worked. Wife and I are showing at home even though we are not… left hours ago :frowning:

Incognito will not remember cookies. I would try getting new cookies NOT in incognito mode.

Please also refer to the instructions about clicking “remember this computer” option or similar when logging in so the cookies aren’t invalidated (this is what i’m guessing happened in your case). This component still seems to be working great for me at the moment. I’ve been comparing it to Owntracks (yes I know, same GPS) but still shows slightly different times for leaving or arriving from home/work, about a minute or two difference for those that are looking to implement garage door automations or similar.__

1 Like

I will definitely rework this to see if it helps. Thank you!

hmm, but what do you need cookies for? [unless you’re eating them during configuration :)] they are stored on the computer that you’ve just logged in, and not on the HA device.

I configured my hass.io with safe mode [i’ve got a “bot account” for such tasks] and read out all the needed data in incognito mode and code inspection tools in chrome. didn’t use the “remember this computer” option, and all still works.

It was just a hunch based on the instructions for the component. Assuming in incognito mode cookies change each login… Just a thought

If it’s working for some in incognito then my assumption is likely wrong, but something to try.

Not sure wth… I logged in to check/update it just now and it lists me at work (where I’m at).

Still just wondering if you’re having the same issues as above (posts 67-69):

I will keep an eye on it and change if I see more inconsistencies. I would like this to become my primary tracker/presence method.

AFAIK incognito mode makes cookies more temporary, and is not remembering them anyway, so it should be valid for ctrl-c ctrl-v into configuration and there’s no need to remember them on the computer if home assistant is on other machine/software anyway. but it’s also just my loud thinking :wink:

of course there is a chance that second login could tamper the cookie and make it unusable, but assuming, that user-location-tracking is something that you are setting once for a longer time [or even once and for all], it’s not a big deal :slight_smile:

I think I found the problem, at least for my case. My wife was signed into my account and her account on her phone :slight_smile: Today is shows me to be at her job with her LOL.

https://github.com/home-assistant/home-assistant/pull/12301

Still needs a change in the library to be able to change the filename. Also needs another good look and documentation.

6 Likes

Done. Feedback is welcome in the PR. It also won’t hurt to do some testing. It seems to work fine, but I don’t know if all edge cases are working properly.

1 Like