Google Maps location sharing - New thread

@lweberru After placing the google_maps.py 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:

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

place the following files there:
locationsharinglib.py
locationsharinglibexceptions.py
.VERSION

you get the sources from

I modified the file like the following:

replace

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

with

try:
  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

13

inside the first folder:

23

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?

Thanks

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

device_tracker:
  - platform: google_maps
    username: MY_USERNAME
    password: MY_PASSWORD

and I still get no tracking.

In known_devices.yaml I get

google_maps_myemailgmailcom:
  hide_if_away: false
  icon:
  mac:
  name: google maps myemailgmailcom
  picture:
  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

(Fix problem with missing location by jedi7 · Pull Request #25 · costastf/locationsharinglib · GitHub)

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.

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 “google_maps.py” 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:

.google_maps_location_sharing.cookies

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
 device_tracker:
   - platform: google_maps
     username: [email protected]
     password: ########
     track_new_devices: true

Reboot

In your groups.yaml create something like this:

awesome_people:
  name: Awesome People
  view: no
  entities:
    - 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.

Not working for me on a Docker build of HASS on 0.76.

Getting “Could not open pickle file, either file does not exist or no read access.” as error. There’s a .cookie file that’s created, so what’s wrong? Already tried to remove it, and it just creates a new one.

Hello everyone.

After last update, currently v0.77.3, the component just stopped working. I was stupid enoguh not to check on breaking changes, so I went on and deleted the cookie file and modified known_devices.yaml.
To my surprise, this time it didn´t fix things, because known_devices.yaml is not supported anymore!!!

Now, (I think) there´s no way to reset things. Does anyone have a workaround??

Hello, did you find any solution, same here :frowning:

Hardly in only two hours…

Try deleting or editing the core.entity_registry in the .storage folder of the config directory.

I needed to this since i still had some old devices that i couldn’t get rid of since known_devices is not used anymore

Where this is documented?
I looked through the 77.3 changes ( I thought)…