Closed GLazzari1428 closed 9 months ago
@pnbruckner - it looks like the auth might have changed?
I haven't used life360 for at least 5 years, but it appears that the client IDs are different in the most recent version of the mobile app (compared to whats in https://github.com/pnbruckner/life360/blob/master/life360/api.py if this is the module in use).
I have managed to successfully authenticate using phone number / password auth outside of the Life360 app.
{
"access_token": "REDACTED",
"token_type": "Bearer",
"onboarding": 0,
"user": {
"id": "a1d5bd1f-91b6-46c9-a8b9-52d2ecf421f3",
"firstName": "Jordan",
"lastName": "",
"loginEmail": null,
"loginPhone": "REDACTED",
"avatar": null,
"locale": "en_GB",
"language": "en",
"created": "2016-04-24 12:05:13",
"dob": "",
"avatarAuthor": null,
"settings": {
"map": {
"police": "1",
"fire": "1",
"hospital": "1",
"sexOffenders": "0",
"crime": "1",
"crimeDuration": "a",
"family": "1",
"advisor": "1",
"placeRadius": "1",
"memberRadius": "1"
},
"alerts": {
"crime": "0",
"sound": "1"
},
"zendrive": null,
"locale": "en_GB",
"unitOfMeasure": "i",
"dateFormat": "dmy24",
"timeZone": "Europe\/London"
},
"communications": [
{
"channel": "Voice",
"value": "REDACTED",
"type": "Home"
}
],
"cobranding": []
},
"cobranding": [],
"promotions": [],
"state": null,
"multi_device": true
}
same problem .. have you another way to replace life 360
OwnTracks, don't expect the same polished UI... But it integrates directly to your HA, no cloud, no third parties. You need to play with the settings to do just you want.
Indeed I guess remote access is needed (cloud or VPN) right? In this case what's is the difference from using the companion app?
@pantherale0
but it appears that the client IDs are different in the most recent version of the mobile app (compared to whats in https://github.com/pnbruckner/life360/blob/master/life360/api.py if this is the module in use).
Yes, that's the package. Care to share the new Client IDs and how you determined what they are now?
Indeed I guess remote access is needed (cloud or VPN) right? In this case what's is the difference from using the companion app?
If you don't want to expose controls, owntracks is a good option. But if you use HA on your mobile already, there's no reason to run owntracks on top of it if you just want location.
Yes, that's the package. Care to share the new Client IDs and how you determined what they are now?
Sure, header with updated client ID to authenticate to the v3/oauth2/token
endpoint.
Authorize: Basic Y2F0aGFwYWNyQVBoZUtVc3RlOGV2ZXZldnVjSGFmZVRydVl1ZnJhYzpkOEM5ZVlVdkE2dUZ1YnJ1SmVnZXRyZVZ1dFJlQ1JVWQ==
To retrieve this, you need a rooted android device, the mobile app itself, mitmproxy and the tools in this guide https://httptoolkit.com/blog/frida-certificate-pinning/
Once you've got all of that, configure android to point to mitmproxy running on your computer (might also need to install the CA certificate too) and you should see all the HTTP requests in the console on your computer:
for this issue, I knew it was because of the client ID as I've seen this error at least once above, so was just a matter of finding and tracing the OAuth flow.
I'll create a PR to that repo :+1:
This is the exact same oauth2 token which is already used by the integration right now.
I have tried using the phone number to authenticate I still have the same error.
Interesting that people report that the Homey integration is still working.
I think this is the relevant code. I'm no expert but it appears to use a different base_url for the requests if that helps?
https://github.com/rkuzsma/life360-hack/blob/master/index.js
This is the exact same oauth2 token which is already used by the integration right now.
Yeah, I just realised that looking over it again... anyway, I did replicate the issue with an invalid user-agent so updating the user agent seems to allow it to work.. I've opened a PR for that.
I have cancelled my Life360 membership and sent a strongly written email to the company requesting that they build an official integration. Will probably be ignored, but I’m voting with my wallet!
I also about to cancel my Life360, also left a review in the app store. I think the reviews in the app store might help to get their attention.
same problem .. have you another way to replace life 360
OwnTracks, don't expect the same polished UI... But it integrates directly to your HA, no cloud, no third parties. You need to play with the settings to do just you want. https://www.home-assistant.io/integrations/owntracks
Indeed I guess remote access is needed (cloud or VPN) right? In this case what's is the difference from using the companion app?
You see your "friends" in the App...
This is the exact same oauth2 token which is already used by the integration right now.
Yeah, I just realised that looking over it again... anyway, I did replicate the issue with an invalid user-agent so updating the user agent seems to allow it to work.. I've opened a PR for that.
great thank you!!!, where is that file found in docker install please? so i can update for now rather than wait for a release?
Little bit off topic, but.. What is alternative? I need track whole family so HA mobile app is not solution.
This is BIG problem for me, because i have lot of "location" atomations. My smart home is totally paralysed.
@pantherale0
I did replicate the issue with an invalid user-agent so updating the user agent seems to allow it to work.. I've opened a PR for that.
I just tried the new user agent on my system, but it still fails.
Let me test with a username instead, this works with a phone number so perhaps it needs to be overhauled to use the phone number instead.
@pnbruckner are you on discord? I'll send you a message if thats ok? Only so much I can test myself to be honest.
@pantherale0 yes, I have a discord account (same name.) I'm not on it right now, but will check later. Thanks for the help!
And, FWIW, someone posted a link to some js implementation. I'm not familiar with that language, but it did have a different client token. I tried that, but no joy.
Looks like both implementation options on Hubitat as down as well. So most likely a global API change.
+1
Following, same issue started happening today
If they go the MyQ route, this sucks, because their really isn't an equal alternative in terms of quality. I don't understand why these services don't have public-facing APIs that charge subscription fees.
Voted for the API release. Hopefully it will work again soon. Will certainly continue to support Life360 as family, neighbors and all our friends and contacts if they can fix this.
If not, will encourage them all to discontinue their service.
Same here, from today
HA mobile app is not solution.
Why? I have been running both L360 and HA Mobile on all our devices side by side by nearly a year. HA mobile works great.
HA mobile app is not solution.
Why? I have been running both L360 and HA Mobile on all our devices side by side by nearly a year. HA mobile works great.
While not the person you're asking, I can respond with my use case. My wife and I both use HA companion app (in addition to Life 360).
However we have other family members that don't live here (adult children) that have life 360 installed, and we'd still like to interact with when they do come to the house. It's not practical to have everybody who visits, even for extended periods of time, to install HA. But we'd still like to be able to (programmatically) know when they are here.
I can see a similar use case for those with younger children - they might not want the full HA app installed, but still want to keep tabs on them.
HA mobile app is not solution.
Why? I have been running both L360 and HA Mobile on all our devices side by side by nearly a year. HA mobile works great.
I can only speak for myself, but I use Life 360 to integrate people who do not live in this house / need an HA account (My parents, my wife's father). This allows automations to work for them without having to have them install another app, and create accounts.
HA mobile app is not solution.
Why? I have been running both L360 and HA Mobile on all our devices side by side by nearly a year. HA mobile works great.
I can only speak for myself, but I use Life 360 to integrate people who do not live in this house / need an HA account (My parents, my wife's father). This allows automations to work for them without having to have them install another app, and create accounts.
Exactly this. Well put.
This is the exact same oauth2 token which is already used by the integration right now.
Yeah, I just realised that looking over it again... anyway, I did replicate the issue with an invalid user-agent so updating the user agent seems to allow it to work.. I've opened a PR for that.
great thank you!!!, where is that file found in docker install please? so i can update for now rather than wait for a release?
How long until we would see this appear in the release? I have not gone to 12 yet since my upgrade failed when I attempted to update.
Someone use OwnTracks ? I see this : https://youtu.be/HK3RC0ppIuU?si=CR6iVSwKTfhdWDq2
Yeah, I just realised that looking over it again... anyway, I did replicate the issue with an invalid user-agent so updating the user agent seems to allow it to work.. I've opened a PR for that.
great thank you!!!, where is that file found in docker install please? so i can update for now rather than wait for a release?
How long until we would see this appear in the release? I have not gone to 12 yet since my upgrade failed when I attempted to update.
I've started a chat with @pnbruckner - there seems to be some other changes to the API (slightly different endpoints, and different API versions used), we've gotten past the auth issue, but it fails collecting places defined within circles. This is probably because the Life360 API is quite messy though.
great thank you!!!, where is that file found in docker install please? so i can update for now rather than wait for a release?
@marc-gist should be: /usr/local/lib/python3.11/site-packages/life360/api.py
you don't need to modify the original source folder of Life360. you just need to add the new github folder to your config/life360 folder!
with this solution, it is the folder present in config which takes priority over the original folder. ;)
Yes, that can work, but anyone that does that has to eventually remember to remove it once a fix is released.
Don't we need to bump the pip package to 6.0.1 to actually fix it in HA?
Yeah, my PR referenced this one so GitHub automatically linked and closed it when it was merged in (helpfully, or not lol)
When the fix will be released?
Yeah, my PR referenced this one so GitHub automatically linked and closed it when it was merged in (helpfully, or not lol)
Gotcha. Github trying to be smart but actually being dumb :)
I'm not sure who to thank for all this, but whoever contributed to getting it fixed so quickly, Thanks! Fantastic job!
Temporary fix works for me!
Temporary workaround:
cd /usr/src/homeassistant/homeassistant/components/life360/
sed -i "s/6.0.0/6.0.1/" manifest.json
Then restart HA.
@pnbruckner that temporary fix worked for me, thanks!
As previously noted, this issue should not have been closed. Still need to submit a PR to HA core to bump the package version.
Thanks go to @pantherale0 & @dcmeglio !
Can someone note the exact workaround?
I don't have this folder: /usr/local/lib/python3.11 I also don't see a /usr/src/homeassistant
If it helps, I'm running Home Assistant on a Raspberry Pi 4.
Hopefully the fix will be in the 2023.12.4 release. 🤞
Temporary workaround:
cd /usr/src/homeassistant/homeassistant/components/life360/ sed -i "s/6.0.0/6.0.1/" manifest.json
Then restart HA.
Thank you so much! Until the full release this will do! This is why I love the open-source community so much.
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.
Temporary workaround:
cd /usr/src/homeassistant/homeassistant/components/life360/ sed -i "s/6.0.0/6.0.1/" manifest.json
Then restart HA.
I am running in Docker. I went inside the docker and did this, it did . This did not seem to work after restart.
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.
@faspina how did you restart HA? I think if you bring the container down and then back up, the edit will be gone. Either "docker compose restart", or restart from the HA UI.
I restart the docker with a shell command to ha-dockermon. You are probably right, that is the only thing that make sense
I ended up putting the life360 package in the config, now its working.
On Wed, Dec 20, 2023 at 9:45 PM Phil Bruckner @.***> wrote:
@faspina https://github.com/faspina how did you restart HA? I think if you bring the container down and then back up, the edit will be gone. Either "docker compose restart", or restart from the HA UI.
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/105816#issuecomment-1865433643, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEJDF3GBU3VR2HKLQQKQHGLYKOWGBAVCNFSM6AAAAABAWZL3IKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRVGQZTGNRUGM . You are receiving this because you were mentioned.Message ID: @.***>
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.