Life360 Device Tracker Platform

Not much, other than I believe they are used via the same package, so from a HA perspective, it shouldn’t matter. I use MariaDB on my “production” system, and sqlite when testing.

Exactly how are you querying for lat & lon?

Or, wait. Do you mean you use those databases for HA’s recorder? Or are you using them some other way? If so, I don’t know anything about that.

I’m using the regular query entry in Grafana

In MariaDB, are the entries showing up with the full lat and long coordinates?

it would appear (in mysql at least) that HA stores the data as is, without trunking floats to 2 decimals.
I don’t track entities that have more than 2 decimals so I don’t know if the issue is HA export, InfluxDB Import or Grafana Import/display…
Silly question: have you tried to change the decimals in Grafana?

1 Like

So exactly how are you using Grafana? Is it HA’s recorder database? Or is it pulling from HA’s recorder database somehow?

When I do a query of my MariaDB database (which is HA’s recorder database) in mysql, like this:

MariaDB [homeassistant]> select attributes from states where entity_id = 'device_tracker.phil';

The attributes data (which has, of course, been JSON serialized), has the full resolution for both latitude & longitude.

damn decimals… completely missed that :slightly_smiling_face:
thanks

1 Like

Phill,

Grafana is usually linked to InfluxDB for visualisation.

Check this out

So there’s a HA InfluxDB integration that pulls selected data from HA’s recorder database, and Grafana can graph information from the InfluxDB. Is that it? I guess I wonder why Grafana can’t just pull data directly from HA’s recorder database. But there must be a reason that’s escaping me. :slight_smile:

What I heard / understand is that influxdb is more suited to store data for graphing than mysql or other standard dbs
From Compare InfluxDB to SQL databases | InfluxDB OSS v1 Documentation

You can see that:

InfluxDB is designed to work with time-series data. SQL databases can handle time-series but weren’t created strictly for that purpose. In short, InfluxDB is made to store a large volume of time-series data and perform real-time analysis on those data, quickly.

1 Like

Sorry if this is a dumb question but i’m really new to HA and Life360.

Is there any way to do a couple of things:

  1. Capture one of the values returned by the Life360 object, such as battery level, and have it defined as an entity that can then be added to a custom dashboard?

  2. Is there any means to capture the same value and graph it over time?

Sorry if these are simple questions but as a new guy in the HA world i’m keen to learn more.

Thanks

Pete

Yes, via a Template Sensor.

One way is via a Lovelace History Graph Card.

No problem. Glad to help. :slight_smile:

1 Like

I finally went to DrZzzs youtube and saw what I missed that wasn’t in the instructions. Removing the Life360.conf file in the Config folder. Once I removed that file, it started working.

Well, that’s strange, because with the standard life360 integration in 0.95, it doesn’t use or even try to read that file. It should make absolutely no difference whether or not it’s there.

Or are you still using my custom integration with an older version of HA?

BTW, what DrZzza youtube? The only one I know of was obsolete before it was posted. Nice, but obsolete as far as installation instructions go.

EDIT: I just watched the youtube you were referring to. It was a little all over the place, but I guess that’s what those things are like. Anyway, he didn’t follow the instructions too well, but still got it working. He did some things he didn’t need to, like removing life360.conf, but as I said, that doesn’t matter.

I’ve update the instructions a bit since that youtube was made, and added Hassio specific instructions. I don’t use Hassio, so those are based on feedback from Hassio users. But I think I can simplify a bit more. (I was trying to be overly conservative.)

Anyway, it’s late and I’m rambling. Bottom line, removing life360.conf did not solve your problem. Something else you did must have fixed it. But, as long as it’s working for you now, that’s all that matters.

He just did an upgrade live stream yesterday

That was yesterday? BTW, I saw your name fly by a few times. :slight_smile:

image

Yesterday? Yeah, I caught the beginning but that was all

Hey Pete,

So I haven’t done this myself yet. But here is something that you can do:

you need to define an attribute in this case life360.batterylevel as a sensor using the template. Once you do that you just add it to your config file under sensors. It will automatically track it for you under % chart in history. Alternatively, you can use inflexdb and grafana and you can just graph the attribute.

Look here it:

Worse is influxdb can’t do data calculations so grafana can plot it for you. For example, I wanted to subtract my indoor and outdoor temperature but it only performs the calculation on one set of data at the time which is a bummer. We need an addon that just does the math.

For anyone that still needs to transition from the custom Life360 integration to the standard one in 0.95+, or is having problems, I just updated the instructions based on recent feedback. Hopefully it helps the transition go a little more smoothly.

When trying to use the new platform with latest version of home assistant, I have this issue

homeassistant    | INFO:homeassistant.util.package:Attempting install of life360==4.0.0
homeassistant    | Failed config
homeassistant    |   General Errors: 
homeassistant    |     - Component not found: life360
homeassistant    | 
homeassistant    | Successful config (partial)

The issue is when I add in the configuration.yaml

life360:

I have removed the old platform…

What I am doing wrong ?

Is that all you have in your config? Nothing about your account or any of the other setup options? If yes, go back and read up on what is required.