[RELEASE] Life360+ (BROKEN)

Just my opinion ... but some other suggestions for the driver:

Change all toFloat() to toDouble(). I have no idea if this effects any resource load? It may increase accuracy of location, speed and distance calculations.

Change:
def speedMetric = (speed == -1) ? new Double (0) : speed.toDouble().round(2)
to:
def speedMetric = (speed == -1) ? new Double (0) : speed.toDouble()

Again ... rounding your meters per second to two decimals before it is used in the down stream calculations reduces your accuracy.

Thanks for your efforts on this app/driver!

1 Like

Is there a way to turn off debug for each user. I'm getting debug reports in the log:

enable logging is off for each person:
image

Life360+ App:
image

Hi

Thanks for updating the app. Wanted to find out how to select Km as mine is showing miles and I want Km.

Thank you

Thanks for taking over maintenance of this app. The Life360 Tracker app relies on the original app. Not sure if switching to this version will impact that app, or if you have any interest in maintaining that app too?

Sure, I can try. I just used the logic that was there originally but I'll give that a shot

Sure, I can only log if debug is enabled

There's a setting in the device page. Maybe it would have made more sense to have in the app page but that's how it was done

1 Like

Sure, I can look into it - guessing it wouldn't take much to tweak (if even necessary) since not much has changed.

2 Likes

Sorry that was dumb, I was looking for it in the app not the devices.

Thank you

I uninstalled the original Life360 w/ states and Tracker apps (Would be great if you pick up tracker too!), and installed Life360+ from HPM. I'm not getting any of the devices created, no more than just a place to enter my credentials, and some errors in my logs:

Running hub version 2.3.5.138

1 Like

The 'Unauthorized' indicates you have a username/password issue.

I merged several changes from @Matthew in this latest version

On another note I was watching the logs while my daughter was in the car and noticed that Life360 was always sending 'isDriving' = false and 'isTransit' = false. But, 'speed' was '17' (meters/sec) which is ~ 38 mph.

This has probably already been discussed in the original Life360 with states thread but I imagine that's the reason for the Min transit and driving speed preferences:

I'm going to change these values to something like 3 (transit) and 5 (driving).. and maybe it wouldn't be a bad idea to default these fields to something as well if Life360 only ever sends 'false' for both flags

3 Likes

I was getting the same thing until I found a reference in the forum to use my phone number and not my name. +1xxx-xxx-xxxx logged me in fine. Still can't get devices though as it never populates Places just Circles. frowning:
Good thing I have my trusty ST Presence sensors still.

That’s not it. I just logged out of life360 app and was able to log back in with the same credentials and it logged in without an issue.

I was using my phone number.

EDIT:

Ahh I wasn't using the +1, I'll give that a try and see if that makes a difference.

EDIT 2:
Yep, the +1 is what I needed, thanks!

Hi,

once again thank you @jpage4500 for the great job you have done. It works perefectly!
Earlier I have been using life360 with states and I had to add stupid "ifs" to my webcore rules because user location wasn't accurate. I'm receiving push message when my kid enters school and leaves school. Same thing for home location. Sometimes and for some reason life360 with states reported that kid left school but he didn't. Life 360 with states collected that information from life360 and reported it to hubitat -> to webcore -> sent message and here we go. At the same time original life 360 app did not report this location change so it was weird.
I had to add additional IF to my piston.

If location is not school
AND
if speed is more that 1m per second
Then send message that kid left school.

With this setup I still get few hit and misses but not as much as without that "speed" if. Location could be reported wrong but if speed is under 1m per second then it is impossible that my kid could jump 1km away from school in couple of seconds.

Now I'm wondering is there a better way to improve my piston's. Could you exaplain me what does that accuracy mean and how does it work? Is it always that static "50" or does it change when something happens?

I have not seen either of the inTransit or isDriving flags have any value other than false also, so I have put in values into he overrides to make them useful.

I'm also not seeing the 'WiFi'/'No WiFi' change on the html tile when I turn off my Wifi and wait for the driver to update? The wifiState attribute does change, but the html tile does not seem to update?

Some other changes I was thinking about for the html tile:

  • If the member is "At Home" (present), there is no need for the "0.00 miles from home" message so that should be suppressed.
  • Similarly, if the html tile says "Not Moving" there is no need to append the speed after that. I suggest using the inTransit and isDriving thresholds (either ones provided by Life360, if they actually change, or the overrides) to show 'Moving at x MPH/KPH'' if inTransit is true (or exceeds the inTransit override) or 'Driving at X MPH/KPH' if isDriving is true (or exceeds the isDriving override).

Thanks for maintaining this!

probably because the driver just looks for location (lat/lng) or battery changes to update any values. wifi changes would just get ignored until the next time location/battery changes

if it's important I can add wifi state change to this as well.. then, it'd update

I assumed that the driving/transit flags wouldn't update without some location change so that's probably ok

the thing i wanted to prevent was updating the lastUpdated field unless something actually changes (previously it was being updated every 30 seconds - along with all of the HTML fields which included it)

Anyway, I have HTML disabled so I'm not actively seeing/testing these.. if most users use the HTML fields though I'm fine with defaulting it to 'on' though and I can just manually disable.

When testing this I did add the wifiState change to trigger the update ..... and the html tile still did not seem to change to 'No Wifi' when I turned WiFi off, so I think there is something else amiss here. I have not figured out why?

I do use the HTML (still some reluctant iPhone users in the house who don't have your HD+ and use the Hubitat dashboard). I have no issue with the default setting (on or off) as that is a 'one and done' setting change. It would be a nice addition if the html tile updated when the wifiState changed, in addition to location or battery changes.

Thanks.

Both of my kids are at school and I don't believe there's wifi there -- but both devices have wifiState : true. 1 of the phones is an iPhone and the other is Android.. so, it looks like Life360 just isn't passing this state correctly.

jpage- I have logging turn off and I'm still getting debug logs for me and my wife.

image