Life360 Device Tracker Platform

Hello to everyone.
I have one problem with this integration, in the log i receive this:

Suppressing further errors until OK: get_circles: CommError: HTTPSConnectionPool(host='api.life360.com', port=443): Max retries exceeded with url: /v3/circles.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7faf01350910>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

get_circles: CommError: HTTPSConnectionPool(host='api.life360.com', port=443): Max retries exceeded with url: /v3/circles.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7faf050e6c90>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

I don’t know why, if i try to connect to api.life360.com i can open the webpage so i think i can reach the server.
Thanks a lot
Stefano

You need to make sure you’re trying that from the exact same context that HA runs in. Also, it’s not uncommon for there to be communication errors with the Life360 server from time to time. Most are filtered out, but occasionally there can still be enough consecutive errors for a log message to be created. However, normally those temporary errors aren’t name resolution problems. Sounds like HA is having a problem communicating with the Internet from the context it is running in.

Thanks a lot!! Fast and clear reply.
For now seems that work.
Have a good year.
Stefano

Thanks to @Mariusthvdb I discovered a bug that could cause the last_seen attribute to “go backwards.” I’ve fixed the bug and added some additional warning messages that should help give better insight into how the integration is working. I’ll be submitting a PR soon, but wanted to give anyone a chance to try the changes first and provide any feedback.

The change is in this one file:

1 Like

@Mariusthvdb any chance you’d give this a try and let me know if it outputs any life360 warnings (instead of composite warnings)?

sure, but this would have to be done as Custom component? I am not sure what I would need for that except this file?

No, you can’t do it as a custom component. Or at least I don’t think you can. This is because it uses config flow. You’d have to find where that file is on your system and replace it. If you can’t don’t worry about it.

really sorry, that won’t work, I use Hassio and can’t hack the system. I think…

PR 30647 was submitted, approved, merged & is in 0.104.0b1.

Hi,
I read what you said but have come across an issue.

I have tried to remove to: not_home in the automation.

entity_id: device_tracker.life360_mark
for: '00:30:00'
from: home
platform: state

Returns back
Message malformed: dependency violation - key "for" requires key "to" to exist @ data['trigger'][0]

when I try to save it.

So I see from my logs the states I am getting are

away
moving
driving
home

from my YAML

life360:
  # MPH, assuming imperial units.
  # If using metric (KPH), the equivalent would be 29.
  driving_speed: 18
  interval_seconds: 10
  max_gps_accuracy: 200
  max_update_wait:
    minutes: 45
  show_as_state:
    - driving
    - moving
  # 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: 2
  error_threshold: 3

Automation

 - entity_id: device_tracker.life360_mark
   for: 00:30:00
   from: home
   platform: state
   to: not_home
 condition: []
 action:
 - data:
     preset_mode: away
   entity_id: climate.central_heating
   service: climate.set_preset_mode

does not trigger as I do not see not_home as a state anymore?

True, if you want to use the for option with the state trigger you have to specify a to value.

Those are not the states. Those are the UI translations of them. The states are not_home, moving, driving & home. (If you want to know what the real states are, that you use with automations, you have to look on the STATES page.)

No. It would be because the state changes from home directly to driving or moving without passing through not_home.

Try this trigger instead:

  - platform: template
    value_template: "{{ not is_state('device_tracker.life360_mark', 'home') }}"
    for: '00:30:00'

Thanks,

Confirmed as working

1 Like

works most of time, this morning I am getting 10+ minutes delay. it is showing fine in my phone app, but not in HA. anyway to improve it?

before some hours ago my Life360 app stops working. It is no more connecting to the internet It Showing “unable to connect error”

None that I know of. It seems to be working OK for me. Maybe it’s a temporary issue with some of their servers.

1 Like

By “Life360 app”, do you mean the phone app from Life360, or do you mean the HA life360 integration? If the former then you should check with them. If the latter, then same answer as my previous reply – maybe it’s a temporary issue with some of their servers. It seems to be working fine for me.

@henry8866 @delta010

I just checked my log. Seems like there was some server issue that started about two hours & twenty minutes ago, but it seemed to clear up about an hour later (about an hour & twenty minutes ago.)

true, I saw error for life360 in HASS log too.

2020-01-21 06:06:55 ERROR (SyncWorker_2) [homeassistant.components.life360.device_tracker] get_circles: CommError: HTTPSConnectionPool(host='api.life360.com', port=443): Max retries exceeded with url: /v3/circles.json (Caused by ReadTimeoutError("HTTPSConnectionPool(host='api.life360.com', port=443): Read timed out. (read timeout=3.05)"))

Anyone else getting marked “Away” while you’re sitting at home? The tracker in Home Assistant gets changed to away for a minute or two, yet when I open the Life 360 app it still says Home.

This just started happening about 3 weeks ago. It kicks off automations that start to set the alarm, turn off the lights, etc which is kind of funny when you’re sitting there watching TV or something.

I would like to see distance from home instead of just Away or Home.
Can someone help me with code or guide ?