Help adding components for Google Maps Location Sharing

Hello,

Following the instructions at this link:

I have this part of the configuration working fine, as confirmed by the security warning on my Google Account (which I then approved):

device_tracker:
- platform: google_maps
username: !secret gMapsUser
password: !secret gMapsPassword

But I can’t figure out how to progress beyond this login. I suspect I need to install the locationsharinglib, and then do some additional configuration beyond that, but I am not finding anything that explains those steps.

If anyone would be so kind as to confirm the additional steps I would need to do, that would be great. I am running HA in a Docker Container, so whatever python commands or PIP install steps need to be done, I need to know how those work in Docker.

Thanks

ok so you created an additional gmail account, shared your google maps location with that account (and any other account as well) and then used that account in your configuration.yaml right? If so you should see device_tracker.google_maps entities for each account you shared to it.

Thanks for your reply … yes, I agree, but I do not see that, and that’s where I am stuck. I deleted and recreated the cookies file, and confirmed that the Device Activity warning was approved, but still do not see the entity after restarting the container.

any errors in the logs?

Logs are clean.

Is there an issue tracking the same mobile phone with two different platforms? The device is already tracked by the linksys_smart platform.

no I am using 3 device trackers on my phone, did you confirm that the accounts are sharing location to the third account? You may want to login as that account and make sure you see the location of those devices in google maps.

Actual just two accounts … the primary account, which is shared with the secondary. Yes, I log into the secondary account on the web and can definitely see the location of the phone I am trying to track.

Once I get this working, I will also want to track another device, but just trying to get this first one working.

and the account you are using in hass is the second account? do you have 2fa or something enabled on the second account?

Edit: I would also check known_devices.yaml to see if the devices show up there too.

Yep. Authenticating with the second account. No 2fa in the equation.

Think I just found a problem! I find this in known_devices.yaml:

google_maps_109448847750537552828:
hide_if_away: false
icon:
mac:
name: google maps 109448847750537552828
picture: https://lh4.googleusercontent.com/-_73m91bUyxw/AAAAAAAAAAI/AAAAAAAAD34/6Ow9L1UHPLA/photo.jpg
track: false

Track needs to be “true”

yup that is correct! do you have track_new_devices set to false for your other device tracker?

That solved it after a restart. The WIFI tracker finds a bunch of items I don’t need/want to track, so I defaulted new devices to “track: false”, after only marking the ones I wanted to true. I now see the entity and all is well.

Thank you so much. Looking forward to creating zones and automations next …

I marked your suggestion to look in known_devices.yaml as the solution.

1 Like

no problem just an FYI though I have noticed this component at times taking up to an hour some times to update. it may be a bit slow for some automations.

Any recommendations on other GPS trackers for Android?

Tasker, owntracks or zanzito

Edit: gpslogger as well

In the latest locationsharinglib update i.e 3.0.2 battery level and charging status has been added. but I’m not able to see the same in my home assistant sensor. is there any special configuration that i need to do ?

Can any one please help !!