[RELEASE] Life360+ (BROKEN)

I got a PR out of the blue with pretty much no explanation of why or what changed with the only description being: Many updates, cleanups. Happy to discuss. I did a quick check to make sure nothing broke and merged them in.. I actually thought the PR was coming from someone at Hubitat who had DM'd me the day before about wanting to integrate this app into the core Hubitat codebase.

I did have some questions about the code and probably should have done a deeper dive but was too busy with other things and there were so many reformatting changes it was hard to review. Later in the day I realized the PR changed how often the device polls the Life360 servers in a pretty drastic way. Notably by default it'll poll for changes every 5 minutes.

From the beginning, I've tried pretty hard to keep the original "Life360 with States" driver in line with how it originally worked and not break anything - including supporting other dashboards, not just the dashboard that I wrote/use.

The initial driver polled every 30 seconds. After doing lots of testing (mostly watching the logs while my kids were out and about), I added logic to try and speed up the polling when the devices were on the move. When no movement is detected, the polling will slow back down again to 30 seconds. Like I mentioned above I didn't want to do anything that would break how existing users used the Life360 driver, so I added an option to select how often you want the driver to poll Life360's servers. I explained the changes in a post with the option to select "30 seconds" so things worked exactly as before.

So, to have someone modify my logic to 5 minutes without any kind of explanation or reasoning seemed pretty crappy to me. Just add an option for "5 minutes" and select that - problem solved.

There's a few things in the PR that made sense to me. I'm open to adding these in. There's also plenty I'm not a fan of but that's just my KISS coding style (I'm not a groovy developer but have been writing mobile apps for 20+ years so I have a pretty good idea of what looks good/clean and what doesn't).

Long story short -- this app has been running great for me since I updated it. I'm able to watch my dashboard as my kids move about. Updates aren't as frequent as the native Life360 app but not terrible either. Certainly a 5 minute interval wouldn't work for this purpose.

And yes it is possible the Life360 will change it's server to block access to everything except it's own app. The more users use it, the more they're likely to pay attention. If you're at all concerned, you can change the polling rate in the driver. But, Hubitat isn't the only one using the same logic (home assistant and it's naive to think Life360 doesn't know about it either. Maybe they're considering offering a real API and charging for it? Maybe they're afraid shutting off access will alienate paying Life360 users who can switch to something else? I don't know..

But, in the meantime I'm happy to help others get it running as well as get feedback on what can be improved and try and improve it. I didn't take over this app to dictate how it works but at the same time don't want to be dictated what to do either.

hd-life360-animation

4 Likes

I have no problem with your decisions.

Was just trying to help Bobby out in regards to the built-in app that is broke, I think he was thinking to include the user installed one, so I took a look....

I'm not asking you to do or change anything, I offered you changes and you declined. I understand.

Unfortunately it does nothing to combine the user & built in and resolve the issues that many have at this point with all the uncertainty. I see a lot of issues with the current one, and broader use of it will only push these issues more to the forefront.

I have cleaned up quite a few HE apps, some have gone on the built-in others have not...

1 Like

I've been meaning to capture a video of the Life360+ driver and the dashboard app HD+ working together and wanted to use it yesterday instead of that crappy .gif.

I captured a video of my daughter coming home from XC practice -- I switch between HD+ and the Life360 app to show the differences. Like I said earlier the Life360 app always going to be better, but this isn't terrible either.

FWIW - one of the main reasons I've done all of this is because the Life360 app requires constant location permission which is a little annoying. Even if I disable location sharing in Life360 it still won't work without the 'background' location permissions. I'm interested in using the service for tracking my kids -- not having Life360 track me.. anyway, that's why I've tried to create a similar experience and why it's important to get device updates on a regular basis.

2 Likes

FWIW I believe it allows multiple because I had the stock app installed and removed it because it broke and then I installed this app. I get constant warn logs for the old app where Life360 is still trying to update the old webhook:
Received cloud request for App 425 that does not exist, path: /webhook

I have used DanTs app (modified with new endpoints) and also used PostMan to even make same delete API calls but warn messages still happen. Even reached out to Life360 support and they won’t help at all.

Long winded answer to say that they do appear to support multiple webhooks given the current Life360+ install works and old removed app still getting updates.

2 Likes

Has anyone seen these warnings in their log?

that log entry doesn't exist in the app or driver. Assuming you're running the latest version of the app I can only guess it's coming from the sendEvent() method when length > 1024

    sendEvent( name: "savedPlaces", value: savedPlacesJson.toString() )

