[RELEASE] Life360 with States - Track all attributes with app and driver. Also supports RM4 and Dashboards!

OK, I look forward to that and will upgrade. However, my basic question is whether the Home as defined in Life360 with its geofence is what gets surfaced in Hubitat as my presence. Even though I also have Home defined in Life360 Tracker with similar radius.

New version on Github...

App:
v1.1.6 - 08/06/19 - Added new attribute, lastUpdated

Driver User:
v1.1.3 - 08/06/19 - Added new attribute, lastUpdated

So all the iPhones in my circle like to bounce in and out of my home location at least once on arrival.

I was going to try to add a two minute delay or so before it reports departed. Then realized I was not sure how to do it. Any ideas?

Shouldn't be too much of a problem. Let me see what I can come up with.

1 Like

Well I took a swing and a miss. Will poke at it a bit more.

It's in the latest release posted to Github this morning... I haven't had a chance to test it yet though.

Seems the isDriving variable is always 0. I'm sub'd to the driving reports upgrade subscription. Don't know if it's the device driver or the api.

getting the same error as before:

app:3222019-08-26 10:14:16.039 pm errorjava.net.SocketTimeoutException: Read timed out on line 172 (getCredentialsPage)

app:3222019-08-26 10:13:55.868 pm errorjava.net.SocketTimeoutException: Read timed out on line 558 (updateMembers)

please provide the full log for this app, I need a lot more information.

Thanks

1 Like

Sure thing, will do when I get home.
Thanks

@bptworld

So the link for the current location sends me to a test page: Hubitat Portal(Hidden token). Is this correct?

Where are you clicking on this link? Screenshot? Any location link should bring to a google map.

Any address sends to that link I sent you. This is from the dashboard.

I can guarantee you there is nothing coded into the app/driver to send you to the portal. Those links bring up a google map.

Here is the tile code...

theMap = "https://www.google.com/maps/search/?api=1&query=${device.currentValue('latitude')},${device.currentValue('longitude')}"
    
if(life360Paid) {
	tileMap = "<table width='100%' valign='top'>"
    tileMap += "<tr><td width='25%'><img src='${avat}' height='${avatarSize}%'></td>"
    tileMap += "<td width='75%'><p style='font-size:${avatarFontSize}px'>At: <a href='${theMap}' target='_blank'>${add1}</a><br>Since: ${dateSince}<br>${device.currentValue('status')}<br>${binTransita} - ${bUnitsa}<br>Phone Lvl: ${bLevel} - ${bCharge} - ${bWifiS}</p></td>"
    tileMap += "</tr></table>"
} else {  // Free

I just narrowed it down. It is the Hubitat App. If I VPN into my hub it works flawlessly.

@chuck.schwer @mike.maxwell @patrick - looks like there is a bug in the iPhone HE app. If a dashboard provides a URL the app attempts to navigate to the test-hubitat URL. Can you log as a new bug?

1 Like

Firstly, thanks @bptworld! This is a great app! I am using the free version of Life360 and the tile on the dashboard is great. It displays 'At: Work' and 'At: Home' perfectly. However, if not at either of these locations it dislays 'At: No Data'. the Life360 at shows as near xxxx. Is this normal?
Also, how often should this tile update by default? As an example, if my wife arrives home I receive a push notification from Life360 but the tile takes about 2 minutes to update.

Thanks!

I'll take a look at the code. It displays whatever is in the device attributes. When it is showing 'no data', take a look at the device created and see what is in there.


Edit: I took a look at the code and it does simply take the device attribute. So this is sent from Life360. Remember you can add your own places to my app so at least you would know some more places but it wouldn't update in between places. Limitation of the free Life360 app.

The tile is just a representation of what is in the device. The device gets its data from Life360 every minute so sometimes there will be a small gap.

Brilliant. Thanks for the info. I'll check the device attributes at next opportunity. I noticed that in the device Address 1 is 'Home'. Which is correct, I am home. Address 2 is 'No Data'. This is possibly what is displaying when I am not at 'Home' or 'Work'. But I will confirm.

Edit: Is it possible to add/edit the attributes displayed in the Life360Tile1? It displays the 'At' 'Since' and 'Distance From' fields but would be good to add 'battery' 'driving' etc.

At: Home
Since: Mon 04:33 PM
0.00 km from: Home

Looking more into the code... This is where the No Data comes from. So it definitely look like the free version isn't sending the data. Nothing I can do about that. :grin:

if(member.location.address1 == null || member.location.address1 == "")
        address1 = "No Data"
    else
        address1 = member.location.address1

Are those fields populated for you in the free version? I didn't think they should up in the free version of Life360. Would love to see a screenshot of your attributes.

Post #2 has examples of the 'paid' tile.

Thanks.

I get this as well. The other day stuck in a traffic jam every time I stopped I got the No Data notification. :smile:
Not sure if there is a way round this. Maybe don't send notification if there is no listing of where you are.
@bptworld
Hi Bryan.
Could that be possible.
If place does not match defined places, do not send notification?