[RELEASE] Life360+ (BROKEN)

1/29/24 : Life360 authentication has changed and as of today this app is broken. I'll keep an eye on the state of similar integrations like Home Assistant and if anything changes I'll try to get it fixed


This app is a continuation of the Life360 with States driver which isn't being maintained anymore.

Installing

I submitted Life360+ to the Hubitat Package Manager (HPM) so I'd recommend anyone who wants it to look for it there.

What is Life360 and why use it?

Similar to the built-in Life360 app but exposes a lot more information provided by Life360.

My household has 2 kids with phones and my wife and I want to be able to monitor where they are. There's several other similar apps that offer device tracking, but for us Life360 was the easiest one to install and setup as well as the most reliable. It's also free.. hard to beat all that.

There's already a large thread describing what the "Life360 with States driver" does so I'm going to try and focus more on what I did and why.

What Changed

  • My primary goal was to stop the app from sending updates every 30 seconds. It's not something a normal end-user would notice but my dashboard app receives push updates and I didn't like seeing the same 'location' being received over and over.
  • Secondly, I wanted to add some additional fields which Life360 has but the app wasn't exposing.
  • Lastly, I tried to clean-up the code as much as I could.. that included removing some fields that didn't seem intuitive or renaming others to be a little more 'standard'.

Here's a more detailed list:

  • only send out updates if location or battery changes
  • added accuracy
  • added phone and email of the user (if available)
  • I renamed speedMiles and speedKm to just speed which will be set to the unit of your choice
  • added an option to generate HTML attributes (default:off)
    • I didn't need these in my app as I'm going to display locations on a map
    • Also note if you do use this I renamed the field from bpt-statusTile to simply html to be somewhat consistent with other HTML fields I've seen
  • I removed the "Temperature" capability which didn't make sense to me

Why Update?

For starters, if you're using the previous Life360 with States and you're happy -- I don't want to push you to update. I really tried to not to break support for other dashboards so just about everything is still here -- but it might require you to tweak a few things.

The only major advantage of this driver might just be not having the app send out updates of a lot of fields every 30 seconds.. I don't know if this really adds much overhead to your hub or not but for someone who looks at the logs once and a while I think it's worth it for that alone.

But.. if you're so inclined - here's what I'm going to do with this new driver.

I already support the current Life360 with states driver in my Android dashboard app, HD+.
image

  • I'm going to use that new accuracy field to draw a radius around the user - similar to how the Life360 app displays users
  • I'll use the new phone and email fields to offer a quick way to send a message to a family member from this screen too
  • I'd like to display the little 'driving' icon on the user as well when in motion
  • I also plan to save some 'history' of previous locations so I can display some kind of 'route'
24 Likes

Update: The app is available now on HPM! Let me know if any issues!

5 Likes

I was not using Life360 with States previously because of the frequent refresh interval so I'm jumping on board with your version now.

I've installed in HPM, signed in and new devices were installed. I've exposed them in Maker instance. The devices appear on my dashboard but as generic sensors. I don't see Life360 as a device type to change them to. Did I miss something?

Update: All good after updating to .1991

I am still unable to find it in HPM.
I searched for Life360+ but it came back with no results

I found by using Browse by Tags and selecting "presense & location". It was 8th on the list.

1 Like

HPM takes a few to pick up new packages using the search. Using the "tags" option forces HPM to go pull the app lists from GitHub where the search relies on some caching that it does periodically (something like every 15 minutes if I recall correctly).

2 Likes

Okay. Found it and installed it.
I am currently home, and the device indicates that I am Present.
However, the icon on HD+ still indicates that I am not present.

Not sure how to troubleshoot this.

Also, how do I get the map icon for the Dashboard?

I had to update HD+ to detect the new Life360+ app. I submitted the update yesterday and Google is usually pretty fast to push them but in this case they've still reviewing it.. probably because I have some Android Auto changes in it which they want to be extra careful.

1 Like

I bet we need .1991 update.

1 Like

I believe so. I guess we just wait.
I keep checking Google Update...

