This is a custom version of the Home Assistant built-in GPSLogger integration.
It extends the built-in integration in ways that make sense but are no longer accepted.
Specifically, it allows additional attributes, especially last_seen
,
which is crucial when combining entities from this Device Tracker integration with ones from other integrations,
e.g., via my Composite Device Tracker integration.
Also, last_seen
is important when dealing with packets received out of order from the corresponding Android app,
e.g., due to network delays.
With HACS
You can use HACS to manage the installation and provide update notifications.
-
Add this repo as a custom repository. It should then appear as a new integration. Click on it. If necessary, search for "gpslogger".
https://github.com/pnbruckner/ha-gpslogger
Or use this button:
-
Download the integration using the appropriate button.
Manual
Place a copy of the files from custom_components/gpslogger
in <config>/custom_components/gpslogger
,
where <config>
is your Home Assistant configuration directory.
NOTE: When downloading, make sure to use the
Raw
button from each file's page.
Please see the standard GPSLogger documentation for basic set up.
The following should be added to the HTTP Body setting in the Android app (in addition to what the standard docs suggest):
&last_seen=%TIME&battery_charging=%ISCHARGING
Note that %TIME
provides the phone's time in UTC.
If you'd rather have the time specified in the phone's local time zone, use %TIMEOFFSET
instead.