gpslogger device tracker platform allows you to detect presence using GPSLogger. GPSLogger is an open source app for Android that allows users to set up a
GET request to update GPS coordinates. This can be configured with Home Assistant to update your location.
Since release 0.77, we now have long-lived access tokens. These are setup under your profile.
# Example configuration.yaml entry device_tracker: - platform: gpslogger
To integrate GPSLogger in Home Assistant, add the following section to your
# Example configuration.yaml entry device_tracker: - platform: gpslogger password: !secret gpslogger_password
Install GPSLogger for Android on your device.
After the launch, go to General Options. Enable Start on bootup and Start on app launch.
Go to Logging details and disable Log to GPX, Log to KML and Log to NMEA. Enable Log to custom URL.
Right after enabling, the app will take you to the Log to custom URL settings.
Log to custom URL details
The relevant endpoint is:
https://YOUR.DNS.HOSTNAME:PORT/api/gpslogger? latitude=%LAT&longitude=%LON&device=%SER&accuracy=%ACC &battery=%BATT&speed=%SPD&direction=%DIR &altitude=%ALT&provider=%PROV&activity=%ACT
Add the above URL after you modified it with your settings into the URL field. Remove the line breaks as they are only there to make the URL readable here.
- It’s HIGHLY recommended to use SSL/TLS.
- Use the domain that Home Assistant is available on the internet (or the public IP address if you have a static IP address). This can be a local IP address if you are using an always on VPN from your mobile device to your home network.
- Only remove
PORTif your Home Assistant instance is using port 443. Otherwise set it to the port you’re using.
- For Home Assistant only the above URL, as written, will work - do not add, remove, or change the order of any of the parameters.
0.77+ If you are using Long-Lived access tokens, then add
Authentication: Bearer LLATto the HTTP Headers setting
<0.77 Make sure to include your API password if you have configured a password. Add
&api_password=YOUR_PASSWORDto the end of the URL.
- You can change the name of your device name by replacing
If your battery drains fast then you can tune the performance of GPSLogger under Performance -> Location providers
A request can be forced from the app to test if everything is working fine. A successful request will update the
known_devices.yaml file with the device’s serial number.