I replaced the Life360 w/states with the new driver but I don't get any states and the Refresh has a log entry:
dev:20722023-05-10 10:12:16.407errorjava.lang.NullPointerException: Cannot invoke method refresh() on null object on line 153 (method updated)
I get this if I enter my credentials again:
app:15662023-05-10 10:19:56.201errorLife360 initializeLife360Connection, error: groovyx.net.http.HttpResponseException: status code: 403, reason phrase: Forbidden
I changed my password and still the same thing.

Ideas?

Hi @jpage4500 ,
Found the app in HPM and installed - worked fine.
The app created 5 devices, one for each Life360 member - OK
The log in getting an update every 30 seconds even when the data is not changed (enable logging is ON- is this expected?

Summary

Edit - I do see now that the Events in the device page are only updated upon change in any of the attributes.

hmm.. good question. I didn't do much to the 'app' driver but it's possible I removed something that broke it. I did re-install the app yesterday and it worked FWIW.

I do see 1 area in the app code that might be an issue so I just changed it.. I think it had to do with using an existing device instead of letting the app create the child devices for you.

Yep, that's right. The app still works the same way as before with 2 ways to get updates:

  1. poll Life360 every 30 seconds
  2. a 'push' from Life360 when someone enters or exists one of your monitored places

if logging is disabled you shouldn't see anything though when nothing has changed from the previous state (location+battery)

2 Likes

I removed and reinstalled app/driver package and same thing. Must be a me thing with the process.
You mention child but I see none. App created no child devices. App info also says - No Child Devices
Install the app via HPM.
Run the app and put in my name and password - hit Next
I get a blank screen with Remove or Done - I hit Done
I looked in the Devices page to see if a device under my User Name was created; didn't see anything so I created a new Virtual Device and used your driver.
The new device shows what I expect but no state data.
What part the of process an I doing consistently :wink: wrong?

I get the same error in the logs:
dev:20732023-05-10 15:25:24.276errorjava.lang.NullPointerException: Cannot invoke method refresh() on null object on line 153 (method updated)
app:15672023-05-10 15:33:55.462errorLife360 initializeLife360Connection, error: groovyx.net.http.HttpResponseException: status code: 403, reason phrase: Forbidden

I just removed and re-installed everything and it worked again.. screenshots below:

After that, hit DONE and the app created 2 devices for the users I selected


app:15672023-05-10 15:33:55.462errorLife360 initializeLife360Connection, error: groovyx.net.http.HttpResponseException: status code: 403, reason phrase: Forbidden

The only thing I can think of is maybe OAUTH isn't enabled for this app. I'm not sure how that works with HPM -- I was hoping it was automatic though. In the past, you had to enable it under Apps section. I didn't do anything but it's "enabled" in this screenshot

Did it again but I don't get the 3 following screens, no Circle, Home or User.
Just the empty screen with Done after my name and password.
Does it do some sort of validation after the first screen? I can log into Life360 just fine.
Hmmmm
Just tried to go back to Life360 with States and I can't get that app to work now, same empty screens after the inital login. WTF.
Been using it for years.

I get Login failed from the built-in Life360 Connector so I dunno. Will have to delete my account and retry that way. Strange it works fine on my cell phone.

Nope, recreating my account won't let me add the app either.
Going to restore my last backup and see if my old Life360 comes back.

PS Tried Enabling Oauth in the App code but that didn;t help. BPTWorld ver didn't have it enabled

Do you have a lovation set in the life 360 app?

Its been awhile but if you back through the old thread i think this has come up before.

Cant quite recall what the resolution is.

I have a Home location set which is where it says I am now.

I tried to restore 2 backups and both kept the CPU at 90%+
I had to soft reset and restore a backup to get back to normal.
After the soft reset my previous Life360 with States now crashes. I deleted the app and tried the built-in Connector and Life360+; everything fails to login to Life360 now.
I'll check the Community for any hints.

OMG!!!!
It's not my frigin registered name it's my phone number with +1
Now it wants a Place but I have to figure out where that is as there is nothing in the dropdown box.
I have a Place in the Android app called Home. I tried the Export Places button but it says No Places.
Created a Place called Work but still no entries.

@jpage4500 I see you had this same problem. Tried Life360 with States and my email but still no Places. You mention I needed to login to the website but I can't see anywhere to add or modfiy the account.

Did I get it right. If I install this driver it won't affect life360 drivers that I'm at the moment using. So it creates just another life360 devices to play with and test how it works?