Life360 Device Tracker Platform

Looks like you’re having networking issues and unable to access the Internet. Notice how sensor.yr isn’t able to initialize either, and the aiohttp errors after trying to install the life360 python package. Make sure your network is working, including access to the Internet, and try again.

Yes I noted this, I restart the raspberry and now all works…

1 Like

Now i solved my problem, sorry is not a problem with your platform

I use an extra system device tracker by WIFI named “nmap” i supose you know it. (https://domoticaencasa.es/home-assistant-8-deteccion-dispositivos-casa/)

This system use one file “know_device.yaml” and in my log i have a permission problem with this file and “nmap” don´t work.

I solved permission problem and all work fine now.

Thnks for your time

1 Like

I’m getting the same
Platform not found: device_tracker.life360
error.
I’ve renamed the folder device_tracker to life360
and the file life360.py to device_tracker.py.

HA Version 0.88.1

Any ideas?

Thanks.

So currently it looks like this?

custom_components/life360/device_tracker.py

Are permissions on the folders and file ok? Have you restarted HA? Have you tried removing any of the following if they exist (while HA is stopped)?

custom_components/__pycache__/
custom_components/device_tracker/
custom_components/life360/__pycache__/

Can you include all errors from home-assistant.log related to this, with all the detail?

That is how it looks yes.

I’m sure the permissions on the folder are ok, as it was creating the pycache folder.
I’ve removed the folder device_tracker
I’ve removed the folder pycache from the life360 folder.

I’ve just clicked the check config button again, and it isnt throwing any errors. Strange as i’ve not changed anything in the last couple of hours.

Thanks to all that have worked on this custom component. I am currently running 0.88.1 and I added the component and get the users to show up in my known_devices and entities on the frontend. I have been using HA for a while now but still have a tough time understanding some things. I read though many of the comments on here and am not understanding what exactly I need to do to have the devices and states show on the frontend. I want to use life360 for and automation to automatically arm and disarm my alarm system. I should be fine getting those automations working once I figure out how to display entity and state on the frontend.

TIA

To get started just follow the instructions from the first post in this thread.

I followed all of that but I still can only see the device trackers in states and can’t seem to get them to show on the frontend.

If you’re using Lovelace, just refresh your browser (F5.)

First of all: thank you for your great component. I’ve struggeled to get it working, and after updating to 0.88.1 I struggled to get it working again, and with succes: I have an automation which turns on a lamp when I get home (state set by Life360) and it works great!
There is only one problem left: when I look at the map I don’t see anyone from my circle. In 0.86.4 (where I come from) Icould see them all. In my configuration.yaml I did’nt change anything. I use the standard lines in configuration.yaml:

Enables a map showing the location of tracked devices

map:
But I don’t see them any more. Can anyone please explain how to get them back?

First, any device_tracker whose state is 'home' will not be shown on the map. But that didn’t change, as far as I know.

Next, do you see all the device_tracker entities on the States page, one for each member?

Yes, I see the entities on the States page. I even see that one of them is charching 10 seconds after I plugged it in. The adress seems wrong: on all four entities I see:
source_type: gps
latitude: 52.2528633
longitude: 6.2078032
gps_accuracy: 15
battery: 57
address: null
at_loc_since: 2019-02-27T16:43:50+00:00
battery_charging: false
driving: false
last_seen: 2019-02-27T21:01:10+00:00
moving: false
raw_speed: 0
speed: 0

On the badge I have on my frontend I see that I’m Home, but it does’nt show on the states card.

And I could see the avatars on the map when they were home in the previous version. Do’nt know what’s happening here…

It’s normal for the Life360 server to not provide an address when the member is in a defined Life360 Place. When this happens you’ll see null for the address attribute.

Are you saying all four device_tracker entities have the same attributes (same GPS coordinates, etc.)? Or did you just mean they all showed null for the address attribute?

Have you refreshed your browser? You’re starting to get into frontend issues, and I’m not as familiar with them, especially Lovelace. I’ve only begun using Lovelace recently. For now, let’s focus on the actual entities and their states as shown on the States page…

Do the GPS coordinates and other attributes (other than address) seem reasonable/correct for all four members?

When you run the following from a command line (from HA’s config directory), what do you see? Does the data seem reasonable?

grep 'custom_components\.life360\.device_tracker' home-assistant.log

That doesn’t sound right. As far as I know, the map has never shown device_tracker’s whose state is 'home'. See:

If none of that helps, maybe we need to take a step back. Please post your current life360 configuration.

BTW, whatever you post, of course, please redact sensitive information. Or feel free to private message me.

Before we dive in to deep: I’ll first check tomorrow what I see on the map when everybody has left home. Maybe I’m wrong and I saw them only when a member of my circle is not home :sunglasses:.
The Longtitude and latitude seem about right for my home location, nothing strange there but the adress (of which you say it’s normal) and the avatars not showing on the map - but when you say it’s normal behaviour I believe you.

grep ‘custom_components.life360.device_tracker’ home-assistant.log

Gives nothing in return. Maybe because I’m on Hassio. I will check back tomorrow.

Could be because you have your logger setting filtering out too much. You want to set (at least):

custom_components.life360.device_tracker debug

under:

logger:
  logs:

Problem solved. I went out this morning and saw myself appear on the map as soon as I was out of my Home zone. So I think I’ve mixed up what I saw in Home Assistant and in the Life360 app on my Phone (in the Life360 app I can see myself when I’m home).
I’m sorryfor the confusion, but everyting seems to work as it should. Now I only have to figure out why two members do’nt show up in the map when they are away - but that is a Life360 problem, as they show as At Home in the Life360 app while they are away

Thanks for the help and sorry for the misunderstanding of your great work!

1 Like

I’m trying to setup notifications to send to my IOS app. I have home and away working but can not get “just left home” or just arrived at work" on any zone.

Is it possible to do something like that? Life360 sends those notifications in there app so it most be.

Anyone done something like this?

Can you share what you’ve tried, and also your life360 configuration? As long as the device_tracker entities’ GPS coordinates are updating correctly, there’s no reason why you shouldn’t be able to make this work. In fact, you have several options, depending on exactly how you’d like it to work.

Here is my config:

  - platform: life360
    username: <user_name>
    password: <password>
    add_zones: all
    # MPH, assuming imperial units.
    # If using metric (KPH), equivalent would be 29
    driving_speed: 29
    filename: life360.conf
    home_place: Home
    interval_seconds: 10
    max_gps_accuracy: 200
    max_update_wait:
      minutes: 45
    members:
      - Dave
      - Sidney
      - Chris
    prefix: life360
    show_as_state: driving, moving
    time_as: device_or_local
    zone_interval:
      minutes: 15
    # Set comm error thresholds so first is not logged,
    # second is logged as a WARNING, and third and fourth
    # are logged as ERRORs.
    warning_threshold: 1
    error_threshold: 2

I can see each device change state when entering and exiting the zones. Just not sure how to grab the state changes…

1 Like