[RELEASE] Life360+

image
My mods...


#tile-38 .tile-title {
position: absolute;
bottom: -10px;
color: #ff0000;
font-size: 30px;
}
#tile-38 img, video {
border-radius: 35px;
max-width: 120%;
height: auto;
vertical-align: -139px !important;
}
#tile-38 .tile-primary p {
position: absolute;
margin-left: 11px;
margin-top: -26px;
line-height: 17px;
}
#tile-38 .tile-primary a {
font-size: 30px !important;
color: #00ff37;
position: absolute;
left: 15px;
width: 310px;
margin-left: -100px;
margin-top: -61px;
line-height: normal;
}

1 Like

I would suggest you make sure you are on the latest version ('Update' or 'Repair' in HPM) and see if that works for you (mine works as expected). If it does, then something in your 'mods' may be the issue.

1 Like

copied from another thread from @rjterry21 :

Also, what's the possibility of getting the Tiles ("Items" in Life360) that are tied to Life360 to show?

I'm open to supporting this but I'd need some help as I don't have any Tiles to test with. I see 3 API calls made to life360.com -- listed below. Hopefully the tile data would be returned in 1 of these -- ideally the last one:

          def urlCircles = "https://api.life360.com/v3/circles.json"
            def url = "https://api.life360.com/v3/circles/${state.circle}/places.json"
            def url = "https://api.life360.com/v3/circles/${state.circle}/members.json"

What would help is to see an example response that contained the tile(s). You can do this by going to Apps Code and editing the Life360+ app. Look for the following code block and add the log line:

members: (~ line 527)

def cmdHandler(resp, data) {
    if(resp.getStatus() == 200 || resp.getStatus() == 207) {
        result = resp.getJson()
        log.trace "Life360+: cmdHandler: $result"

Save this and watch the Hubitat logs until you see this log line show up. Copy the text and feel free to change any sensitive values like lat/lng or account ID's and either post it in a snippet here or DM me.

If nothing about the tiles shows up in the members response then I'd guess it's a new API call

Hi Everyone,
In reviewing HE logs, l am recieving the following error messages

Life360+: cmdHandler: resp:hubitat.scheduling.AsyncResponse@c3adc1

Could someone please advise as to how to fix this error?

Thanks in advance

Me too. It happens occasionally.

It looks like it's logged when there's a connection problem fetching data:

    if(resp.getStatus() == 200 || resp.getStatus() == 207) {
        result = resp.getJson()
...
    } else {
        // connection error
        log.error("Life360+: cmdHandler: resp:$resp")
    }

I could probably change the logging so it prints out the response code and any other useful details

Connection problem?

Where?

e.g. Between life360 and mobile device OR between your app and the life360 or something else.

Please explain

Based on the code snippet, it would be between the jpage4500's Life360+ app and the Life360 service.

Thanks,

Nothing about the tile(s) ever showed in the log trace data.

(Tile Joins Life360 | Life360)

Hi,
Have you been able to progress any further with this reported issue? If so, could you kindly suggest what we need to apply to have fixed?

Thanks

I see a bunch of similar errors from 2:27 AM to 2:41 AM this morning but that's it. That would lead me to believe the Life360 service goes down from time to time (maybe even a scheduled downtime)

I wouldn't worry about it if it's not happening too frequently. This app polls the Life360 service every 30 seconds which is 2,880 checks per day.. so if most of them are working I think things are going pretty well. This isn't a public API either - the app is just pretending to be a Life360 client so I'm just hoping they don't find a way to shut it down. I don't know how the official Life360 app works -- it probably doesn't poll the API as often as we do though as it could use something else like push notifications.

I'll log more info about the error and test it out but I don't expect there to be any other kind of 'fix'

FWIW - I still haven't seen a connection failure since 6/27 @ 2:41 AM.. I made a few local code changes to see what the error code was but haven't hit it yet.

Unfortunately, I'm seeing these now every minute going back several hours at least, possibly further.

The errors continue every 30 seconds. Looks like I have the same issue that @lcw731 had. My credentials haven't changed, so maybe Life360 is blocking me now?

My next step would be to reauthenticate, but I don't have that opportunity. Is there a way to logoff and login to Life360 without removing and installing the app? If I must reinstall, is there a way to preserve the child presence devices throught that? I don't think Swap Apps will work with a child device.

image

I wish I could help. I went up going full nuclear, uninstalling the old app from Hubitat, plus my phone, and reinstalling everything new. ow everything works great.

I reinstalled Life360+ in Hubitat, but first created virtual instances of all the presence objects, then changed any presence-related automations to use those instead. The virtual presence objects mirror the Life360+ child devices. This way it will be much easier to grip and rip next time, or if I change presence apps.

Didn't need to do anything on phone app. All is working fine now with no authentication failures.

I've installed and uninstalled the old version, installed this new version several times. Still, the setup allows me to choose my Life360 Circle, but once I do that, nothing is populated in the Life360 Places dropdown. I have "Home" set up correctly in the mobile app, and that app indicates I am home right now (yes, I am). Still, after several tries, I have never bee able to see a choice (in Life360 Places) in the hubitat setup. Any guidance would be appreciated.

do you see anything in the logs when you're setting this up?

Yes, right after I choose the Circle, the log shows an error: (note: please delete if personal info is included)
java.lang.RuntimeException: java.sql.SQLException: Referential integrity constraint violation: "FK_IAUXVKKBBPUBSQE7O1GIVXCKE: PUBLIC.EVENT_SUBSCRIPTION FOREIGN KEY(INSTALLED_APP_ID) REFERENCES PUBLIC.INSTALLED_APP(ID) (CAST(2217 AS BIGINT))"; SQL statement: INSERT INTO EVENT_SUBSCRIPTION (VERSION, FILTER, HANDLER, NAME, INSTALLED_APP_ID, LOCATION_ID) VALUES (1, 0, ?, ?, ?, ?) [23506-214] Query: INSERT INTO EVENT_SUBSCRIPTION (VERSION, FILTER, HANDLER, NAME, INSTALLED_APP_ID, LOCATION_ID) VALUES (1, 0, ?, ?, ?, ?) Parameters: [syncVersion, getVersionsInfo, 2217, 1] on line 415 (method listCircles)

One thing that still bothers me is address1 changes even though location is unchanged. While checking Life360 app on Android it shows that person one's location is ..let's say "school". I do have a webcore piston which checks if address1 changes then send notification. For some reason life360 app in Hubitat reports address1 changes for example to "No data" or some nearby addresses. At the same time Life360 app does not change users location, it still stays "School" like it is supposed to.

Because Address1 changes according Hubitat it also runs webcore piston and sends notification.
I'm thinking that Life360 app understands those small gps/location changes which do not mean location truly changes and for that reason it doesn't change location/or show it to user. I need the same logic for life360 app on Hubitat side.
I have tried to tackle it many different ways but haven't found bulletproof way.