Life360 Device Tracker Platform

HI Phil,

sorry if I expressed myself unclearly, but that’s not what I am trying to do, just didn’t find the words ‘time zone name’… I am not trying to find a city location from ‘time zone name’, I am trying to find the correct ‘time zone name’ for my lat/lon.

no, that’s not needed any longer, the AppDeamon gives me all that and more.

I will try, and report back, though the release notes make note of a lookup:

* use the precomputed shortcuts to instantly look up a timezone ("instant shortcut", most common zone of the polygons within that shortcut)

not sure if that has the correct ring to it… we’ll see.

sure, and Geopy package does a perfect job in the AppDeamon app. Which adds, not replaces, attributes to the existing life360 device_trackers. So many extra details even, it’s almost scary, and precise up to the restaurant people are in…

So the ‘time zone name’ life360 reports is not changed, would not dare to meddle with such a fine CC.

don’t get me wrong, it’s only since yesterday that I noticed the LIfe360 cc reporting incorrect ‘time zone name’.

No big deal, and I haven’t driven to the wrong country because of it. But now that I know, it bugs me reported attributes are not always correct.

Update

using the updated timezonefinderL 4.0.2 does make a difference, and at least 1 of the 2 involved trackers now reports the correct ‘time zone name’ . The other tracker that had the incorrect ‘time zone name’ now shows correctly on both :wink:

thanks for the tip!

Just an FYI, seems I introduced a small bug when simplifying the custom component in the process of submitting it to become a standard integration. I’ve already submitted the fix, and it will probably be in 0.95.1.

If the Life360 server provides no location information for a Member, rather than logging an error properly, the bug causes an exception. If there were more Members to process on that update cycle, then the update for those Members won’t happen. Assuming the missing location information was temporary (which it normally is), then all Members will be updated on the next cycle. FWIW, missing location information doesn’t happen very often.

So, if you see the following in your log, then it’s caused by this bug and it will be fixed soon.

2019-06-26 06:49:08 ERROR (MainThread) [homeassistant.core] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/life360/device_tracker.py", line 354, in _update_life360
    self._update_members(members, members_updated)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/life360/device_tracker.py", line 302, in _update_members
    self._update_member(member, dev_id)
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/life360/device_tracker.py", line 177, in _update_member
    last_seen = _utc_from_ts(loc.get('timestamp'))
AttributeError: 'NoneType' object has no attribute 'get'

Thanks you pnbruckner for this creat component. It is the most accurate device tracker. Great job!

For me one of the elements is to get the speed of a device at a certain point. I added an automation for this. When entering a zone the speed is stored in a binary value.
The problem was… it was always ‘0’ (zero) I had no idea what was wrong.

So I took two phones and go on a ride. In the beginning the speeds where displayed and updated in Home Assistant. 11 km/h… 20km/h… 19km/h… But suddenly, after a few minutes, both phones had a speed of 0 km/h and stayed that way.
Other values such as gps accuracy where still updated.

I do not know if this is a problem of Life360 (cannot find the speed readings anywhere) or this script. Hope you can take a look into this.

Thanks you

1 Like

The life360 HA integration does nothing on its own regarding determining speed. The only thing it does is to convert the raw number that comes from the server to a known unit of measurement (mph or kph.) If you’re getting zero, then that’s because that’s what’s coming from the Life360 server.

Thanks for the quick reply.
Is there anywhere on the Life 360 website where I can monitor the speed? When I can confirm I shall contact them.

Don’t know. I guess I never really tried looking at someone’s speed via the Life360 website. I look at their location, and their history, but never tried to look at speed live.

What are you doing with the speed values?

I don’t know if they were testing something and removed it but at one point I would see a person’s speed in the Life360 app.

Since speed is passed, I was trying to use it but am still trying to figure out how what I want to do with it.

I think it would be cool to take speed along with lat and long values and put them down on a map.

Possibly using the grafana worldmap panel https://grafana.com/plugins/grafana-worldmap-panel/installation

I added a Grafana graph using speed and it seems pretty accurate.
The following is with 2 people in the same car.

@CreatoX @surge919

FWIW, I’ve just implemented a feature in my composite tracker to calculate speed based on the distance between consecutive GPS coordinates and the time difference between them. This way speed can be calculated no matter what type of (GPS-based) tracker(s) you’re using. I’ll probably release that new feature soon.

1 Like

Hey @pnbruckner just noticed that the migration guide forum post (which is linked to from the release notes) should be updated.

It still lists show_as_state as something that is “no longer supported and must be removed” even though it was added back shortly after that guide was written.

1 Like

I use the speed to dertermine what vehicle I use at that time.
< 40 km/h is bicycle

When I come home from work, I want the garage door to open and close automatically so I can park my bike.
There is no room for my car :slight_smile: So I only want this to happen when I’m on my bike.

I use the exact same route by bike or by car.
The speed measurement is taken place somewhere on the route where the car is on the highway. Almost imposible to get a < 40 km/h reading :wink:

Sounds great, pnbruckner!

I added the

life360:
  accounts:
    - username: life360_username
      password: life360_password

to my config.yaml file and when I do the check config it comes back with:

Validate your configuration if you recently made some changes to your configuration and want to make sure that it is all valid

Configuration invalid CHECK CONFIG

Component not found: life360

Anyone able to help with this? HA version 0.95.0

I’ve got the same issue with 0.95.1

@kpj5425 @lolouk44

Did you follow the instructions for transitioning from the custom integration to the standard integration? In particular, did you delete the custom integration folder?

To what extent is the Life360 app a battery drainer for Android devices? And are there options for reducing consumption?

Hi. There have been several discussions about this. You can find the most recent one (that I’m aware of) just above in this post.

EDIT: In regards to your second question, no, there isn’t. But then there doesn’t need to be. They are constantly tweaking the Android and iOS versions of their app to keep up with OS releases, etc., and one of the things I think they focus on is minimal battery usage.

Yes I did delete the folder and changed the config.
I’ve tested on a separate, almost blank install, and it works, so it’s got something to do with the fact that there was a CC previously, but I can’t figure out what it blocking…

Thnx for the answer @pnbruckner :smile:

I am currently using Owntracks and want to switch to Life360, I am curious about the accuracy and battery consumption. Will test today how good the location accuracy is and if so then I will remove Owntracks from my config asap.

Yes, there must be something weird & unexpected going on. In all of the testing I’ve done, I have seen a case where I renamed the life360 folder in custom_components and restarted HA, but I got errors. But when I finally deleted the folder, then things started working. Can’t explain it.

interesting. I had move the folder completely outside of the CC folder, and that’s what seems to have caused the issue for me too.
Once I deleted it, error was gone…