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

New version on GitHub...

Huge update from Avi...

App:

  • 2.5.0 - 12/06/20 - Moved all member location functionality to Location Tracker child Driver
    Keeping only Circle level functionality at parent app level

Driver:

  • 1.5.0 - 12/06/20 - Moved all location functionality to child driver from parent app -and-
    Added:
    - Minimum Transit Speed Preference - use to set a custom speed threshold
    for inTransit to become true (follows Km or Miles unit preference)
    - Minimum Driving Speed Prederence - use to set a custom speed threshold
    for isDriving to become true (follows Km or Miles unit preference)
    - memberName attribute - First Name + Last Name from Life360 member info
    - memberFriendlyName driver preference and attribute
1 Like

updated and set the additional parameters for testing..... Mr. Roboto....nice

1 Like

Hi, I'm trying to setup the Life360 with States app and can't get any places to show up. I have a 'home' place and also added another place just to see if that helped.

Any ideas? I tried searching in this thread but didn't see anything obvious.. assuming i'm just missing something

I'm currently using the built-in HE android app's geofencing to set my hub to home/away. But, I wanted to add support for Life360 to my Dashboard app

@jpage4500 , are you using your phone number or username to login? I found that it only worked with the username. I had the same problem with places not showing up. Also, you check the logs to see if there are authentication errors.