savedPlaces is is JSON list (ie: "{lat,lng,name}") of every circle you have setup in Life360. So, I can see that string being > 1024

It's probably only used too by my dashboard, HD+, to display all of the Life360 circles. I can update the app to just reduce the list to < 1024 so that warning isn't generated

1 Like

@jpage4500
thankyou for Life360+

I just ditched Life360 Connector app. It was giving me issues with presence on Android and IOS. I couldn't troubleshoot it further. This started happening since the C8 Firmware update (yesterday) where presence status wouldn't update.

After much back and forth this morning, I installed Life360+ and everything is working again....in regards to Presence detection for my android. I'm just waiting for the IOS to return home from work at the end of the day, but I suspect that the IOS will be working again too.

Thanks !

I've found that the Life360 events are pretty reliable (for me anyways!) Couple of notes if others are seeing non-optimal performance:

  1. Life360 ONLY sends a push event to HE when a member arrives or leaves a saved location. You need to specify at least your home for this and the HE version to work. If you have more saved locations, you will get push events for each of those. I find that super handy for special automations.
  2. If a user's phone goes dead say away from home, and then they come home and charge it, you WILL NOT get a push event for that. If you see that a user is "away" but is clearly "home", that would be the reason. The life360+ does poll your circle to get updates, so this app will address that nuance if you have the automatic refresh enabled.
  3. If a user's phone is in battery saver mode, the updates are very laggy. No way to fix, since that is a user phone issue, not a life360 issue.
2 Likes

Thanks for all of this info! Do you know if the push events will work for more than 2 locations if you're on the 'free' plan?

Struggling with that right now. All the documentation notifications for only 2-locations. Now, I can load up my free plan with 8 locations, but I did get a message to upgrade when I enabled the location notifications for more than 2-locations in the app. I turn them off in the app, since I want it through HE not life360.

Up to a couple days ago, I was getting push notifications for 8-locations, on the free plan. Now I'm getting zero pushes regardless of how many locations are in the app. Now, in fairness, I did get a pop-up a while ago about "you have been upgraded to gold for free", which I never thought anything about. But everything in the app points to the free version not gold, so maybe that was a temporary deal.

When I check the app settings for my circle, it's showing I have no locations updates left. Not sure if I "broke" the free plan or what. Do others have a number in the locationsUpdatesLeft field?

features={premium=0, skuTier=null, locationUpdatesLeft=0, priceYear=0, ownerId=null, priceMonth=0, skuId=null}, unreadNotifications=0, color=7f26c2, unreadMessages=0, memberCount=4, name=Family, id=<>, type=basic}

I wonder if the webhook needs to be re-registered from time to time in order to continue to work.. I believe the driver only registers it once and never again.

I did a lot of testing a few months back but all of my testing relied on polling. Of course, getting the push events will be more efficient/timely if they're working reliably.

I'll try to spend some more time looking at this -- maybe add a few more locations (I only have 3 or 4 now and am on the free plan)

1 Like

No sure. I did make up another life360 test account, and it reports the same features as above. I'll play with it a bit more to see what is up.

You are talking about push event in Life360 app which is limited for two places on free version.
That's why you can save as many places you want to and use webcore or rule engine to trigger push notifications from HE.

Yes, that appears to be the case. If you have the free version, it appears you can save as many as you want, put you can only toggle the arrive/leave bell in the app for 2.

I was successfully getting HE push updates for 8-locations up to a couple days ago. Not sure what happened, how I get no push updates to HE from the internal Life360 Connector or Life360+. I can drop the webhook URL into a browser and that triggers HE, but nothing is coming from Life360 cloud. Digging into that one!

Question for others, when you log into your life360 Mobile App, what does the "Membership" options look like (bottom right button)? About 2-days I lost my push notifications to HE. Just checked the app updates, and there was a Google Play Store update for Life360 on Sept. 19. When you look at the change log, it no longer lists a "free" plan, only "silver", "gold" and "platinum". The paid "silver" option 100% overlaps with the previous "free" version. Their website still lists "free" and not "silver" though. Wondering if this an end to the "free" era?

Plans from the Google Play changelog:


Plans from the life360 website:

I did notice the webhook wasn't being called yesterday while we were out and about. I tried re-registering the webook again and will check the logs to see if it's called today. If so, I can have the app re-register every once and a while -- but first just want to see it work at all

Thanks, just wondering what is going on. I tried the free upgrade to gold, but not getting any webhooks either.

My silver membership includes 5 place alerts. Stated within the app.

2 Likes

Anybody experiencing new errors as of a couple hours ago?