Replacing Life360

I am currently working to replace Life360 with Home Assistant and have made major headway. I am actually probably 85% of the way there using Node-Red. One of the last hurdles I have currently is does anyone know of a way to display a map and put sensors on the map the will dynamically move? IE The mapping feature from Life360. It’s the last piece of the puzzle but I haven’t found anything that does this yet. The front-end map will show the current location but it doesn’t update as the sensor moves and that’s the part I’m having an issue with.

Below is a front end button card I built specifically to display locational info.

It should update as the entity moves. What type of entity are you using, and how often does it update in Home Assistant as its source (phone, whatever) moves?

I suspect your issue is the updating of the entity, not the updating of its position on the map.

It’s using the device_tracker HA Companion App.

Well, like I said, the issue is how often that device_tracker entity updates, not the map. Whether you use the default Map in the side bar, or use a Map card, it should update as the entities shown on it update.

Have you checked how often the device_tracker entity updates, and taken steps to improve the frequency of updates?

I personally can’t help you with that because I don’t use it. I use three other types of HA device_tracker integrations: Google Maps, GPSLogger & Life360 (all of which using custom versions I’ve created.) I can tell you that the icons on the map move as the entities update. And, very recently, I’ve gotten the Life360 entities to update just as quickly as they do in the Life360 app.

I thought the life360 integration is dead, or is that the custom part you are referring too?

I’m reviving it. It’s not ready for HACS yet. More details starting here:

4 Likes

It’s “HACS installable” now. If anyone would like to try it, the custom integration is available in this repo:

https://github.com/pnbruckner/ha-life360

Beta version 0.5.0b5 is the latest. Documentation can be found here:

ha-life360/README.md at new-api · pnbruckner/ha-life360 (github.com)

4 Likes

This is great news, thanks for posting! I came here looking for the latest/greatest replacement for Life360 since the one within HA was removed. Just finished up getting the HACS version all setup. Thanks!

2 Likes

Hello! I’m a beginner. I’m trying to get the Life360 HA integration to update the location data more frequently. I want to automate gate opening with it, approx. Updates every 45 seconds. This means for me, if I arrive home at a bad pace, I stand in front of the gate for 45 seconds. How can I fix this problem? The gps accuracy is set to maximum, I don’t want to set the radius of the zone larger. I have 2 dogs and the postman is the old one…:smiley:

You can try using the life360.update_location service.

A simple way might be to define a larger zone around your home (i.e., with the same coordinates as zone.home, but with a larger radius.) Then, when the Life360 entity enters that larger zone (but not from the home zone, which would mean you’re leaving), trigger an automation that calls the service. You could even have it call the service, say every 50 seconds, while the entity is still in the larger zone (and, of course, not in the home zone.)

E.g., maybe something like this:

- alias: Life360 Me Arrive Home
  unique_id: life360_me_arrive_home
  trigger:
    - platform: state
      entity_id: device_tracker.life360_me
      to: Large Zone
      not_from: home
  action:
    - repeat:
        while:
          - condition: state
            entity_id: device_tracker.life360_me
            state: Large Zone
        sequence:
          - service: life360.update_location
            target:
              entity_id: device_tracker.life360_me
          - wait_for_trigger:
              - platform: state
                entity_id: device_tracker.life360_me
                from: Large Zone
            timeout: 50

So, when you enter the larger zone, but not from the home zone (i.e., you’re arriving home), it will call the service that should cause your Life360 tracker entity to update more frequently (typically every 5 seconds) for about a minute. Then it will wait until you leave the larger zone (typically when you enter the smaller home zone, or even if you should turn around and leave the larger zone before getting to the home zone.) It will wait up to 50 seconds. If you’re still in the larger zone after 50 seconds, it will call the service again (to try to keep the entity updating frequently.) Once you do leave the larger zone (e.g., arrive in the home zone), the automation will finish.

I know this was awhile ago but I had trouble finding the access_token. Eventually I did. Make sure you search for access_token, THEN you are looking for: “DATADOG_CLIENT_TOKEN”

Just remember, using a browser to capture the access token is only needed if you can’t use your Life360 username & password with the HA integration (which is typically when you’ve verified your phone number in the Life360 app.) If you can use the username & password, then that is much simpler.

Thank you very much. I try. I’ll let you know if I have a problem. If I want more frequent updates, can I reduce the 50 to 10 seconds for example? I would like to reduce the zone to 60 meters if possible, so open the gate when I’m standing there…

From what I’ve observed, when you call the service, the entity will start updating itself more frequently (typically every 5 seconds, where normally it updates much less frequently, especially when the device is not moving), and it will do so for about one minute. So, calling the service again in 10 seconds will have no effect, since the entity is already updating frequently and will do so for about another 50 seconds.

Note that the way this works is, when you call the service, the integration sends a request to the Life360 server, which then relays the request to the Life360 software on the actual device. Assuming that request gets through ok, the Life360 software on the device will start sending location updates more frequently than normal to the Life360 server, which then becomes available when the HA integration polls the Life360 server (which it always does every 5 seconds.)

So, it’s not the HA integration that does anything more frequently after the service is called. It’s just that it gets more frequently updated location information from the server for the device during this short time period.

I’m sad. I looked at the HA map while driving, and saw that approx. It only updates every 45-50 seconds…and I went pretty fast.

  • alias: Life360 Me Arrive Home
    unique_id: life360_vegvari_oszkar_arrive_home
    trigger:
    • platform: state
      entity_id: device_tracker.life360_vegvari_oszkar
      to: Otthon 2
      not_from: Otthon
      action:
    • repeat:
      while:
      - condition: state
      entity_id: device_tracker.life360_vegvari_oszkar
      state: Otthon 2
      sequence:
      - service: life360.update_location
      target:
      entity_id: device_tracker.life360_vegvari_oszkar
      - wait_for_trigger:
      - platform: state
      entity_id: device_tracker.life360_vegvari_oszkar
      from: Otthon 2
      timeout: 50

This is how I tried to create an automatism. I can’t save it.
Message malformed: extra keys not allowed @ data[‘0’]

If you want help with an automation, you need to make sure it is properly formatted.

Thanks. I’m trying…

Edit the post, select all the text, and click this button:

image

which is labeled “Preformatted text”, or simply type Ctrl-E.