Life360 Device Tracker Platform

I haven’t created a PR yet. I’m not even 100% sure I will (although I’m definitely leaning that way.) I removed it because I predicted it wouldn’t be looked at kindly. I assume it will be a rough road getting this through in the first place, and didn’t think this feature was worth it. I still have it in my custom composite tracker, so it’s still available that way.

I suppose you can go to the repo and at the top click on Watch and select the Watching option. Not 100% sure what this does. Just an FYI, though … I might make significant changes before submitting a PR. You’re, of course, welcome to use this, but I’m not going to be focusing on keeping it working, or worrying about “breaking changes”, because the focus is getting it ready as best I can for submission. If you do follow along, however, and run into any unexpected problems, by all means, let me know.

Well this touches on the shakiest part of this whole effort. This API is not officially documented, or even supported, to my knowledge, by Life360. It was reversed Engineered by someone in the open source community, which is what this is all based on. Yes, that key can change, or the whole API might change significantly, or become completely unavailable, at any time. I’m certainly not in a position to do anything about that. And I’m afraid to even try, because if I bring this to their attention, they might decide to not only not support it, but shut it down instead. Who knows. Maybe balloob will consider talking to Life360 since he represents this entire project, which might mean more to Life360.

custom_updater is working really weirdly for me. Not only is it failing to track the Life360 component (but it OCCASIONALLY shows up following a reboot), but I can’t click the “check” or “update” buttons!

Hi, since last update to 0.92 Life360 is no longer working. I am getting an error:
Integration life360 not found when trying to verify its device_tracker platform
Anyone have an idea why?

Trying to keep up with all the structural changes is bad enough, but trying to keep up with custom_updater’s unique and different requirements is worse.

Please try making sure you have the latest custom_updater, and restart HA.

Then manually run the custom_updater.install service specifying:

{"element": "device_tracker.life360"}

Then afterwards run the custom_updater.check_all service. (You may even have to restart HA before sensor.custom_component_tracker is updated correctly.)

That should work. Let me know how that goes.

Please make sure you’re using at least version 2.9.5 (the latest is actually 2.9.6.)

The (hopefully) good news is, I’m forging ahead with submitting this as a new standard integration. I haven’t made the PRs yet, but I hope to soon. Then hopefully the review process won’t be too bad, and maybe we can see this in the 0.94 release. :crossed_fingers:

5 Likes

@daneboom @ericlamer

I just tried with 0.92.0. I removed custom_components/life360 to start clean. I made sure I had the latest custom_updater (4.2.19.) Then I used custom_updater.install to install element “device_tracker.life360”. That worked fine. Then I restarted HA and life360 seemed to work fine.

FWIW, the “Integration life360 not found” error probably means you’re not using the latest & greatest version of life360.

1 Like

how do you get the latest custom_updater

You don’t have to use custom_updater to use the life360 custom component/integration. That is just one option. See these installation instructions for how to install life360 either via custom_updater (which links to instructions on how to install custom_updater) or manually.

1 Like

Thanks for this, Phil. I get:-

Error loading custom_components.life360.device_tracker. Make sure all dependencies are installed

Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/homeassistant/loader.py", line 183, in _load_file module = importlib.import_module(path) File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1006, in _gcd_import File "<frozen importlib._bootstrap>", line 983, in _find_and_load File "<frozen importlib._bootstrap>", line 962, in _find_and_load_unlocked ModuleNotFoundError: No module named 'custom_components.life360.device_tracker'; 'custom_components.life360' is not a package

Thank you for your input, re-loaded Hassio .92 and so far all good with life360

Thanks - I rebooted hass and now - inexplicably - it works.

(Prior to rebooting I’d deleted all trace of Life360 from my system, and was planning on calling the install service again once it came back up. Weirdly, I didn’t need to - when it came back up somehow custom updater knew I wanted the life360 component and had it ready!)

1 Like

I just followed [pnbruckner] instructions

Thank you Phil!

PR for documentation submitted.

Note that for users of the custom component this will represent several breaking changes. I already commented on a few of those above. A more complete list can be seen here, or by reviewing the proposed documentation page.

2 Likes

PR for code submitted. And the fun begins! :smile:

5 Likes

Hi Phil
Upgraded to 0.92 and it broke life360, so reinstalled from the last code copying the life360 folder into custom_components folder - this after I went back to my previous version of HA ( 091.4)
Then tried to follow the instructions to install the custom_updater component, but found the instructions are not right: on the link ( https://github.com/custom-components/custom_updater/wiki/Installation) says to copy the custom_updater.py to a new folder called custom_updater. It turns out on the Zip file, there is no file with that name ( there is a folder, yes)
anyway, I run the custom_updater install service, then the custom_updater.check_all and restarted HA
I’m not sure if it has done anything, as I still getting a warning saying: “You are using a custom component for life360 which has not been tested by Home Assistant”
I’m scared of upgrading back to 0.92 as I suspect it will fail again
Any suggestions?

I can’t comment about custom_updater. I didn’t write it.

You don’t have to use custom_updater to install life360. You can, but you don’t have to. There are manual installation instructions for life360 if you’d rather do that.

So you say you upgraded to 0.92 and life360 broke. Can you be more specific? What broke & how? Are there error messages? If so, can you post them? Are you using the latest version (2.9.5, or at least 2.9.4)?

I’ve gotten some reports of life360 not working after upgrading to 0.92, but none of them have been proven to be a real issue. Either it was an old version of life360, or it wasn’t installed correctly, or something like that. I’m happy to try and help, but I’ve tested it extensively with many versions of HA, including 0.92.0. I even went through an experiment today where I installed it on 0.91.4, then upgraded to 0.92.0, and I’ve yet to find where it doesn’t work, as long as it’s at least version 2.9.4.

Phil
I’m impressed: this was a really quick reply!
I did reinstall life360 a couple of weeks back, as I was worried a new version would break it, so it couldn’t be too old, I replaced the old system that had two .py files to just one, and it was working until I upgrade to 0.92
After the upgrade HA could not report any tracking data
Unfortunately, I did revert to the previous snapshot, so all the logs are now gone
As I have reinstalled everything , now is running on the last release ( 2.9.5) - but I’m still getting the warning message about life360 -not sure if is relevant or not
Is there any way of testing it - before the upgrade to 0.92?
It’s really painful to revert to an older snapshot, but if that is the only way of testing it…

Sorry I cannot provide a lot of information
Let me know , and I can try again

Javier

All the work I did to make it work with 0.92 started with version 2.9.1 on 4/19, and I didn’t get it completely right until version 2.9.4 I released on 4/22. So anything older than 4/22 (i.e., older than 2.9.4) will probably fail on HA 0.92.0+.

That’s good! :slight_smile:

HA will always warn about custom components/integrations. We just have to live with that. It’s actually a good sign because it’s at least finding it! :slight_smile:

You can’t test if it will work with 0.92 unless you install 0.92. But I’ve done that and I know it will work. I understand the pain, but I can’t see anyway to avoid it if you want to upgrade. If you do upgrade to 0.92, and you still run into problems, let’s diagnose it and fix it. I would recommend at least setting logger to debug. That way you should be able to see if/what life360 is doing in home-assistant.log.