[RELEASE] Life360+ (BROKEN)

Don't get it. Do we need a new release from your end or can we change settings? Just installed latest rev today.

Sorry you lost me now.

long story short - 3.0.17 broke logic I added. If you have 'auto refresh' selected (which is the default) it's going to poll Life360 servers every 5 minutes. Meaning you're not going to get location updates for 5 minutes when it used to be 30 seconds. The original Life 360 with states driver was also 30 seconds so that's not just a value I made up either.

There's already an option to control the refresh rate so if you don't care about getting updates that frequently you can change it to 1 min, 10 mins, etc.

This doesn't affect the updated API which was already fixed with 3.0.16

3 Likes

Is this already fixed in 3.0.18?

So maybe I am just not getting it this morning, but I don't see Life360+ in the Apps list after install.

Removed and installed a couple times and rebooted hub.

NVM, found the right search terms to find the answer above #176

Hi, still cannot login, I havent removed and reinstalled, is that the only way to solve this?

Can Life360+ be installed if you have "HE Life360 Connector" allready installed?

Someone mentioned a while back that both apps register a callback 'webhook' which gets called when a device enters/exists a circle (region). So, in that sense - only 1 Life360 hubitat app should be used.

That said, I don't see any issue running both as Life360+ primarily relies on polling the Life360 server every X seconds. It'll also handle these webhook events too but at least in my testing polling is the primary source of updates.

There used to be code included where one of the first things the life360 hubitat app did was cancel any webhook pushes from the life360 servers.

I believe if you install a second instance the first will quit getting its push updates. Only the newest setup version will get the pushes.

A few things:

  • I think there is only 1 web hook allowed per circle. (and a circle only has a single home/location)

  • there are some issues in life360+ in regards to managing / updating the circle (a problem of both too little and too much). I fixed that in the updates I sent in which have been rejected.

  • The current life360+ is pretty intense trying to do 10 second polls (where the network timeout could be 10 or more seconds). In short I expect the more folks use life360+ in current form, the more likely it will be that life360 eventually takes action to stop it.

  • Similar to above is a set of scheduling issues and oscillations on HE systems calls and pretty high db load due to this.

If folks want my fixes, send a note and I will share them privately.

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?