Life360 Device Tracker Platform

in HACS go to the three dots/overflow menu against the Integration and you’ll see it in there…
image

There are multiple issues on this thread. Since you don’t identify your issue, Phil won’t know which issue you are experiencing.

Hi. Yesterday, I discovered my Life360 account was ‘disabled’ in the integration. I enabled it, it worked for 20 minutes, then disabled again. Not sure exactly why, but its very persistent, and looks like its not liking my account now?
I now need to keep enabling this on a regular basis (it seems to last for around 20 minutes, then disables). Any idea why? Are there any logs I can assist with?
image

==edit== just seen the beta suggestion. Will try this when I get home
==edit2== tried the beta. ITs definitely not working now. The difference between beta and 0.5.2 is 0.5.2 worked for a few minutes then stopped, beta doesnt seem to authenticate at all.

I have the same problem since yesterday. Running the latest beta 0.5.3b0

I’m using name and password for my account. Not the ‘new’ way.

I also have the same “account disabled” problem since yesterday. I didn’t report it hoping that it was because I had restarted Home Assistant.
I am also using beta 0.5.3b0, and the token method.

UPDATE
It appears that my token changed. I used the developer tools to check my login token and it has changed from what had been working for a while.

How do you check the token? is there something you did to fix this?

Did 0.5.3b0 help at all?

What do you mean by “doesn’t seem to authenticate”?

Are you able to edit the code? If so, you could try changing a couple of constants in const.py to allow it to retry longer. Let me know if you can and want to, and I’ll provide more detail.

Every time you authenticate, you’ll get a different token. E.g., if you’re using the username & password configuration with the integration, every time you (re)enable the account, it will get a new token (although you don’t see it. It is saved in .storage/core.config_entries.) Or, if you’re “manually” getting a token using Life360’s website, again, every time you “log in”, you’ll get a new token. This is nothing new.

Same as I asked above, are you able & willing to modify the code to see if more or different retrying will help?

FWIW, I just saw an error 403 while fetching member data myself. (Actually, it happened a couple days ago; I just noticed.) I had not seen this before (I only have had reports about it.) As with others, it disabled the account and created a repair issue. I also saw an exception in the log (nobody else has mentioned):

Logger: homeassistant.util.logging
Source: util/logging.py:98
First occurred: July 3, 2024 at 3:51:46 PM (1 occurrences)
Last logged: July 3, 2024 at 3:51:46 PM

Exception in async_process_data when dispatching 'life360_members_changed': () Traceback (most recent call last): File "/config/custom_components/life360/device_tracker.py", line 86, in async_process_data await asyncio.gather(*(entity.async_remove() for entity in old_entities)) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1376, in async_remove self.__remove_future = self.hass.loop.create_future() ^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'loop'

I’ll try to figure out what is causing this exception.

But I went ahead and re-enabled the account (without changing anything else), and it started working again. I’ll see for how long. (BTW, this account is using the token config.)

Interestingly, this happened on my “production” system. I’m also running a test system. On that system I have the exact same account registered with the Life360 integration, using the exact same token. I also have a second, test account registered that uses username & password. I did not see the error with either account on this test system.

This happened because one of my tracker entities was disabled and the code was not handling that case correctly. I’ll fix that, but it won’t really help the problem (just it’s response to the problem.)

1 Like

Released 0.5.3b1

  • Increase delay between error 403 retries (for requests other than Circle & Member lists) from 10 seconds to 30 seconds. Also increase total retry period from 5 minutes to 15 minutes.
  • Fix bug when deleting disabled device_tracker entity.
1 Like

Released 0.5.3b2

  • Increase update period from 5 seconds to 10 seconds.
  • Increase delay between retries to 60 seconds and max retry period to 30 minutes.
  • Show retry number in DEBUG messages.

With the limited testing I’ve done today, it looks like most updates happen without error, but many need to be retried. Many of those succeed with just one retry (after 60 seconds), but many require 2 or 3 or more retries, with the worst case so far that I’ve seen is about 6 or 7 retries.

Honestly, even if I can prevent it from disabling the account, the amount of retrying might make the integration less than useful.

Just an FYI, I’m getting very close to “throwing in the towel” again.

The API seems to have changed again. They may or may not be actively trying to prevent our usage of their API. That is impossible to tell. Either way, it’s getting very difficult to deal with again. E.g., and I may have already said this, I’m using the exact same Life360 account, using the same account method (token), with the exact same token, on two instantiations of Home Assistant, running on the exact same machine, yet one is getting these errors, and the other isn’t.

@pnbruckner – Thank you for your work on this. I have been solely using L360 for years with HA. There are five of us that HA has to deal with. I have the HA app on two but don’t want it on the others since I can’t keep them out of the settings.

The last time the API updates hosed us I looked at using Google and had some issues.

This latest round was bad timing for keeping everyone on track with the holiday… but good timing for having some extra time… I’ve got your composite integration working with L360, Google, and HA device trackers.

I too pulled the beta 0.5.3b2 down this morning. Logged in and had success for a period of time but eventually got:

2024-07-05 13:11:51.925 ERROR (MainThread) [custom_components.life360.coordinator] [email protected]: while getting data for Mxxxxxxxxxx from Family Circle: aiohttp.client_exceptions.ClientResponseError: 403, message=‘Forbidden’, url=URL(‘https://api-cloudfront.life360.com/v3/circles/REDACTED/members/REDACTED’); status: 403

Hopefully the API stabilizes and you can get a bead on what they’ve changed.

Now I don’t have to be totally out of service with your composite integration, but L360 sure is grand at speed when it works. Thanks again !!

FWIW Phil, I’ve been keeping up to date with your releases and touch wood haven’t had any noticeable issues since you resurrected the Integration…maybe just me but it’s definitely working fine here…

No luck with 0.5.3.b0, but have just upgraded to 0.5.3.b2. Fingers crossed!

@pnbruckner I’m using my email and password and I’m getting invalid login. Is there anything I can help with on my end? You’ve been more than helpful with me when I’ve had issues and would like to help if I can.

dj

Am on b2 now. Get
image

I think you are correct. API locked out. Need to go back to Google maps integration again I think

==edit== Phil, your G-maps integration works a charm btw. A massive thanks for all you do within this community.