Google Maps location sharing - New thread


Good job Luke. Following your trouble shooting help me connect a bunch of dots. Slang for I learned a lot. :slight_smile:

I could not understand why if you could connect, why it would not update. What is different about your “google maps” that is different than mine? Could it be that different devices update differently? But the map then would have to render it differently. You have my curiosity up. I posted the location to the code below. I glanced at the code, keep in mind you are more familiar with it than I, are you seeing the “InvalidData” exception?
I could be in the wrong area, to me looks like the work is done in _populate function.

class Person(object):  # pylint: disable=too-many-instance-attributes
    """A person sharing its location as coordinates"""

    def __init__(self, data):
        logger_name = u'{base}.{suffix}'.format(base=LOGGER_BASENAME,
        self._logger = logging.getLogger(logger_name)
        self._id = None
        self._picture_url = None
        self._full_name = None
        self._nickname = None
        self._latitude = None
        self._longitude = None
        self._timestamp = None
        self._accuracy = None
        self._address = None
        self._country_code = None

    def _populate(self, data):
            self._id = data[6][0]
            self._picture_url = data[6][1]
            self._full_name = data[6][2]
            self._nickname = data[6][3]
            self._latitude = data[1][1][2]
            self._longitude = data[1][1][1]
            self._timestamp = data[1][2]
            self._accuracy = data[1][3]
            self._address = data[1][4]
            self._country_code = data[1][6]
        except IndexError:
            raise InvalidData
Also I found this issue The last line says Pull Request fixed issue. Must be something different.
Also, I started to reply but got sidetracked, you can run the locationlibsharing from the command line. You might try the latest branch, although the description does not seem to relate to your issue.


The error is located on the string representation methods used in the Person class. They try to convert Null values to dates and integers and so on. I downloaded newest locationsharinglib inside my ssh addon container and debugged with a small self made piece of code. Now i placed the locatiobsharinglib in my config folder below deps together with a .version and modified the local google-maps component to have requirement to that newest version. All works fine now. The wrong of the 4th person with missing timestamp and no current location just gets ignored now.


Still facing some issue on Google Location Sharing

From the log, I can see that all the 3 google account that shares location with my google account are tracked perfectly.

But in HA none is shown.
I can see an error
[locationsharinglib.Service] Could not load people, response:

What can be the issue?

@lweberru I’m facing an issue like o equal to yours.
What was your solution?

BTW, I’m on HASSIO so I have very limited possibilities… :thinking:


018-07-18 12:22:07 DEBUG (SyncWorker_16) [locationsharinglib.Service] )]}'
[[[["xxxxxxxx","",null,"NAME-A ",null,null,null,"xxxxxxx"]

2018-07-18 12:22:07 DEBUG (SyncWorker_16) [locationsharinglib.Service] Could not load people, response: [[[['xxxxxxxx', '', None, 'NAME-A.', None, None, None, 'xxxxxxx'], [None, [None, 00.00000, 11.1111], xxxxx, 16, 'street-location', None, 'IT', 7200000], 1, 2, 'xxxxxx', None, ['xxxxxx', '', 'NAME-A', 'NAME-A'], 1], [['yyyyyyyyyyy', '', None, 'NAME-B', None, None, None, 'yyyyyyyyyy'], [None, [None, 22.22222, 33.333333], yyyyyyyy, 92, "street-location", None, 'IT', 7200000], 1, 1, 'yyyyyyyyy', None, ['yyyyyyyy', '', 'NAME-B', 'NAME-B'], 0], [['zzzzzzzzz', '', None, 'NAME-C', None, None, None, 'zzzzzzzz'], None, None, None, 'zzzzzzz', None, ['zzzzzz', '', 'zzzzz', 'zzz'], 1]], None, 'zzzzzz', 'zzzzz', None, None, 'zzzzz/zzzzz/zzzzzz/zzz/zz+zz/zzz/zzz/+zz/+zzzzz/zzzz+zzz+zz+zzzz', 5, zzzz, [zzz, [None, [None, 44.44444, 55.5555], zzzzz, 33, 'zzzzzzzz', None, 'IT', 7200000]], None, [1, [[[30000, 60000], None, 3600000], [[30000, 60000], None, None, 1]], None, 1]]


One of your tracked accounts is missing a must have data, which results in a failing data type converstion within the library. To fix it you need to work with the newest locationsharinglib. For that you need to have a local custom component of the with a changed requirement setting:

1.) place a copy of the into /config/custom_components/device_tracker
2.) change requirements in the file to:

REQUIREMENTS = ['locationsharinglib==2.0.11']

If it is still not working you can also make a copy of the library and modify it. Let me know if it is not working, than I tell you what to modify there.



Thanks @lweberru

Where I can find the


Take the official source from git:



@lweberru After placing the in /config/custom_components/device_tracker with the requirements files changed, rebooted, nothing changed, same error.

I can have a local copy of the library even if I am on HASSIO?

Thanks again


Do you have the note, that you are using a local copy of this component like this?

2018-07-18 16:07:56 WARNING (MainThread) [homeassistant.loader] You are using a custom component for device_tracker.google_maps which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.

Do you see home assistant downloading the new locationlibshared version during docker start? Think this should be visible via
hassio su logs
if this is the case, than I would install a local copy of the locationsharinglib into the directory:


place the following files there:

you get the sources from

I modified the file like the following:


return datetime.fromtimestamp(int(self.timestamp) / 1000)


  return datetime.fromtimestamp(int(self.timestamp) / 1000)
except (IndexError, TypeError):
  return 0

but I am no python developer…


I can see the message regarding usage of local copy.

I already have a locationsharinglib folder, actually I have two


inside the first folder:


The date inside the file is the same as the one you linked:
__date__ = '''2017-12-24'''

should I modify as you wrote in the message?

What about the other folder? Should I remove it?



I am still not really and fully familar with home assistant architecture and python, so perhaps someone else can say how exactly these folder and file structure should look like? Dont want to share my not existing knowledge :smile:


Thanks @lweberru

Strange thing is that I have set up a new fresh install of latest version of HA without adding any device, except the ones discovered, without modifying any config file, except adding

  - platform: google_maps
    username: MY_USERNAME
    password: MY_PASSWORD

and I still get no tracking.

In known_devices.yaml I get

  hide_if_away: false
  name: google maps myemailgmailcom
  track: true

instead of the address to be tracked.


Hey, not sure if this will help anyone else but about a week ago i started using the google location tracking and all was great then all of a sudden It just stopped working,

After a bit of searching, i came across this thread and followed the steps from here down:

I’ve added the custom component, added the debug logging which gave me the error of “Could not load people, response:”

After a quick google I came across this:

Which led me to just trying jedi7’s pull request


I’ve just tried it and it’s working perfectly for me .

I may have repeated someone elses advice so apologies if i have but it fixed things for me and thought it might help others.

Google Maps Location Sharing not updating

Hey, I have google maps set up in my HA and it seems to be working ok. Does anyone know if you can see up a work zone? I tried setting one up in the google maps app, but it doesn’t show at work in HA.


Zones are defined within HA itself, look documentation about zones. There is also a configure option.


Got it, thanks.


Thanks radeon for the tip. My kids went out of state for a while where they have poor to no cell signal. Knowing about this apparent bug of phones reporting bad location info and it keeping all/some Google Maps devices from being tracked, I unshare my kids phone location to my HA Google account used for device tracking. This fixed the issue for my phone and it’s being tracked again now. I could see in the logs that the 3 devices were reporting location info, but my kids info was formatted oddly compared to my phone’s info.


@radeon i am missing something here. Placed the file “” modified it but nothing happened
Where did you put the jedy .py script ?


I was having the same issues and I finally resolved it by doing the following:
Create a new gmail account for tracking and have your friends and family allow tracking on that account. DO THIS BEFORE YOU PROCEED ANY FURTHER!

In the /config directory delete file:


Delete any entries in known_devices.yaml referring to google_maps (or just delete the entire file)

Insert ONLY the google account you set up to do the tracking in your configuration.yaml like this:

 #Tracking stuff
   - platform: google_maps
     username: [email protected]
     password: ########
     track_new_devices: true


In your groups.yaml create something like this:

  name: Awesome People
  view: no
    - device_tracker.google_maps_xxxxxxxxxxxxxxxxxxxxxxx
    - device_tracker.google_maps_xxxxxxxxxxxxxxxxxxxxxxx

(those x’s will be a unique id you will see in the known_devices.yaml file)

Clean up:
You may want to go back into the known_devices.yaml file and put a usable name in the name: field.
After 3 days of pulling my hair out, I fixed myself a cocktail and smiled.


Not sure anyone saw this pull request. I was looking for the GPS accuracy option a few days ago and it looks like someone already has the idea and feature possibly coming soon. I’ll definitely be pulling the files in a few and testing it on my production HA install.