Location not updating
Closed this issue · 19 comments
I don't know why but the location of members will not update, they are all still at the place they were when I setup the integration. I've setup an automation that updates their locations every minute but it doesn't seem to be doing anything.
@charliehoward, what version of HA are you using? What version of this integration are you using? Have you enabled debug for the integration and checked the full log for any debug (or other) messages that might help explain what the problem is, e.g., not updating because the accuracy threshold you set is not being met? Can you share the source of the automation you mentioned?
I have the same issue.
My HA is 2024.10.3, and 0.5.3 of this integration.
This error originated from a custom integration.
Here is the log message.
Logger: custom_components.life360.coordinator
Source: custom_components/life360/coordinator.py:160
integration: Life360 (documentation, issues)
First occurred: 12:57:03 PM (3 occurrences)
Last logged: 1:00:08 PM
Could not update location of XX
@qingz2004, same questions for you as above. Also, the error message only happens when using the life360.update_location
service. Do the device_tracker
entities not update on their own? Have you disabled updating via the config page? Can you explain why you're using that service?
I use that service just to try if it updates, since it will not update on its own. All the devices are still at the place they were when I setup the integration.
Where is the option to disable/enable the updating on the config page? I can not find it. The config page shows only "Basic Option" and "Debug message verbosity". Is it in this integration's account setting page?
@qingz2004, did you enable debug for the integration and check the full log for related DEBUG messages?
Where is the option to disable/enable the updating on the config page?
This is a standard option:
Once you click System options you'll see:
It's the second option, which should be on.
The life360.update_location
service does not directly update the life360 device_tracker
entities. Rather, it asks the Life360 server to tell the Life360 app on the phone to update its location. Assuming that works, then a new location update should shortly become available and will update the device_tracker
entities on the next server poll.
Yes, both option were enabled in the "System option for Life360". My account is phone number verified.
Here is the log.
2024-10-25 19:21:07.778 DEBUG (MainThread) [life360.api] Account 1: Request error: GET(https://api-cloudfront.life360.com/v3/circles/REDACTED/members/REDACTED), attempt 1: ClientResponseError(RequestInfo(url=URL('https://api-cloudfront.life360.com/v3/circles/REDACTED/members/REDACTED'), method='GET', headers=<CIMultiDictProxy('Host': 'api-cloudfront.life360.com', 'user-agent': 'com.life360.android.safetymapd/KOKO/23.50.0 android/13', 'accept': 'application/json', 'cache-control': 'no-cache', 'authorization': 'Bearer REDACTED', 'Accept-Encoding': 'gzip, deflate, br', 'Cookie': '__cf_bm=REDACTED; _cfuvid=REDACTED')>, real_url=URL('https://api-cloudfront.life360.com/v3/circles/REDACTED/members/REDACTED')), (), status=401, message='Unauthorized', headers=<CIMultiDictProxy('Date': 'Fri, 25 Oct 2024 23:21:07 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Access-Control-Allow-Origin': 'http://api-cloudfront.life360.com', 'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, OPTIONS', 'Access-Control-Allow-Headers': 'accept,origin,x-requested-with,authorization,content-type,geolocation,x-location-metadata', 'Access-Control-Allow-Credentials': 'true', 'x-request-id': 'c0cab0bc5b1b887e5580d12ebba8516d', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '8d85f0ef098636fa-YYZ', 'alt-svc': 'h3=":443"; ma=86400')>)
2024-10-25 19:21:07.782 DEBUG (MainThread) [custom_components.life360.coordinator] fake@gmail.com: while getting data for Jesse from My Family Circle: aiohttp.client_exceptions.ClientResponseError: 401, message='Unauthorized', url='https://api-cloudfront.life360.com/v3/circles/REDACTED/members/REDACTED'; status: 401; authenticate: None
2024-10-25 19:21:07.785 DEBUG (MainThread) [custom_components.life360.coordinator] Finished fetching Jesse data in 0.101 seconds (success: True)
@qingz2004 looks like the account authorization is not being accepted. Did you use the Access Type & Token method?
Yes, I did. Otherwise I won't get all the circle members and their initial locations when it was integrated.
Looks like it lost the authentication sometime after the installation?
I logged in life360 again, and got the new token. Found it's different than previous one. I updated the life360 account in HA. Will see it if works.
Each time I login to life360 server, I got a different token. Is it normal? Which one I should use?
After updating the token, I got no error in the log, but still no location update with the member. Last seen was on Oct 16, the time when the integration was installed.
Here is the new log.
> 2024-10-26 00:37:26.021 DEBUG (MainThread) [life360.api] Account 1: Response headers: <ClientResponse(https://api-cloudfront.life360.com/v3/circles/REDACTED/members/REDACTED) [304 Not Modified]> <CIMultiDictProxy('Date': 'Sat, 26 Oct 2024 04:37:26 GMT', 'Connection': 'keep-alive', 'request-id': 'b874c764abaafe38fc9b29b9033268a5', 'Access-Control-Allow-Origin': 'http://api-cloudfront.life360.com', 'Access-Control-Allow-Methods': 'GET, PUT, POST, DELETE, OPTIONS', 'Access-Control-Allow-Headers': 'accept,origin,x-requested-with,authorization,content-type,geolocation,x-location-metadata,ce-source,ce-id,ce-specversion,ce-time,ce-type', 'Access-Control-Allow-Credentials': 'true', 'Access-Control-Expose-Headers': 'retry-after', 'Etag': '05a5b3a25f0ed2f698ef23c129974628', 'l360-etag': '05a5b3a25f0ed2f698ef23c129974628', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': '8d87c044deb039e4-YYZ', 'alt-svc': 'h3=":443"; ma=86400')>
> 2024-10-26 00:37:26.022 DEBUG (MainThread) [custom_components.life360.coordinator] Finished fetching Jesse data in 0.133 seconds (success: True)
It works now. Not sure what happened.
Each time I login to life360 server, I got a different token. Is it normal? Which one I should use?
Yes, that is normal. Use whichever one works, which in general would probably be the last one obtained.
In the future, when asked for log entries, please provide all that are relevant, not just the last few. Also, please format properly. (E.g., see how I edited your log messages above.)
It works now. Not sure what happened.
I'm glad it's working for you now. I'm not sure either, since you did not really provide enough information. But my guess is, it took a while to get the Circle & Member details, since the server has been very stingy lately when it comes returning those details when requested. It can take several minutes, and sometimes an hour or so. Until the integration gets that data, it can't retrieve location details for individual members. I should have thought, though, that you would have also seen the warning messages the integration outputs to the log while this is happening. Again, it would be very helpful to share all related messages.
@charliehoward do you still need help with this?
@charliehoward do you still need help with this?
No. Everything is working now.
The integration is great! Thank you for your hard work!
@qingz2004, glad it's working for you. But that question was for the OP. 😉
@qingz2004, glad it's working for you. But that question was for the OP. 😉
My bad. Sorry for that. I guess the OP got his problem solved too since he has not replied here for a week.
Sorry, never got it resolved but bit fed up with L360 so just uninstalled it and moved to OwnTracks
Sorry, never got it resolved but bit fed up with L360 so just uninstalled it and moved to OwnTracks
Sorry to hear that.
never got it resolved but bit fed up with L360 so just uninstalled it
That's a shame. I would have been more than happy to help you get it working. If you'd like to try it again in the future, just let me know. But I will need some details, like version info and debug logs.