I used my email address (I don't see a separate username) and it does pull the circle so I figured it's able to login. I watched the logs too while logging in and didn't see anything show up

Are you on the paid or free version of Life360? The free version does not support places other than Home and you’d need to add them in manually into Life360 w/states. The paid version should populate your dropdown if you were authenticated.

I'm on the free version. I had created the account on the Life360 Android app and then tried adding this HE app.

I was able to get it to work and I imagine it's related to what you're saying here.. but, if it helps anyone else I needed to login to the website and add a place there. Now I see the place in the HE app..

Glad you got it to work. If you just signed onto Life360 then you are on a free trial period that will let you add a few places in their app and web site. Once the trial period expires, you would be downgraded to their free plan that only lets you manage ‘Home’ as a recognized place. You would need to convert to one of their paid plans to continue manage places on their app and web site. Alternatively you could try @bptworld’s Life360 Tracker that would allow you to add 10 custom places manually.
Here is the link that describes the free Life360 version and their various upgrades (Disclaimer: I don’t work for them nor affiliated with them in any way other than being a fellow paid subscriber to their service...)

last question.. again i'm sure it's in the thread above but I can't see it..

I don't see a refresh rate setting in the app.. how does this app get updates? Does it check the life360 server every X minutes or is there some kind of webhook/push that happens? Just wondering how up-to-date the coordinates are

(of course i could actually go somewhere to test it lol..)

Webhook push for home geofence entry / departure events -plus-
poll for updates every 1 minute otherwise.

1 Like

New version...

Driver:
1.5.1 - 12/17/20 - Adjustments to work with Life360 Tracker

I often get a message "... Is on the move (or has arrived at etc) near No Data" or suchlike. I'm assuming this is because in Thailand there are many locations that do not support a name inside Life360. Would it be feasible to trap these case and just have the system instead report "... Is on the move" instead of reporting "No Data"?

New version on GitHub...

App:
2.5.2 - 12/17/20 - 30 second refresh intervals

Driver:
1.5.2 - 12/17/20 - Added initialization code for additional attributes / preferences
- Fixed Switch capability errors

1 Like

Quick update...

2.5.3 - 12/17/20 - Fixed a logging issue

I am seeing an issue where my away rules run every minute with this enabled. I have a RM4 rule when the Life360-User is away it turns off a few devices. Problem is it marks them away every minute and turns off those devices every minute until they are back home. I have a export of my log as it was happening but it is definitely life360 states or tracker that is doing it since it stops when I have them both disabled. Anyone else seeing this?

This was fun trying to take a shower tonight while my wife and daughter went to Wal-Mart. I am trying to see if it only does it when it detects them moving. It seems like once they got to Wal-Mart the light stayed on.

dev:14002020-12-18 20:50:09.296 infoMaster Bathroom was turned off

dev:14002020-12-18 20:40:35.353 infoMaster Bathroom was set to 99

dev:14002020-12-18 20:40:35.349 infoMaster Bathroom was turned on

dev:14002020-12-18 20:40:17.555 infoMaster Bathroom was turned off

dev:14002020-12-18 20:39:32.763 infoMaster Bathroom was turned off

dev:14002020-12-18 20:38:35.826 infoMaster Bathroom was set to 99

dev:14002020-12-18 20:38:35.823 infoMaster Bathroom was turned on

dev:14002020-12-18 20:38:32.840 infoMaster Bathroom was turned off

dev:14002020-12-18 20:38:13.153 infoMaster Bathroom was set to 99

dev:14002020-12-18 20:38:13.150 infoMaster Bathroom was turned on

dev:14002020-12-18 20:36:01.335 infoMaster Bathroom was turned off

dev:14002020-12-18 20:35:01.493 infoMaster Bathroom was turned off

dev:14002020-12-18 20:32:01.957 infoMaster Bathroom was turned off

dev:14002020-12-18 20:31:01.648 infoMaster Bathroom was turned off

Update: yep as soon as they started moving and left Wal-Mart the away scenes ran again based on their "leaving" home.

Not seeing the rule itself, I think this is a result of two issues conflicting with eachother:

  1. A change that @bptworld introduced in 1.5.2 which forces a presence event to trigger every minute (or 30 seconds) even if the presence has not changed. I am not sure why was this change introduced but trust that he had good reasons to do so and besides I believe the issue is with #2 below tripping on this change.

  2. Your RM rule trigger sounds something like“Life360 device presence is not present” which is often incorrect in the long run as you should expect a presence status to repeat occasionally regardless vs. the more correct way... Its a common issue to have triggers based on device status vs. the appropriate way of defining triggers as a status change. If I am correct in my assumption of your rule trigger then try changing the trigger to be “Life360 device presence changes to not present” which ensures the rule executes once and only once when the person leaves the home geofence. Similarly a “changes to present” would give you the right arrival trigger execution pattern.

I don’t see a changed to not present. All I have is arrived, leaves, and changes.

you are correct... ‘leaves’ is the right terminology for RM4. If this is the case, I am not sure why you are seeing it fire all the time. I do see some repetitive arrival events on my end which I think are related to the 1.5.2 change introduced but didn’t have time to troubleshoot and also didn’t see any behavior similar to yours given that we’ve been away most afternoon today. None of this would not explain the repetitive nature of what you are experiencing as the presence may repeat itself but not likely to repeatedly evoke a ‘leaves’ trigger if already away.

Suggest you look at what else is your rule connected to in the dependencies section and/or same for your life360 devices to figure out if there is another factor that may influence behavior.

Other things to try:
In the Life360 device (any of them) try to click the ‘refresh circle subscription’ button just in case you may have duplicate subscriptions and then click the ‘save device’.
If you upgraded firmware something may still be buried in the database that should have been cleared out - perhaps a reboot?

I looked at all that when I was trying to figure out why everything was going crazy yesterday and nothing out of the ordinary stands out. Everything worked fine with the built in and I think did the first time that I installed it a week or so ago. What really had me yesterday was why my lock in the garage kept cycling from locked, unlocked over and over. What I figured out with that one was the Life360 was causing it to lock and I have a rule setup that if the contact sensor is open it will unlock the lock again to prevent door damage then Life360 would lock it again and the process would repeat. I am going to look for the older code and see if that helps.

UPDATE: I rolled the code (app and driver) back to the 2.2.0 (12/04/20) and the issue seems to have stopped. I am still monitoring it but it hasn't marked away in the last 11 minutes when it was doing it every minute... 30 minutes and it is still good.

4 hours later, still good and I also noticed that the power state on the tiles now show BTRY when the phones aren't charging instead of DC all the time with the newer version, just an observation.