Life360 Device Tracker Platform

I shared the config because thats what you asked for? just going through the logs now.

2019-06-11 17:20:53 INFO (SyncWorker_16) [homeassistant.loader] Loaded life360 from custom_components.life360

2019-06-11 17:20:57 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=device_tracker.life360_lee, old_state=None, new_state=<state device_tracker.life360_lee=not_home;

there’s a few more of the above but about other circle members.

thanks

I was asking someone else. :slight_smile:

So are you saying it’s working now? Could be HA had a problem installing the life360 pypi.org package (maybe a temporary network issue ) but was successful after a restart.

haha, sorry,
No, still not working, i’ve just used a snapshot and gone back to 0.93.2, the other errors in the log was the login error I previously posted.

The “login error” was not a “login” error. It was an error about not being able to import the name “LoginError”, and that was because HA did not install the life360 package correctly.

Are you back to 0.94.x? Have you tried restarting HA to see if it can successfully install the package? Are you seeing any errors (in home-assistant.log) about HA not being able to install the life360 package?

Wait a second. What is this? There should not be anything in /config named life360.

life360 device_tracker 2.10.1 is working in 0.93.2 at the moment and just in the process of updating Hass.io back to 0.94.1.

The life360 custom component should only be in /config/custom_components/life360. If you put anything in /config/life360 it’s going to mess things up.

Seems we may have got to the bottom of it then, I moved the life360 folder out of the custom_components folder as a lazy way of disabling it when I was trying to get rid of the errors. It’s gone now so hopefully with the new install it should be ok. Sorry for wasting your time on something so silly :weary:

all working on 0.94.1 now. Thanks. seems the silly mistake of transferring the updated files led to more and more problems trying to resolve them.

Glad it’s working for you now!

Don’t be too hard on yourself – you’re not the first person to have attempted to “remove” a custom component by moving the folder from /config/custom_components to /config. In the future just rename it, or really delete it. :wink:

Hi Everyone, Im new here so apologies if i dont post in the correct format.

I upgraded to HA 0.94.1 last night and battled for a while to get my trackers working again… still not 100 % sure if it is actually working or not - will check tomorrow when i move around again.

When restarting HA i get this message every time - is it something I should be worrying about?

2019-06-12 01:57:18 WARNING (SyncWorker_9) [life360.life360] Authorization cache file out of date. Reauthorizing

Thanks for any assistance and for a great component

I’m not sure what change fixed it but I’m back up and running. I updated to 0.94.2 and restarted with the future life360 files loaded and my life360 config deleted. I deleted all of the future life360 files in the life360 folder and reloaded the 3 current files from your github. I reloaded my config for life360 and restarted. Back to running the way it should. I must have messed something up somewhere. Glad to have it up and running again. Thank you all for your help!

Hi - when you say reloaded your config - how exactly did you do that - just remove from config.yaml restart and then put it back it the yaml?

Is there any way to check what GPS accuracy prompted a location update? I was sat at home this morning having breakfast when the component (obviously informed by Life360!) decided I wasn’t at home anymore. If there’s a threshold I need to increase it would be good to see what the accuracy was at the time. Thanks!

just as a quick jumping here, thats what I use a folder /config/put_aside for. custom components, or packages, or what have you. If one needs to test the setup without it, move it into the put_aside folder, and restart. if it didnt solve the issue, simply move back…

beats deleting and reinstalling/downloading, especially when using the 50-50 rule :wink:

1 Like

You got it. I cut it from configuration.yaml and pasted into a text editor, restarted, pasted it back into configuration.yaml, and restarted one last time.

I think the only way that warning could happen repeatedly is if there’s a file permission problem. It’s loading the credentials (username & password) and authorization token from the cache file (typically life360.conf), but the credentials don’t match what was read from your life360 configuration. So it tries to delete the file, get new a new authorization token, and then save it to the cache file for next time. But if this is happening, then you should also get a warning about not being able to save the authorization. Hmm. Try manually deleting the cache file and see what happens.

Thanks I’ll give that a try

Hi Phil,

Thanks - are you referring to the entire python cache folder under custom components, or just the single file created in the same folder as the config.yaml? If the former - i’ve deleted it a few times, but doesnt seem to change the error. No error ever comes up that says there is a problem saving the authorization.

Also cant recall seeing this error on HA 0.93 though, so unless something changed with permissions in 0.94

I’m referring to the file that is by default named life360.conf and should be in the same folder as configuration.yaml.

As a test, rename it to something else. Then restart HA a couple of times to see what happens. If the error goes away then I guess it was some (file permission???) fluke. But if you keep seeing the warnings, then take a look at the values in the file. It’s a text file formatted in JSON. E.g., it will look something like this:

pi@raspberrypi:/home/homeassistant/.homeassistant $ sudo cat life360.conf | jq .
{
  "credentials": {
    "password": "PASSWORD",
    "username": "USERNAME",
    "api_token": "cFJFcXVnYWJSZXRyZTRFc3RldGhlcnVmcmVQdW1hbUV4dWNyRUh1YzptM2ZydXBSZXRSZXN3ZXJFQ2hBUHJFOTZxYWtFZHI0Vg=="
  },
  "authorization": "Bearer AUTHORIZATION"
}

Of course, make sure PASSWORD & USERNAME are correct. Also see if the AUTHORIZATION string changes each time.

Oh, also check what was originally in the life360.conf file. If it looks just like this:

Bearer AUTHORIZATION

Then that is indeed out of date, and it would be interesting to know that’s what it looked like.