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

Not really sure how it works. But the top and bottom is that the life360 device isn't getting any info (can't - internet is disabled) but the values above keep updating. Beats me :smiley:

Ok, starting to get what you mean, internet is switched off for the hub and your phone, or at least one of them, but the tile / lastUpdated appears like it is getting updates, but would be preferable for it to indicate it has lost comm's in some way, either between the HE hub and Life360 and/or Phone and Life360 servers?

Bingo. At the minute, it could show that the user is still at a particular location, when in fact the last signal was received 3 days ago :smiley:

I've set up a traffic-light style button for now to show whether the location has changed at all recently (green = recent change... Amber... 5 mins ago... Red... More than 10 mins ago).

2 Likes

Life360 with States simply retrieves the data that is available on the Life360 servers. There is no way to tell if a phone is actually still sending data. The only way to tell how current the data may be is the 'Since' field. ie. since : 1629387211 This is the Unix time stamp that my driver converts to 'Since: Thu 11:33 AM'

Nice work around. I may add something like this in the future.

This downloads the image from Life360, upload a circular image in the Life360 app and that's what will be displayed.

1 Like

Thanks for the comments =)

Makes sense. Ta!

Not 100% on this, but I'm not sure everything's working as expected on my end. Not saying it's this app or not, I'm a little confused to be honest. Maybe someone can offer some clarity...?

The other half leaves work and it seems to reflect this pretty snappish. The agitating thing is that the distancemetric doesn't seem to update more than a couple of times through the 40 min bus journey, generally resulting in being stuck at say, 1.6 miles away for quite some time. Then she sometimes physically arrives home whilst it's still showing as being 1.x miles away. Within a minute or two everything catches up.

Common sense would say "ah, the mobile signal must be patchy!". But the thing is, if I open the Life360 app, I can see exactly where she is, and can watch her moving on the bus etc.

I don't understand why the app seems able to consistently show the right location, movement, speed (never did seem to be able to make any use of that before) but the driver doesn't. It';s as if (for me) the app updates instantly, but the driver here is taking a lot longer, like 10 mins plus.

Any thoughts?

(I'd prefer to post this with some associate screenshots showing exactly what's going on with the android app and the device screen simultaneously to be absolutely positive about the whole thing. But I can only do this whilst she's travelling and I only noticed this last night. I can try this evening when I'm back home and she's returning from work again to give more clarity.)

As stated many times, Life360 with States can only grab what the Life360 API offers. It checks the current data once every minute and gets the latest data. We can not control how often Life360 updates the API info at their end. All we can do is keep checking.

@djh_wolf to add to @bptworld response. Life360 seems to run two separate clusters. One that is a (near) real-time cluster that feeds their operational environment inclusive of their own app and that supports push notifications to their app etc and another that is responsible for their API access. In general data seems to replicate between the one to the other on a small lag. Lately (a week or two) I've been noticing increased lags in their replication to the extent that one day they popped up a message on their own app saying "Its not you, it's us" describing issues with their performance. Suggest continuing to monitor the issue you are experiencing and see if it is getting better with time. On my end today there is somewhere between 45-90 seconds lag which is relatively very slow to what Im used to but it could be that they have slower performing clusters right now in certain geo regions than others.

1 Like

Thanks to both of you for the continued responses.

That makes perfect sense - 2 clusters. I falsely presumed that if the Life360 app could 'see' what was happening, then Bryan's awesome little app could see the same thing, which then had me wondering if either something was broken or my install had somehow botched.

The lags I'm experiencing are far, far outside the boundaries of 90 seconds.

Ah well. At least I have my answer =p

@djh_wolf - Just in case... Never understimate the value of a good old reboot.

1 Like

Perhaps as a temporary solution you could expand the zone around your home to account for some of the lag?

I tried running through the troubleshooting steps on the Life360 site, and I gave it another crack tonight.

Plus in my usual state of general child-induced exhaustion, I'd screwed up part of my webcore.

Don't want to be too presumptuous, but a combination of tweaks seems to have led to far better results. Didn't really have the time/energy to check properly tonight. But I'll shout back once I've cleaned a few things up.

Incidentally, I'm guessing this would be way tidier with an app. I'm using a combination of sharptools. Webcore, and the virtual attribute device

    * Virtual attribute
 *
 *  Licensed Virtual the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 *  Change History:
 *
 *    Date        Who            What
 *    ----        ---            ----
 *    2020-09-17  nh.schottfam	 Original
 * 
 */

metadata {
    definition (name: "Virtual Attribute set", namespace: "nh.schottfam", author: "imnot_bob") {
        capability "Actuator"
		
	attribute "var1", "string"
	attribute "var2", "string"

        command "setVar", ["string", "string"]
        command "clrVar", ["string"]
    }   
}

Anyone else noticing issues with life360. It seems like circles are mislocated in a map and information from life360 to Hubitat is not transferring?

Still problems. Sometimes it works and sometimes it does not. I wish there would be alternative that I could trust.

hey I can only get one attribute on a tile at a time what program are you using ?

Not sure what you are asking here??

Life360 to HE - Life360 with States

That's it.

Just a note to say that I can confirm my issues were down to myself. User error!

Sorry! Thanks for writing this!!!

1 Like

my dashboard won't show multiple attributes for my life360 device . I'm asking how are you getting the picture, location on the same tile ?

Been answered many times in this thread, the search function works great! :wink: :upside_down_face: :man_shrugging: lol

The answer is also at the end of post #1. :smiley:

Is that a paid only option? Not seeing it.