Google Maps location sharing - New thread

Looks like 0.70 is out but update is not showing on Frontend yet.

Forced update on command line curl -d ‘{“version”: “0.70.0”}’ http://hassio/homeassistant/update

Will see what happens…

locationsharinglib seem to have been updated to 2.0.2 in 0.70 but current version is now 2.0.7 from 2 days ago.

New Error.

Log Details (ERROR)

Mon May 28 2018 10:13:42 GMT-0400 (EDT)

Response: [[[[‘105378156597123040953’, ‘https://lh6.googleusercontent.com/-7U9rDgvbJ5M/AAAAAAAAAAI/AAAAAAAAAAA/AIcfdXB-GN4akAInz5H4vNQkKsaRu5lSvA/mo/photo.jpg’, None, ‘Tracked User’, None, None, None, ‘0ahUKEwiKorbMy6jbAhVr2IMKHeQuDygQvDgIAygA’], None, None, None, ‘0ahUKEwiKorbMy6jbAhVr2IMKHeQuDygQu4IBCAIoAA’, None, [‘105378156597123040953’, ‘https://lh6.googleusercontent.com/-7U9rDgvbJ5M/AAAAAAAAAAI/AAAAAAAAAAA/AIcfdXB-GN4akAInz5H4vNQkKsaRu5lSvA/mo/photo.jpg’, ‘Tracked User’, ‘name’], 0]], None, ‘0ahUKEwiKorbMy6jbAhVr2IMKHeQuDygQ8ZABCAE’, ‘lQ4MW8qDMuuwjwTk3bzAAg’, None, None, ‘CLSdsNgFEAAaJQAigwZCvn1avSyWmdcwkdeI7GWbn5KdHbw8rkAzOtsNrXMBPQA=’, 30, 1527516822166, None, None, [1, None, None, 1]]
Traceback (most recent call last):
File “/config/deps/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py”, line 292, in get_shared_people
people = [Person(info) for info in output[0]]
File “/config/deps/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py”, line 292, in
people = [Person(info) for info in output[0]]
File “/config/deps/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py”, line 87, in init
self._populate(data)
File “/config/deps/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py”, line 95, in _populate
self._latitude = data[1][1][2]
TypeError: ‘NoneType’ object is not subscriptable

I updated the locationsharinglib to 2.0.7

/config/deps/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py
/config/deps/lib/python3.6/site-packages/locationsharinglib/locationsharinglibexceptions.py

from https://github.com/costastf/locationsharinglib/tree/master/locationsharinglib

google_map.py however is still REQUIREMENTS = [‘locationsharinglib==2.0.2.’] on 0.70 not sure where this can be changed.

deleted the cookie and rebooted and now no more errors.

However now my device_tracker is showing

source_type: null

Looks like its working. No more errors.

I created custom

/config/deps/lib/python3.6/site-packages/device_tracker/google_maps.py

updated REQUIREMENTS = [‘locationsharinglib==2.0.7.’]

make sure only these 2 files are in the /config/deps/lib/python3.6/site-packages/locationsharinglib/
/config/deps/lib/python3.6/site-packages/locationsharinglib/locationsharinglib.py
/config/deps/lib/python3.6/site-packages/locationsharinglib/locationsharinglibexceptions.py

deleted cookie and restarted.

2 Likes

@penright does this thread help you out?

I was in the middle of the post on the other thread, so I finished it and then found you leading me here.
I did read this before posting mine. That is why I hack mine to 2.07. Maybe that is what fixed mine plus rechecking. I going to link back to my post in case someone else gets this far. Thanks for your help.
https://community.home-assistant.io/t/google-maps-entities-not-showing-up-confusion/54687/8?u=penright

1 Like

Thank you! I was having the same issue since .68 update. I followed your instructions and everything is working now. I manually created new versions of those .py files and pasted in the raw code from github. Maybe there’s an easier way to do it??

version number is in the /config/deps/lib/python3.6/site-packages/locationsharinglib/ folder, file name is .VERSION

Deleted cookie, restarted and BOOM!

I Have the same issue - cant get the google maps location sharing running.
How do I get this into my hassio installation (0.70.1)? I have no access to the files, even when I log on via ssh…

Regards
Lukas

Little more context. Logs, configs, what have you tried?

Hi,

config:

device_tracker:
  - platform: google_maps
    username: !secret google_username
    password: !secret google_password
    interval_seconds: 300
    consider_home: 180
    track_new_devices: yes
  - platform: fritz
    host: 192.168.1.3
    username: !secret fritz_username
    password: !secret fritz_password
    interval_seconds: 120
    consider_home: 180

This account can see 4 accounts of my familiy and therefor known_devices once gpt 4 instances like this:

google_maps_xxxx:
hide_if_away: false
icon:
mac:
name: google maps xxxx
picture: https://lh4.googleusercontent.com/xxxx/photo.jpg
track: true

If I now comment them out, they dont get recreated. Nor do they get any updates if they are not commented out.

The logs say nothing about this problem

If I log into google maps manually I can see all users as expected.

I also tried to remove the local .google_maps_location_sharing.cookies file and did endless restarts. If I delete and restart I get the following message only:

2018-06-05 15:33:25 ERROR (SyncWorker_14) [locationsharinglib.Service] Could not open pickle file, either file does not exist or no read access.

Regards
Lukas

I’m only at 0.70.0 I’m not sure if its going to run in 0.70.1.

Have you followed the instructions above? You need to create those files.

You will need ssh or configurator(browser based editor) add-on so you can create them.

Keep in mind, I am new and just got mine working.
The error message I was getting after I deleted the cookies file also. I think it throws that message anytime the file is not there, even if it is expected not to be there. I think it is more info and should not be called an error. The error is, if the you can not log on either with or without cookie. Once I had the version changed, again not sure if that is what fixed it or not, delete the cookie, and still could not log on. I checked the google account I was using, in your case “!secret google_username” and see if you need to approve the device. I too have approved it before and going back to check, found I needed to do it again. In fact, in hindsight, I bet it has to be approved anytime the cookie file is deleted. As part of troubleshooting for a different issue, I cleared my cookies. I had to re-approved the device again.

I downloaded the locationsharinglib.py and locationsharinglibexceptions.py and saved them to /config/deps/lib/python3.6/site-packages/locationsharinglib
I downloaded the newest version of google_maps.py from github. The file already contained the :
updated REQUIREMENTS = [‘locationsharinglib==2.0.7.’]
part. I deleted cookie and restarted. But nothing changed, it does not work. I dont even get error messages.

Luke, using a browser, have you logged on as the sharing user and looked at its logged on attempts yet?
In the screenshot you can see where it was blocked. Then you can see when I figured it out the next day and allowed it.

I dont see each restart request seperated. Even I restart the home assist. Only when I delete the cookie file I see the following:

Ich spreche kein Deutsch :smile:

I am guessing it says something about being blocked. You need to approve it.

No it says, it got a possitve login from an unknown OS.

What does the first line translate to? To me it looks like fault something …

That don’t sound right, mine reported linux. What is your OS?
Also, once I got the “New Linux signed in”, I never see it update, even on reboots. I think it has to do with the cookie. That is why, I am guessing, that once I had my code/configurations correct, I had to delete the cookie one more time, then approve the log in one more time. Then reboot one more time.

it translates to:
new login for an unknown OS

I am using hassio 0.70.1


So OS is called Resin OS which is Linux

That is exactly what I am using.
So, if you delete the cookie, do you have to approve it again?
Also, I think it only tries to login once at startup. That is why to get it to try, you have to restart.
BTW, there is no telling how many times I rebooted. But it did work. :slight_smile: