Closed GLazzari1428 closed 10 months ago
For those on a Rpi's, the api.py location is /homeassistant/life360. I swapped in the new api.py, restarted HA and was able to reconnect. Many thanks to those involved in figuring out and fixing this!!! I'm assuming the other locations refer to the docker installs.
I am on a pi 4. I don't see these directories. Just learning. Pointers welcome.
this :)
Thanks for getting this fixed.
I'm running in docker, but still can't get it working.
I unfortunately removed the integration from HA before this fix. Now, each time I setup from the integration page it starts the "wizard" then doesn't work. It continually pulls life360-6.0.0.dist-info. So, I've tried replacing the ...site-packages/life360/api.py with the newest version, restarted. Also tried dropping the new life360/ in the config/ folder.
After replacing the api.py in the site-packages/life360 folder, the docker restart is consistent and keeps the 6.0.1 api.py changes in there.
Ideas welcome and appreciated.
The web page doesn't allow me to authenticate with my username, only phone number. So I assume it is the same from HA.
What is the phone number syntax for the HA username? (xxx)xxx-xxxx, or xxxxxxxxxx or ?
Excellent use case, makes complete sense and hadn't thought about it that way. Thx.
Thank you for the quick fix! Phenomenal job!
For those on a Rpi's, the api.py location is /homeassistant/life360. I swapped in the new api.py, restarted HA and was able to reconnect. Many thanks to those involved in figuring out and fixing this!!! I'm assuming the other locations refer to the docker installs.
I am on a pi 4. I don't see these directories. Just learning. Pointers welcome.
I am on a pi4 using the HA image install also, and just used 'terminal' within HA to get a shell prompt. From there, the api.py was in the location I noted.
at the shell you can do a search from /
cd /
find . -type d -name life360
(to look for all life360 directories)
or for api.py file using
find . -name api.py
(also from the root directory aka / )
at the shell you can do a search from /
cd /
find . -type d -name life360
(to look for all life360 directories) or for api.py file usingfind . -name api.py
(also from the root directory aka / )
This also didn't work with the standard Home Assistant install on a raspberry pi with HA OS.
There are no folders with such name, probably because it's using a docker install.
How can it be fixed on those?
at the shell you can do a search from /
cd /
find . -type d -name life360
(to look for all life360 directories) or for api.py file usingfind . -name api.py
(also from the root directory aka / )This also didn't work with the standard Home Assistant install on a raspberry pi with HA OS.
There are no folders with such name, probably because it's using a docker install.
How can it be fixed on those?
This is strange, since this is, what I run unless my memory is failing me. I just did the normal pi image for haos it's been about a year ago so maybe some things changed.
Again, I have an RPI 4 setup and do not have the folders mentioned above.
If using HAOS with the standard terminal add-on, you can do the following as per instructions above from @pnbruckner :
docker exec -it homeassistant bash
cd /usr/src/homeassistant/homeassistant/components/life360/
sed -i "s/6.0.0/6.0.1/" manifest.json
Then restart HA. This restored service for me.
Hi, Cant find such a file, can anyone point me to where these files are on github? cant seem to find them
Hi, Cant find such a file, can anyone point me to where these files are on github? cant seem to find them
Here: https://github.com/pnbruckner/life360/tree/master/life360
Hi, Cant find such a file, can anyone point me to where these files are on github? cant seem to find them
https://github.com/pantherale0/life360/blob/a8acbefdd3b75edd6af6e7df81f3a57649ef21af/life360/api.py - here you can download the api.py file.
Thank you sir! Working
On Thu, 21 Dec 2023, 10:50 sanded001, @.***> wrote:
Hi, Cant find such a file, can anyone point me to where these files are on github? cant seem to find them
https://github.com/pantherale0/life360/blob/a8acbefdd3b75edd6af6e7df81f3a57649ef21af/life360/api.py
- here you can download the api.py file.
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/105816#issuecomment-1865882119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOD37K66AT2VICRDKY7XCNLYKPZ7BAVCNFSM6AAAAABAWZL3IKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRVHA4DEMJRHE . You are receiving this because you commented.Message ID: @.***>
For those (of us!) running HA on a RPi using standard HassOS and unable to access the various folders, that's almost certainly because you're using the limited terminal access. There are various solutions to accessing the full OS but probably the easiest is this: https://github.com/hassio-addons/addon-ssh
What else needs to be done except updating life360 version in manifest.json to 6.0.1 as I've done it and restarted HA but still shows problem with password authorisation.
If using HAOS with the standard terminal add-on, you can do the following as per instructions above from @pnbruckner :
docker exec -it homeassistant bash cd /usr/src/homeassistant/homeassistant/components/life360/ sed -i "s/6.0.0/6.0.1/" manifest.json
Then restart HA. This restored service for me.
Thanks, @daernsinstantfortress , this worked perfectly for me.
with the above workaraund it works on RPI5. Since I am in dev branch (due to RPI5) I have installed before the new core update
Core 2024.1.0.dev20231221
in the relese note https://github.com/home-assistant/core/commits/dev is reported bump to 6.0.1... but I have found the manifest with the previous version... and of course it doesn't work.
So I have apllied the WA and it works.
If you have dificulties.. and you have samba addon, go to the folder \yourIP\config\life360, and replace the current file api.py for this one, restrt, and working: https://github.com/pantherale0/life360/blob/a8acbefdd3b75edd6af6e7df81f3a57649ef21af/life360/api.py
😃😃 perfect
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Sans virus.www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
Le jeu. 21 déc. 2023 à 10:28, Marck @.***> a écrit :
If you have dificulties.. and you have samba addon, go to the folder \yourIP\config\life360, and replace the current file api.py for this one, restrt, and working:
https://github.com/pantherale0/life360/blob/a8acbefdd3b75edd6af6e7df81f3a57649ef21af/life360/api.py
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/105816#issuecomment-1865931659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKZUCWEH6XGGX5V7Q4YO7LYKP6KNAVCNFSM6AAAAABAWZL3IKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRVHEZTCNRVHE . You are receiving this because you commented.Message ID: @.***>
I don't understand workaround. Last time i just copeied life360 from github HA repo to config/custom_components. But i think this is not that case. I see manifest.json here.. but i don't see api.py file mentioned above.
What is right instructions for HA-os installation?
What is right instructions for HA-os installation?
Mine / @pnbruckner (see above). This will download an updated version of the life360 library and avoid needing to update individual files. Obviously, this will get overwritten if you update HA, but hopefully by then the fix will be committed properly.
I am little bit confused. I have HA-os and SSH plugin. When i log into i see "core-ssh" prompt and i can use "ha xxx" commands. But there is no docker command as on standard linux. What i am doing wrong?
Side note: installed dev version and life 360 plugin still broken.
If you have dificulties.. and you have samba addon, go to the folder \yourIP\config\life360, and replace the current file api.py for this one, restrt, and working: https://github.com/pantherale0/life360/blob/a8acbefdd3b75edd6af6e7df81f3a57649ef21af/life360/api.py
I'm afraid I cannot see the life360 folder you describe in the config folder, do I need to amend the config of the samba share addon?
Please don't bother to share any more details about your systems on which it no longer works. Please just go to the feature request page and vote.
Updated via the docker and its now calling the V4 API but still erroring on authentication.
2023-12-21 11:08:42.676 DEBUG (MainThread) [life360.api] Error GET(https://api-cloudfront.life360.com/v4/circles), attempt 1: ClientResponseError(RequestInfo(url=URL('https://api-cloudfront.life360.com/v4/circles'),xxxxx 2023-12-21 11:08:42.676 DEBUG (MainThread) [homeassistant.components.life360] CommError: unauthorized 2023-12-21 11:08:42.676 DEBUG (MainThread) [homeassistant.components.life360] Finished fetching life360 (xxx@xxx) data in 0.220 seconds (success: False)
I think my try to install last dev version is good idea. But no. I still see this in log:
[life360.api] Error GET(https://api-cloudfront.life360.com/v3/circles.json)
I think my try to install last dev version is good idea. But no. I still see this in log:
[life360.api] Error GET(https://api-cloudfront.life360.com/v3/circles.json)
If you are still seeing ".json" in the URLs, it hasn't been updated as I removed the extensions on the endpoint URLs
Updated via the docker and its now calling the V4 API but still erroring on authentication.
2023-12-21 11:08:42.676 DEBUG (MainThread) [life360.api] Error GET(https://api-cloudfront.life360.com/v4/circles), attempt 1: ClientResponseError(RequestInfo(url=URL('https://api-cloudfront.life360.com/v4/circles'),xxxxx 2023-12-21 11:08:42.676 DEBUG (MainThread) [homeassistant.components.life360] CommError: unauthorized 2023-12-21 11:08:42.676 DEBUG (MainThread) [homeassistant.components.life360] Finished fetching life360 (xxx@xxx) data in 0.220 seconds (success: False)
Auth itself appears to be passing if you are getting to that point (I believe), did this happen straight away after HA started, or did it appear after some time passed?
Easy question - i have 2024.1.0.dev20231221 - is THIS version fixed or not? I think not. And no WA mentioned above didn't help.
Easy question - i have 2024.1.0.dev20231221 - is THIS version fixed or not? I think not. And no WA mentioned above didn't help.
Depends when that version was built, if it was built before the PR went through early hours this morning (UTC) then no, if the build is more recent after the PR was merged in, then it should be.
Perhaps best to wait either for next version of 2023.12 or until the betas start for 2024.1 if you can't get the workaround above working.
Updated via the docker and its now calling the V4 API but still erroring on authentication.
2023-12-21 11:08:42.676 DEBUG (MainThread) [life360.api] Error GET(https://api-cloudfront.life360.com/v4/circles), attempt 1: ClientResponseError(RequestInfo(url=URL('https://api-cloudfront.life360.com/v4/circles'),xxxxx 2023-12-21 11:08:42.676 DEBUG (MainThread) [homeassistant.components.life360] CommError: unauthorized 2023-12-21 11:08:42.676 DEBUG (MainThread) [homeassistant.components.life360] Finished fetching life360 (xxx@xxx) data in 0.220 seconds (success: False)
Auth itself appears to be passing if you are getting to that point (I believe), did this happen straight away after HA started, or did it appear after some time passed?
Its looping this over and over even after stable. I have manually tried reloading it 5 mins + after restart
I uninstalled life360, because I thought I was logging in wrong, now how can I install it again and then change the api.py
Updated via the docker and its now calling the V4 API but still erroring on authentication.
2023-12-21 11:08:42.676 DEBUG (MainThread) [life360.api] Error GET(https://api-cloudfront.life360.com/v4/circles), attempt 1: ClientResponseError(RequestInfo(url=URL('https://api-cloudfront.life360.com/v4/circles'),xxxxx 2023-12-21 11:08:42.676 DEBUG (MainThread) [homeassistant.components.life360] CommError: unauthorized 2023-12-21 11:08:42.676 DEBUG (MainThread) [homeassistant.components.life360] Finished fetching life360 (xxx@xxx) data in 0.220 seconds (success: False)
Auth itself appears to be passing if you are getting to that point (I believe), did this happen straight away after HA started, or did it appear after some time passed?
2023-12-21 11:46:01.865 DEBUG (MainThread) [life360.api] Error GET(https://api-cloudfront.life360.com/v4/circles), attempt 1: ClientResponseError(RequestInfo(url=URL('https://api-cloudfront.life360.com/v4/circles'), method='GET', headers=<CIMultiDictProxy('Host': 'api-cloudfront.life360.com', 'user-agent': 'com.life360.android.safetymapd/KOKO/23.49.0 android/13', 'Accept': 'application/json', 'cache-control': 'no-cache', 'Authorization': 'Bearer REDACTED', 'Accept-Encoding': 'gzip, deflate, br', 'Cookie': 'xxxx')>, real_url=URL('https://api-cloudfront.life360.com/v4/circles')), (), status=401, message='Unauthorized', headers=<CIMultiDictProxy('Date': 'Thu, 21 Dec 2023 11:46:01 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Access-Control-Allow-Origin': 'https://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': 'xxxx', 'CF-Cache-Status': 'DYNAMIC', 'Server': 'cloudflare', 'CF-RAY': 'xxxxx', 'alt-svc': 'h3=":443"; ma=86400')>)
Seems to be unauthorised still
Do you have 2FA enabled on your account?
For me, the issue was that I could login the portal with my phone number, but not my email. It was due to the code change and too many logins (locked out). So no matter what api.py file you copy where, it will never work.
I logged in to the portal and changed my password. Even though my old password was working. I then re-verified, by logging in with my email and new password this time.
Then, added the home assistant integration using your email and new password. Worked without any issues. May help others.
Little note for other lost people here: when you try "docker command workaround" use Advanced SSH & Web Terminal with protection mode turned off NOT Terminal & SSH.
I confirm, repeat, i confirm "docker workaround" works fine! Don't repeat my mistakes:
I've just been sitting here messing around with logins on my account.
@Mark612 appears correct, Life360 appears to lock the account out after a number of failures (or in my case as soon as the phone number was verified, it prevented login via email/password). Doing so it doesn't allow you to login to the app at all and requires you to go the text based OTP route to login.
{
"errorMessage": "Invalid login and password. Please try again",
"url": "\/v3\/oauth2\/token",
"status": 403
}
If you are still seeing authentication failures against the URL https://api-cloudfront.life360.com/v3/oauth2/token
then try resetting the password.
Why is this closed? The issue is very much unresolved with the HA integration.
@Siress Issues on github reflect the state of the dev branch. This has been solved on dev and will be released the next release.
I'm still getting: ClientResponseError: 403, message='Forbidden' url=URL('https://api-cloudfront.life360.com/v3/circles.json')
@sebastian-bugajny then it appears you have not applied a workaround successfully. That is the old URL for retrieving circles.
So is there a way to update the account details rather than remove and readd the integration. ideally do not want to loose all the entities.
Hi, Cant find such a file, can anyone point me to where these files are on github? cant seem to find them
https://github.com/pantherale0/life360/blob/a8acbefdd3b75edd6af6e7df81f3a57649ef21af/life360/api.py - here you can download the api.py file.
This worked for me, thanks!
@sebastian-bugajny then it appears you have not applied a workaround successfully. That is the old URL for retrieving circles.
yeah just applied updated api.py from
https://github.com/pantherale0/life360/blob/a8acbefdd3b75edd6af6e7df81f3a57649ef21af/life360/api.py
and started working
New api work for me! Tahnk you!
As i deleted completely the legacy Life360 integration, now i installed through HACS the @pnbruckner HA-Life360 custom integration, restarted HA and i get again Life360 working. I cannot see the life360 folder in /config, why? And more the custom integration i setup has already the correct api.py? EDIT: with this custom integration, looking inside /config/custom_components/life360/ i don't see any api.py file.. In have the doubt i installed the wrong integration. Can someone confirm this?
@behold81
So is there a way to update the account details rather than remove and readd the integration. ideally do not want to loose all the entities.
If you just mean the password, that is what the automatic reauthentication allows you to do.
If you mean the username, no, not really, unless you are comfortable with editing files in the config/.storage folder. If you look in there, you'll see core.config_entries, and that will have an entry for life360. I won't say more than that, because that's not really a supported way of changing things, and if you don't know what you're doing, you could get yourself into trouble.
Still, if you delete and re-add the integration, the entities should come back, although any customizing you did via the entity registry will be gone and would have to be redone.
@mfabiani53, I updated the ha-life360 custom integration yesterday to use the new version of the life360 package (6.0.1) with the fix, so yes, that should now be working.
The built-in life360 integration has been updated as well, and should be in the 2023.12.4 release, hopefully coming out soon.
I cannot see the life360 folder in /config, why?
There is no such folder, unless you create one. Doing so was part of one of the workarounds that has been suggested. Since you now have the custom version of the integration working, you can ignore that part.
And more the custom integration i setup has already the correct api.py?
That api.py file is not part of the HA integration, it is part of a pypi.org package that the HA integration uses to talk to the Life360 server. The ha-life360 custom integration "points to" (via manifest.json) the updated version of that package, which the built-in integration will do as well soon.
EDIT: with this custom integration, looking inside /config/custom_components/life360/ i don't see any api.py file.. In have the doubt i installed the wrong integration. Can someone confirm this?
Again, api.py is not part of the HA integration, so it is not surprising you don't see it in that folder.
The built-in life360 integration has been updated as well, and should be in the 2023.12.4 release, hopefully coming out soon.
So, when the update of HA will be released i must delete this custom integration and use the built-in one?
The problem
I'm having the same issue that happened on older versions of HA. I input the correct username and password (i double checked by login in to life360.com), and i get:
Invalid authentication
. I tried changing the password for the account, and still had no luck. And I'm on the latest version of HA.What version of Home Assistant Core has the issue?
core-2023.12.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
Life360
Link to integration documentation on our website
https://www.home-assistant.io/integrations/life360/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
I'm unable to post the log, because I can't even configure the integration.