Linking Life360 and OH2 gpstracker [a simple script]

@Dave_Thomas thank you so much for this. This was a million times easier to set up and work with than “Life360 and MQTT”. These are the steps I took to get this setup and running.

  1. SSH into my openhabianpi using putty. I created a new script sudo nano /etc/openhab2/scripts/life360_presence.sh
  2. Paste in @Dave_Thomas’s script from above with some minor changes.
    2.1 change all occurrences of ggrep to grep there are two
    2.2 change the IP address http://192.168.0.120:8080/gpstracker/gpslogger >/dev/null to http://127.0.0.1:8080/gpstracker/gpslogger >/dev/null
  3. Add execute permissions to the script sudo chmod +x /etc/openhab2/scripts/life360_presence.sh
    3.1 You can test the script /etc/openhab2/scripts/life360_presence.sh
  4. Now we want to run the script on a timer. I set mine to run once a minute.
    4.1 Open crontab crontab -e and add the line */1 * * * * /etc/openhab2/scripts/life360_presence.sh >/dev/null 2>&1. Then exit and save.
    4.2 Restart crontab service cron reload
  5. Go into the paper UI and install the “GPSTracker Binding”
  6. Once the binding is installed you should automatically see each member of your family circle from life360 (They will show as GPS Tracker initials) appear in your inbox.
  7. Now you can work with this data the same as you would with the standard “GPSTracker Binding”

Thank you again @Dave_Thomas I have you give you all the credit for getting this working so easily for me.

3 Likes