Google Maps Device Tracking Setup?

I can confirm latest Home Assistant (0.97) fixes this issue.
I was able to use mapscookiegettercli 0.2.0 and Firefox on a Windows computer to grab the cookie back in June. Cookie was sitting on my RPi but not working until I just updated to Home Assistant 0.97 that has the latest locationsharinglib.

Thanks everyone!

1 Like

Thanks a lot for your tutorial !

Thank you! It is useful at least. :beers:
I tried it to setup related to official description without any succes because that assumes everyone expert in the IT things.

Thanks for the contributions guys, always appreciated and it’s been a fun journey.

Unfortunately google maps device tracking is no longer usable for me as I can’t manage to see which cookies are invalidated to then manually updating 5 android devices (I put old phones in cars to track our cars also).

Are there any other options out there other than spending money on standalone GPS trackers?

It has nothing to do with the cookies on client devices (phones) just one cookie needed for the ha server.

so a single cookie for 5 devices on 5 accounts tracking 3 people and 2 cars individually?

You configure one account for home assistant. Then every account that wishes to share their location shares it with that account. That account is used by home assistant to login and retrieve the location of all the others. The cookie is only needed for that account.

hello did you guys succeed in getting cookie file form maps-cookie-getter ?

i have installed python and pip on windows 10
command pip3 install mapscookiegettercli worked fine with no errors when i try
command maps-cookie-getter i get below error

image

anyone can help me out in this?

Edit:
tried in different pc and it worked.

how did you manage? i have the exact same
python and pip installed fine, also the mapscookiecgettercly
but it doesnt run

do you need to run it from another location? where is it actually installed?

you need to file location where maps-cookie-getter script is located. in one of my pc it was not located default python scripts folder… try searching your pc for “maps-cookie-getter” if found it copy location and follow below video how to add that location in system variable path.

once you get location of maps-cookie-getter follow video from 0.36 sec

hope this helps

Ok, thnx , have it running now

OK so Google maps have stop working for me in HA 0.97 I don’t know why.

1: Have taken out password
didn’t work
2. have got new cookies
didn’t work
3. have taken google maps off HA and restarted and put it back on
didn’t work.
4. try any thing els that came in mined.

P.S Yes I always had a NEW Google account just for HA.

my log…

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 77, in async_setup_legacy
    discovery_info,
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/google_maps/device_tracker.py", line 43, in setup_scanner
    scanner = GoogleMapsScanner(hass, config, see)
  File "/usr/src/homeassistant/homeassistant/components/google_maps/device_tracker.py", line 55, in __init__
    self.scan_interval = timedelta(seconds=config.get(CONF_SCAN_INTERVAL, 60))

my config

  - platform: google_maps
    username: [email protected]
#    password: xxxxxxxxxxx
    scan_interval: 300
#    username: !secret device_tracker_username
#    password: !secret device_tracker_password

well I fixed it.
just putting it on here if anyone that have the same thing happen to them in Ha 0.97

well I taken google maps out of my config and restart and then tune off my laptop (my HA) off for 20sec
then tune it back on
then turn on google maps back in configs
and restarted

Now its working 100%

So, what’s your opinion? I have tested 2 untill now…

Google maps, updates slow on a Motorola G5, but works well on my OnePlus … Advantage, no extra app needed, no battery drain…
Life360, works quite well, but some battery drain…
Want to test others too, I read about owntracks, that it doesn’t update anymore, untill you open the app

Two days after posting this I lost my phone!!
Ironically, none of the tracking software helped me locate it so im just waiting on a replacement phone to be delivered before I resume!!! :rofl:

Ow, that’s a bummer :wink:
Probably they resettled the phone

Do we really need a seperate windows box to get this cookie and keep it up to date? Can’t believe. Is there any other way to keep these tasks within home assistant or an addon?

This did not solve it either. My issue is that
when I try to grab the cookie using maps-cookie-getter, Google throws a security error because of the selenium automation to complete the login from a browser. Apparently using automated login is a security risk for Google now :expressionless:

The Google error is:

You are trying to sign in from a browser or app that doesn’t allow us to keep your account secure.
Try using a different browser.

Yes, I got the same error just now, with Chrome/selenium under Windows. There is a warning on the Github page now too: https://github.com/costastf/mapscookiegettercli

  • POSSIBLY DEPRECATED SINCE THERE ARE REPORTS OF GOOGLE BLOCKING THIS. SEE #1

So no cookies for me :frowning:

Please look at my latest comment in Google Maps Location Sharing - cookie problem starting 0.97.2

1 Like