Life360 Device Tracker Platform

Sorry for the late response, i think i can now say its working.
I stopped the HA and deleted the folders ludeeus recommended and the life360 folders. Then i restarted the server reinstalled and its now working.
Thanks for all your great help

1 Like

Just a heads up to all that use the @ludeeus custom_updater, a few days ago he has ā€œpartially deprecatedā€ this component and is seeking input on a new direction to handle custom updates.

So no real cause for alarm, as he says it will continue to be supported until a replacement is available. Reference custom_updater issue #117 for further info and to provide comment.

I hope they can figure something out this has been working great for me

I have been trying for a few days now to get this working. Not sure if Node Red can do it. Here is what I have now. Home and not Home works but Work and leaving Work does not. Most be something with the message data.

How can you test leaving some place, instead of arriving in a place?

I imagine you have a zone defined as Work with right capitalization.

Basically Iā€™m looking at how does Life360 know you just left Home and notify you in there own app. Can I do the same in Node Red?

When Iā€™m at work HAā€™s device tracker life360 says ā€œDave Workā€. I have tried with the space and with an underscore.

image

Can you make a screenshot of the switch in Nodered?

Sure. I have removed the state of ā€œleft workā€ because Iā€™m not sure on hope do it.

You can try to put a debug just before the switch and check what value is shown in Nodered when youā€™re in the Dave Work area.
You can also have nodered send a Telegram message or an email if you cannot check the value when youā€™re not homeā€¦

Or just try to change the name of the zone in a single word one.

I created sensor templates of Life360 device tracker like battery percentage of devices, battery charging status and WiFi connection state
How i can change true and false value of charging status to charging and not charging
Same for WiFi connection showing true false, I want to show WiFi on and of instead of true and false attribute

On your template binary_sensor change your value_template to

      value_template: '{% if state_attr("device_tracker.name", "battery_charging") %}Charging{% else %}Not Charging{% endif %}'

and apply the same logic for wifi

Actually, it looks like @vbxlive is using a template sensor, not a template binary sensor. If it was a template binary sensor, then that would not be the correct solution, because the value_template of a binary_sensor has to return true or false. (Actually, any template result, when converted to lower case, that isnā€™t 'true' will result in a state of 'off'. Only 'true' will result in 'on'.) Of course Iā€™m guessing you actually meant template sensor. :wink:

Now, given that it is a template sensor, then yes, that would probably be one way to do it.

Personally, Iā€™d change it to a template binary sensor, and Iā€™d use an appropriate device_class for each, such as battery and connectivity.

1 Like

I have this setup on my personal phone. i put the details in config yaml. Not seeing the device. I thought it was cut and dry but i must of messed up somethingā€¦

image

Has anyone noticed the update has been slower? HA is recognizing that my wife and I have gotten home at least 1 minute later than normal. Itā€™s now to the point where we are in the house before it knows we are home. That makes it hard to use the device tracker component to disarm our alarm when we get home.

I agree, iĀ“ve noticed something similar. If it is important to know if you are home, think about adding a ping or nmap to additionally check if you are home. If your device is pingable, then you are home.

Every time i do this HA wont load. im assuming bad config but where ?

username is my phone number , pass is what i setup on the app.

image

The first time after setting this up and starting HA, it will use the username and password you enter to authenticate with the Life360 server. If that works it will cache a token in life360.conf (or a different filename if you specify one in your life360 config) in HAā€™s config directory. Thereafter when you restart HA it will use the cached token (until such time as the server rejects it.) So, if you change username or password that change will not take effect unless you delete life360.conf and restart. (I should probably store the username and password in the cache file and re-authenticate if either is changed.)

Regarding using a phone number vs an e-mail address, Iā€™ve only used it with an e-mail address. I donā€™t know if it works using a phone number.

Iā€™d suggest stopping HA, deleting life360.conf, changing the life360 config to use an e-mail address & password, and making sure that logger is set up for debug. Then startup HA and look for debug messages in home-assistant.log concerning life360. Iā€™d be happy to help interpret the debug messages.

This is the error I am getting

2019-03-18 09:11:22 ERROR (MainThread) [homeassistant.bootstrap] Error loading /config/configuration.yaml: Secret [email protected] not defined

I do have the file config/custom_components/life360/device_tracker.py

Anything you notice im missing?

I doubt this is due to anything in HA, other than the usual delay caused by polling. (The default polling period is 12 seconds, but you can change that via the interval_seconds configuration variable.) This can add a worst case delay of up to the polling period.

I suspect what youā€™re seeing is strictly a function of Life360 itself. You might want to check their FAQs.

Also, consider how big you make your home zone. Mine is 300m and we never have a problem.

Also, @Piggyback makes a good point. Personally we use both Life360 and Google Maps Location Sharing, combined via my custom composite tracker. I did also have a ping tracker in the mix, but discovered that that almost never made a difference, so I dropped it.

!secret is a special keyword that means pull a value from secrets.yaml. See Storing Secrets.

For now, just to test out life360, remove !secret from the username and password lines. If it works, then you can move these values into secrets.yaml following the instructions on the linked doc page.