Life360 Device Tracker Platform

Thanks, I’ll try that once I have another device tracker platform setup. I tried the Google Maps location tracker but ran into a problem trying to rename the cookie file in the config folder as it wouldn’t let me save it with a leading “.”

You can use it with just one. I do for a few people. Then you can always add the second tracker if/when you get it working.

Can I ask, I assume you had to do this as well. How did you save the file with the leading “.” ?

Save the cookie file to your Home Assistant configuration directory with the following name: .google_maps_location_sharing.cookies. followed by the slugified username of the NEW Google account (account B).

Step3

  • For example: If your email address was [email protected], the filename would be: .google_maps_location_sharing.cookies.location_tracker_gmail_com

I use a Python virtual environment install, so it’s easy.

ok that makes sense but for someone that is not just wondering how would someone be able to execute that step . . . not that I expect you to know that answer but I’ve been searching but haven’t found anyone else that has run into that issue so far.

How do you access HA’s config folder? I.e., how did you get the cookie file there? If you can’t rename it after getting it there, can you rename it before putting it there?

thanks, i managed to set it up and use this composite entity instead of life360 entity

hopefully now my house doesn’t shut down because home assistant lost contact with life360…

1 Like

Hi @CauseFX! It’s been a while. lol

I’ve finally gotten around to giving this a try. I was able to successfully send the request. And for some Circle Members, it seems to work almost immediately. But for others, it works only sometimes. However, if I open the Life360 app on my phone, all the Circle Members update pretty much right away. So, there must be more to it than just sending this POST request.

Can you fill me in more on what you discovered? Did you see any other traffic? Retries? I noticed the response contains a request ID, and and an item that indicates the request “isPollable”???

UPDATE:

Further testing shows that after sending this request for a given Member, that Member updates seven consecutive times (either on the very next seven queries, or possibly on seven consecutive queries after some amount of delay. Note that HA queries the Life360 server every 10 seconds.)

So now I’m wondering if HA should be polling the request somehow and cancelling the request once it sees an update. I’m afraid to release this code “into the wild” as it stands now, because it seems it has a very likely potential to have a detrimental effect on battery usage on the Member’s phone/device.

FWIW, if I open the Life360 app on my phone, I see that HA gets updates for all the Members in my Circle on the next query, but it happens just once, not seven times.

If anyone has any insights into how this is supposed to work, by all means, let me know. Remember, the implementation I created is based on very limited “reverse engineering” someone did years ago. I’m aware of no official Life360 API or related documentation, so it’s all guesswork!

I have this integration running for over 2 years with no problem. But this afternoon I started to get the following error:

ClientConnectorError: Cannot connect to host api.life360.com:443 ssl:default

Does anyone is experiencing the same problem?

Thanks for any help I can get.
Marco

I seems to be working ok for me, but I do get a message when I open up the Life360 app on my phone saying there is a known problem they’re working on.

Thanks for your answer @pnbruckner.

I hope my problem is related to this problem. I’m connecting from Europe.
I’ll see tomorrow morning.

1 Like

Hello all,
I spent about an hour browsing through this and another Life360 topic and could not find what I was looking for, so hopefully you don’t mind me asking a, basic maybe, question.
I installed the integration, entered my daughters username and pw and all her friends showed up on the map. So far so good, but she (my daughter) was not shown on the map? In States a device_tracker linked to her is present, with all kind of relevant info, like Long and Lat, battery level, address and everything else, so the info is known in HA.

Q: is it standard behaviour that when a user is at Home that the avatar is not shown? That is not so in the app on the phone? Or … is something else going on?

Are you talking about a Map page or a Map card?
Is your daughter is not displayed when she is at your current “home” zone?

image

When you click on the menu item Map, all her friends are there, but she is not.
Well, I disabled all the device_trackers of her friends, I’m not interested in them, but before I did there were a dozen avatars, none of which was the one of my daughter.

The Home and Zone thing (I read the paragraphs) is not clear to me, but maybe not even relevant.
She is now at home, according to me, according to HA and according to L360 :slight_smile:

Add yourself - and you will be absent on the Map page (available from a sidebar) too when you are Home.
Docs:

Thanks for your insight lldar. I thought best to wait untill I know for sure she is NOT at home and then see what happens. Her avatar is not on the map, and the device_tracker info in STATES is still saying she is home, which she (physically) nor her phone (glued to her hands :anguished:) isn’t.
I re-enabled one of her friends, immediately that girl is shown on the map. So the integration works.

Guess I need to dive into Home and Zones and things, right?
Any hint where to start?

Roger, it could be that she has disabled Life updates in background. You can see that from the life app and last seen online so you know if it is an issue with life or integration in Home assistant.

I don´t think it is a zones issue (assuming she is far enough from home to be sure she is outside of the Home zone).

Map page shows trackers which are not Home.
But create a Map card and add all needed entities - this card shows all trackers.

1 Like

Right … it turned out that, as you suggested, updates were not coming through properly. It is all ok now.

Still, I learned that Map doesn’t show avatars/locations of persons when that person is at home.
Good to know.
Thanks for the help.

1 Like

A workaround to that might be to just use a map card and plot the entities on there that you want to track. I think in that case these entities will show up, even if they are at home.