Life360 Device Tracker Platform

Thanks for helping out with the instructions for HAOS! this worked for me too!

1 Like

In this thread there are several references to a modified api.py. Unfortunately, all links to the file are dead. Would someone be kind enough to make this api.py available again? Thank you

Interesting twist on a workaround! FWIW, I know it’s difficult to edit a file in this directory tree, which is why I had suggested using sed. But, deleting and grabbing a new, updated copy can work, too. But, in this case, you really only needed to delete and redownload a copy of manifest.json.

1 Like

If you’re going to modify or update any file, it should be manifest.json, not api.py. Please see several different ways to do that explained above.

But if you really want, you can create a folder named life360 in your system’s configuration directory, and copy the files from here:

life360/life360 at v6.0.1 · pnbruckner/life360 (github.com)

But, when the new HA release with the fix comes out, DON’T FORGET TO DELETE THIS FOLDER! Several people have had problems because they forgot to do this in the past.

Thanks a lot Phil.
My request for the api.py came from the fact that I have the HA installation running in a VM on my Synology and it is not clear to me how to find the manifest.json.

Everyone:

Please, once the fix is out:

  • Delete the <config>/life360 folder if you created one.
  • Delete the <config>/custom_components/life360 folder if you created one.

The workarounds and the final fix should not require you to change username (e.g., email to phone number) or password. The API to the server changed, which is what the fix compensates for.

Having said that, some people, who have switched from logging into the Life360 app with an email to a phone number have had issues trying to use the email as the username in HA. In that case, there seems to be success using the phone number instead.

If you can get to a command line (probably one that isn’t limited in some way), you can use the find command, e.g., “find / -name life360”. One of the results should contain “homeassistant/components/life360”. That’s where you’ll find the manifest.json file.

Thanks for the hint Phil.
I find it strange that the folder (/custom_components/life360)
seems to have been there the whole time even though I am on the latest HA version.

What folder?

In a normal install, there will be two life360 folders. E.g., on my system (which is a docker install):

HA:/config# find / -name life360
/usr/local/lib/python3.11/site-packages/life360
/usr/src/homeassistant/homeassistant/components/life360

The first is the PyPI package that contains the actual fix (i.e., the api.py file) in version 6.0.1. The second is the HA life360 integration that contains the manifest.json file that effectively “points to” the first. (Well, actually, it causes the first to be installed.)

I have access to the config folder via the Samba Share add-on.
In it I see a directory Life360. This directory contains:
The Folder: pycache
As well as the files:
init.py
api.py
exceptions.py
version.py

Then you’ve done this before. :smile: There normally shouldn’t be such a folder. Which is why this workaround can be less than optimal. You have to remember to remove it after the official fix comes out.

For what its worth, I just cleared out all existing life360 installs, reset my password, and tried your fix. Its still not authenticating…
So I tried logging back in on my app. It now authenticates through an sms sent to your phone, and didn’t ask for my password.
I wonder if life360 themselves have blocked access from non phone related sources, as I also can’t find where to log in (using a PC browser)

I have heard something like this recently. It could be a new MFA requirement they’re adding. Although, from the little I’ve heard so far, it seems only to happen if you log into the app with a phone number instead of an email address. I can tell you I still use an email address for my username, have recently updated my Life360 password, and the HA integration (with a workaround in place) works.

As far as logging into Life360 via a PC browser, you can still do that, but there are only very limited administrative things you can do via the interface. They dropped the full UI via a browser a long time ago.

Thank you very much.
First of all for the reference to the old directory entry and secondly, thank you very much for your correction. It works perfect.

1 Like

I specifically used my email address to provision the app, not phone number (you have a choice). It then insists on doing the 2fa thing, even though I never specifically set this.
I have a terrible feeling this isn’t going to end well for the HA community… Its a worrying trend now (Chamberlain MyQ garage door api as an example)… I sincerely hope this is just a minor glitch in the matrix :wink:

As i new user running HAOS all i can say is Home Assistant makes zero sense. I had Life360 working, but it’s like there is no trace of it. I’ve installed Samba share, terminals, studio code server and nothing what so ever returns anything about Life360. Entering this in terminal

find / -name life360

Does nothing, doesnt even return an error.

Everyone talking about manifest files, Life360 folders, api.py files and none of that exists despite Life360 being installed. Struggling to comprehend why i can’t simply navigate to a file somewhere and just edit or replace it.

This is just my opinion, but most of the install methods are more “locked down”, mostly to make them easier to “just use”, but also, I guess, to help prevent users from “shooting themselves in the foot.” These workarounds are really intended for advanced users, who have, over time, learned the ins and outs and tricks of how the system works internally. And even many of them have shot themselves in the foot when attempting this sort of thing, mostly by forgetting to undo the temporary workaround when the formal fix comes out.

If you’re new to HA, I would not recommend attempting to apply a workaround. Just wait for the next release, which hopefully will come out soon. The fix has already been accepted and staged to be part of the next release.

Reinstall with GitHub - pnbruckner/ha-life360: Project for testing significant changes to the Home Assistant Life360 integration worked for me.

1 Like

Thank you Phil, confirmed that I removed the life360 folder from the previous “fix” and restarted HA and the integration is working for me now.

1 Like

Phil, thank you for your continued support in getting this situation resolved at least for most of us. I’m using ProxMox running HAOS. I too was not able to find any of those life360 folders. Ultimately, I used ha-life360: Project for testing and finally got things working again.

Just to be clear, in the future when the new life360 is updated with the patch, do I need to delete the /homeassistant/custom_components/life360 folder that was created, or just leave it be?

Appreciate your time and effort in this. Thanks again!

1 Like