Life360 Device Tracker Platform

Followup:

The temporary fix did NOT work for me when I downloaded from the following link: GitHub - alexyao2015/life360-python: A simple python life360 client

The temporary fix DOES work for me when I download from the following link: GitHub - alexyao2015/life360-python at 485e063e67018b942f474999555b99e7d912fc3f

IDK if there’s a difference, but one works for me and the other doesn’t.

FYI. I’ve been a bit tied up, but I’ve looked at the fix, and I’ll try to get this all integrated and into a HA release, but I won’t be able to get to it for a couple days.

5 Likes

Yes, the first is the master branch, and the second is a branch that contains the specific fix. You can switch between in github using the dropdown box at the top left and you’ll see “fix/endpoint-update” which is the branch that your second link refers to.

As others have said, download the correct branch, drop the life360 folder into /config and reboot. No need to remove the integration first. It should just start working again.

The pypi.org package has been updated and I’m working on a HA PR right now.

UPDATE: Fix included in 2023.8.0b3.

4 Likes

Issue seems to be resolved on Live360 side - after restart today morning device trackers are available again and no errors or request to reconfigure integration in HA. I did not apply any fixes ito HA in meantime.

1 Like

lol, I hadn’t even noticed and been working on HA all day! Same for me, issue seems to have resolved itself.

Well, there you go. It’s an undocumented & unsupported API, so they can change it whenever they want. I’m surprised the “fix” still works.

Do we need to “uninstall” the fix? Mine is working fine even with it, though!

Given what I’ve heard so far, I would think you could delete the copy of the life360 package from your config folder. It seems it works with or without the “fix”.

1 Like

how to delete and reinstall integrations?

So, in 2023.8.x, when this situation occurs, and there is a box on the Settings → Devices & Services → Integrations page for the Life360 integration with a big, red RECONFIGURE button, and that box does not have a delete option in the three-dot menu, there should also be another Life360 box, i.e., the “usual” one. If you use that one, click into the sub menu (i.e., click the right arrow), the three-dot menu on that page should have a delete option.

I’ve also found the cause of the bug that causes the exception when clicking the RECONFIGURE button. I’m working on a fix that I hope to submit soon.

So, bottom line to the recent issues:

First, I don’t completely understand what initiates the situation that requires the reconfiguration. I’m sure it has something to do with the recent Life360 API changes, but since, again, this is an unofficial and undocumented API, I can only guess.

I don’t think it has anything to do with special characters in the Life360 account password.

I would have thought the automatic reauthorization built into the HA life360 integration would have resolved any issues “behind the scenes”, and it may in some cases, but it appears in others it doesn’t. This leads to the notification and the box with the RECONFIGURE button. Unfortunately, that RECONFIGURE button does not work, but hopefully will soon.

If/when the RECONFIGURE button is fixed, hopefully that can be used to get the integration working again (i.e., without changing your Life360 account credentials.)

BUT, if it does not, then it appears the only solution is to change your Life360 password. In that case, I’d recommend changing it via the Life360 app (or website???) first, then restart HA. If it still complains, then hopefully entering the new password via clicking the RECONFIGURE button will work. If not, then use the info above to delete the existing entry in HA for Life360, then add it back in with the new credentials.

Sorry this isn’t perfect. I wish there was some way to know exactly what the Life360 API expects.

3 Likes

Fix Life360 reauthorization config flow by pnbruckner · Pull Request #99227 · home-assistant/core (github.com)

UPDATE: The PR was approved. Hopefully it will make the 2023.8.5 release, if there is one.

UPDATE 2: Looks like there will not be a 2023.8.5, but the fix is in 2023.9.0b0.

1 Like

It no longer presents the 500 error, it now presents invalid authentication when you click on reconfigure. Entities continue to appear normally and report status.

Captura de tela 2023-09-06 180919

Logger: homeassistant.config_entries
Source: config_entries.py:1248
First occurred: 18:06:14 (1 occurrences)
Last logged: 18:06:14

Config entry ‘Leandro’ for life360 integration could not authenticate: client is not valid/enabled

I changed my password and that’s it! It worked!!

Has anyone managed to export a full list of Life360 places using the logger and debug method?

I have about 10 places in my Life360 account that I want to use as zones in Home Assistant, but the logs only export 5 places.

Yes. There are 11 Places in my Life360 Circle, and they all show in the debug output.

Very strange. I’ve just tried again there (thinking it might be a delay issue) and it’s still only giving 5 places.

Do you pay for a Life360 subscription - just wondering if that might be why I’m only getting 5.

Yes, I do. If you don’t, I would have thought it would limit the number of circles it would let you create in the first place, but you said you have ten. Are they all in the same circle?

Yup. All the same circle. It hasn’t stopped me creating ones in the app. I reckon that’s the reason then.

Weird. I guess I never tested this scenario (or, at least, not for a long time.) I do have a second, free Circle I have used for testing. I just added some Places to it so it now has six. But, when I check the debug output, it only shows four of them. But for my paid Circle, it shows all the Places. Hmm, weird, but I guess not unreasonable.

FWIW, the life360 HA integration does only show a Place once. I.e., it records its ID when it is printed, and won’t print a Place with the same ID. I thought maybe that had something to do with it, but I just wrote a quick test script that uses the life360 package directly (i.e., no HA), and it printed out all my Circles and all the Places in each of those Circles, and it also only shows four Places for my free Circle. Oh well.