Google Maps Location tracker

Home Assistant release with the issue:
0.94.4

Operating environment (Hass.io/Docker/Windows/etc.):
Hass.io(raspberry pi)

Component/platform:

/components/google_maps/

Did the steps of setting up a new account and sharing my actual account location with this new one and can see myself on the map when logged into the 2nd account but i get the below errors after restarting

I can see the cookie file gets created but nothing being report in Known devices and not seeing any activity in my new gmail account about any logins or activity like the warning says config and traceback below

device_tracker:
  - platform: google_maps
    username: xxx
    password: xxx
    max_gps_accuracy: 200
2019-06-23 14:36:36 ERROR (SyncWorker_18) [locationsharinglib.Service] Could not open pickle file, either file does not exist or no read access.
2019-06-23 14:36:40 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform legacy
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/device_tracker/setup.py", line 76, in async_setup_legacy
    tracker.see, 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 39, in setup_scanner
    scanner = GoogleMapsScanner(hass, config, see)
  File "/usr/src/homeassistant/homeassistant/components/google_maps/device_tracker.py", line 60, in __init__
    self._update_info()
  File "/usr/src/homeassistant/homeassistant/components/google_maps/device_tracker.py", line 72, in _update_info
    for person in self.service.get_all_people():
  File "/usr/local/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 439, in get_all_people
    people = self.get_shared_people() + [self.get_authenticated_person()]
  File "/usr/local/lib/python3.7/site-packages/locationsharinglib/locationsharinglib.py", line 400, in get_shared_people
    for info in output[0]:
TypeError: 'NoneType' object is not iterable

This is an ongoing issue, for which there have been / are lots of threads already.

The summary is:

It uses something called locationsharing lib, that uses undocumented methods to retrieve data from Google. The account needs to authenticate and Google keep changing how. In most cases the authentication now won’t work. The error you’re getting is because of that.

On this thread you can find into about a tool that might help, it helped me but others have had no joy.

completed another pretty big refactor on my ground up rewrite of the google_maps location sharing platform.

Found Here

features:

  • it works
  • cookies? what cookies. we don’t need no stinkin’ cookies. how you call fixing an application by making the user manually create the cookie file with a command line script is beyond me. the f is that s?
  • designed to work explicitly with 2FA via device auth. if you don’t have 2FA of some sort set up on the account you’re sharing location info with in the first place, please don’t have children.
  • tons of debugging options for quick down the line resolution!
  • geohash output for all the grafana graphing goodness!

tadaaaa:
image

this is still a work in progress. if you’re not running docker or a manual install and aren’t comfortable taking the content and modifying it to suit your needs…good luck.

<3

3 Likes

Looks good, but can it works with hassio install ?

1 Like

Still works?