Life360 Device Tracker Platform

Interesting. I can’t say I ever tested that scenario. I only have ten Places and I get all of them. Hmm, I’ll play around with that.

In the meantime, if you can get to a command window where you can run Python3, then you can try this script that I wrote that will get the names of all Members and all Places in all your Circles and print them out. You’d use it like this (which creates a temporary Python virtual environment to run in):

python3 -m venv life360
source life360/bin/activate
python3 -m pip install life360==3.2.0
python3 list_life360.py USERNAME PASSWORD
deactivate
rm -rf life360

It doesn’t show the Place details, only the names, but if that shows all the Places, then I should be able to fix the debug output. If not, then it seems to be a limitation of the API.

Thanks Phil,

Just run it and it only lists the ones that the debug logs show, not all of them.

Circle: Family
  Members:
    Mark
    Jakki
  Places:
    Tesco Extra Riverside
    Castlepoint
    Queensway Place Tesco
    Home
    Dog Walking
    Saints FC
    Chelsea's House
    John Lewis at home
    Tesco Extra Tower Park
    Tesco Extra Salisbury
    Tesco Extra Fleet

Very strange - do you think it could be my circle settings?

EDIT, just checked there are 21 places missing

HI Phil,

does this mean I can’t keep using the CC , even renamed to life360_custom, in
/config/custom_components/life360_custom ? Thats what I hoped for, as per earlier discussion…

I just ran an experiment. I added three more Places. Then I used the script, Postman, and restarted my main HA instantiation and looked in the log. In all three cases all 13 Places where shown.

So I guess I can’t explain why you’re only seeing 11.

Do you have a subscription (i.e., premium account) for your Family Circle, or is it a freebie? If that latter, then maybe that could explain it. :man_shrugging:

Those comments were made to someone who was trying to get the standard life360 integration working. AFAIK, you can keep using the CC renamed as you have it.

I have a subscription :frowning:

Oh well thanks for looking - I’ll keep trying different things in Life360 to see if I can trigger an update.

I suppose I could try adding yet another 19 Places and see what happens, but, yeah, no, sorry, I’m not that dedicated! lol!

Good luck! :slight_smile:

1 Like

Fixed it but don’t know why the behaviour is like this.

None of the found ones had the alerts set up in the app, but once I added alerting to the others, they all show up now :slight_smile:

That is weird. I don’t have alerts set for any of my Places. And aren’t alerts set per Member anyway? Weird.

Yep very weird.

I have now removed the alerts and they still show up in your script and in the logs :slight_smile:

Very strange, but I have added my zones in zone.yaml now without having to manually do it from google maps :smiley:

Thanks again Phil for looking (and your test script).

Have a great day!

mb

1 Like

Sorry to be dense, but how do I get entities to show up in the front end? I’ve added the integration, but I see absolutely nothing in the front end or entities list. The instructions make it appear that no other configuration is mandatory. I do see activity in the log:

2019-06-29 12:16:48 DEBUG (SyncWorker_15) [homeassistant.components.life360.device_tracker] Doe Family Circle: will be included, id=e43fcd81-9121-4e49-8f73-6a5d3c2a5aa0
2019-06-29 12:16:48 DEBUG (SyncWorker_15) [homeassistant.components.life360.device_tracker] Circle's Places:
- name: Parents
  latitude: 43.xxxxxx
  longitude: -81.xxxxxx
  radius: 3218.688
- name: Jane Work
  latitude: 43.xxxxxx
  longitude: -81.xxxxxx
  radius: 804.672
2019-06-29 12:16:48 DEBUG (SyncWorker_15) [homeassistant.components.life360.device_tracker] John Doe -> life360_john_doe: will be tracked, id=e8193b1d-6bb3-419b-bb54-2feb99e2ec4c
2019-06-29 12:16:48 DEBUG (SyncWorker_15) [homeassistant.components.life360.device_tracker] Updating life360_john_doe
2019-06-29 12:16:48 DEBUG (SyncWorker_15) [homeassistant.components.life360.device_tracker] Jane Doe -> life360_jane_doe: will be tracked, id=8d8eedea-409b-4394-bc15-a5feea512fe0
2019-06-29 12:16:48 DEBUG (SyncWorker_15) [homeassistant.components.life360.device_tracker] Updating life360_jane_doe
2019-06-29 12:18:45 DEBUG (SyncWorker_13) [homeassistant.components.life360.device_tracker] Updating life360_john_doe; Time since last update: 0:09:19
2019-06-29 12:18:45 DEBUG (SyncWorker_13) [homeassistant.components.life360.device_tracker] Updating life360_jane_doe; Time since last update: 0:11:00

I’ve restarted a few times, and I never used this when it was a custom component.

If you’re seeing those messages, then you should have the following entities (which should be in the list on the States page):

device_tracker.life360_john_doe
device_tracker.life360_jane_doe

Do you see them in known_devices.yaml? They should be there. Is it possible they each have an entry that looks like this:

track: false

If so, then that’s your problem. You must have track_new_devices: false somewhere in your configuration. You will need to manually change those entries to true.

In any case, it would seem the problem is not with the life360 integration.

1 Like

Nice work @pnbruckner - it was that I have track_new_devices: false (or my router starts tracking everything). Once I changed them in known_devices.yaml everything is as expected. Thanks!

1 Like

Hi,

I have followed the instruction last time :slight_smile:

I have rollback my changes with git and start again and now it works.

I have a question when you add life360: and restart home assistant. Does it install any package ? If yes, it might explain that I got any kind of internet issue that has cause the issue.

Anyway thank you guys (@pnbruckner and @atomicpapa) for your answer and the time that you have spent to help me

have a great day or night :slight_smile:

1 Like

The standard life360 integration does use a newer version of the life360 pypi.org package, so at some point after upgrading to 0.95+ HA will attempt to install it. It probably will only do that when it sees you’re using the integration, which will be when you put life360: in your config, or you add your Life360 account via the Integrations page in the UI.

Glad you have it working! :slight_smile:

Doesnt seem to update home state?

I can see that Life360 thinks you’re in the Life360 Place named Home, but are those GPS coordinates inside Home Assistant’s zone.home? That’s what determines the state of the device_tracker.

In all the recent testing I’ve been doing, I did see this sort of thing once. If I looked on the map, my icon was clearly inside HA’s zone.home. Yet the state of the device_tracker was not home (which is why, of course, I could still see my icon on the map. Normally the icon for a tracker that is home doesn’t appear on the map.) So I restarted HA and the state was properly set to home. I have not seen this happen again.

FWIW, life360 is just reporting GPS coordinates. It’s the device_tracker component level code that’s determining the state. So, not sure why this might happen, but I can’t see how it could be life360’s fault. It might be, but I just can’t imagine how it could be.

after checking the debug message and setting home it seems to work. is the radius in the debug message also in meters? or is it feet?

Radius is always expressed in meters.

@pnbruckner so whats the story on the life360 zone import? It was really handy to manage things in one place before.