GPSLogger smart home integration, free and open source

Turn phones running the GPSLogger app into GPS trackers: position, presence, battery.
This integration turns Android phones running the free, open-source GPSLogger app into GPS trackers in Gladys: position, distance from home, home presence, battery, speed. You can then react to arrivals and departures in your scenes and follow every phone from the dashboard.
How it works
GPSLogger calls a URL each time it logs a position. Gladys offers two URLs:
| URL | When to use it |
|---|---|
Local (http://…/log) | The phone reaches Gladys on your home network (Wi-Fi) or through a VPN. Nothing leaves your home. |
| Cloud (Gladys Plus URL) | The phone logs from anywhere (4G/5G). Requires a Gladys Plus subscription. |
You can configure one of them, or both in two GPSLogger profiles. Each phone becomes a tracker in the Discovery tab of the integration as soon as its first position arrives: click Add to create its device.
1. Configure the integration
In Gladys, open Integrations → GPSLogger → Configuration:
- Enable the local receiver (on by default): Gladys publishes an HTTP port
on your network for GPSLogger. The exact local URL is written in the
"Local URL" block of the page (
http://<gladys address>:<port>/log). - Access token (optional, recommended): a long random string. Every
request must then carry
token=<value>, or theAuthorization: Bearer \<value>header. - Home radius: how close to the house location a phone must be to be at home (150 m by default). The house location is the one set in Gladys (Settings → Houses): Gladys asks for access to it when you install the integration. Without a located house, distance and presence stay empty.
- Low battery threshold and Tracker lost after: used by the scene triggers below.
For the cloud URL, paste your Gladys Plus Open API key in the "Gladys Plus webhooks" block. Then press Show the GPSLogger URLs: it shows the local URL, the cloud URL and the parameters to send.
2. Configure GPSLogger on the phone
-
Install GPSLogger (F-Droid, GitHub or Google Play).
-
Open Logging details → Log to custom URL, and enable it.
-
URL: the local or cloud URL shown by Gladys.
-
HTTP method:
POST. HTTP body:device=%DEVNAME&lat=%LAT&lon=%LON&acc=%ACC&alt=%ALT&spd=%SPD&dir=%DIR&batt=%BATT&ischarging=%ISCHARGING&time=%TIME&prov=%PROVAdd
&token=YOUR_TOKENif you set an access token. With theGETmethod, append the same parameters to the URL after a?. -
HTTP headers:
Content-Type: application/x-www-form-urlencoded. -
Set a distinct device name on each phone (General options → Device name): it is the name of the tracker in Gladys, and its identifier. Changing it later creates a new tracker.
-
Choose the logging interval (Performance): every 1 to 5 minutes is a good balance with the battery.
A phone already configured for the Home Assistant GPSLogger integration
(latitude=…&longitude=…&device=…) works as is: both parameter styles are
accepted.
Use the Send a test position button of the Configuration page to check everything without a phone.
3. The devices
Each tracker exposes these features (read-only):
| Feature | Unit | Note |
|---|---|---|
| Position | text | "latitude, longitude" |
| Latitude/Longitude | degree | |
| At home | 0/1 | inside the home radius (with a 25 % exit margin) |
| Distance from home | km | |
| Accuracy | m | a position less precise than 1 km never changes "At home" |
| Altitude | m | |
| Speed | km/h | GPSLogger sends m/s, converted |
| Direction | degree | |
| Battery | % | |
| Charging | 0/1 |
The badge of each device tells how its last position arrived: local, cloud, or unreachable once the tracker is lost. The "Prefer the local connection" toggle of the Configuration page has no effect: the phone decides which URL it calls.
4. Scenes
Triggers (category Integrations of the scene editor), each with an optional tracker filter:
| Trigger | When | Variables |
|---|---|---|
| Position received | every position | name, latitude, longitude, accuracy, speed, battery, distance, map link |
| Arrived home | the tracker enters the home radius | name, latitude, longitude |
| Left home | the tracker leaves the home radius | name, latitude, longitude, distance |
| Phone battery low | the battery drops below the threshold (once per discharge) | name, battery |
| Tracker lost | no position for the configured delay (once) | name, minutes since the last position |
Actions:
- Get a tracker position: last position, battery, distance from home, at home, minutes since the update and an OpenStreetMap link.
- Distance between two trackers: in km and m.
- Distance to a place: distance between a tracker and coordinates, and whether it is within a radius.
All three return found: false when a position is unknown: use a condition on
it in your scene.
Example: when "Arrived home" for Alice's phone, if the alarm is armed, disarm it and send "Welcome home, {{triggerEvent.data.device_name}}".
5. Dashboard widgets
- GPS trackers: every phone at a glance (home or away, distance, battery, last update); a tap shows the details and an OpenStreetMap link.
- GPS tracker: one phone in detail, with live tiles (distance from home, battery, speed), its status and a map button. Pick the phone in the widget settings.
Privacy and security
- Positions are stored only in your Gladys (the device states, and
trackers.jsonin the integration data folder for the last position). - The local receiver only accepts positions; the integration validates them (token, coordinates). Set an access token if your network is shared.
- Through Gladys Plus, the URL itself is a secret: do not share it. The access token adds a second check.
- Forget a tracker removes a phone from the integration (delete its device in Gladys too).
Troubleshooting
- No tracker in Discovery: check the GPSLogger log (the custom URL
section shows the HTTP answer).
401: wrong or missing token.400: the device name or the coordinates are missing. - Local URL unreachable: the phone must be on the same network as Gladys (or on a VPN), and the "Enable the local receiver" option must be on.
- Cloud URL missing: link Gladys Plus in the "Gladys Plus webhooks" block, then press Show the GPSLogger URLs again.
- "At home" stays empty: set the location of your house in Gladys.
Configuration settings
These are the settings GPSLogger asks for in its configuration screen in Gladys.
| Setting | Type | Required | Description |
|---|---|---|---|
| How it works | section | No | Install GPSLogger on each phone, then enable "Log to custom URL" (HTTP method POST). Every phone becomes a tracker in the Discovery tab once it has sent its first position. Use one distinct device name per phone (the device=%DEVNAME parameter). |
| Local URL (home Wi-Fi or VPN) | section | No | In GPSLogger, set the URL to http://{{gladys_host}}:{{port:gpslogger}}/log - it only works when the phone can reach Gladys on your network. Use the cloud URL (Gladys Plus) to log from anywhere. |
| Enable the local receiver | boolean | No | Publishes an HTTP port on your network for GPSLogger. Turn it off if you only use Gladys Plus. |
| Cloud URL (Gladys Plus) | section | No | To receive positions from anywhere, paste your Gladys Plus Open API key in the "Gladys Plus webhooks" block, then press "Show the GPSLogger URLs" below and copy the cloud URL into GPSLogger. |
| Access token (optional) | secret | No | When set, every request must carry token=<value> (or the header Authorization: Bearer <value>). Recommended. |
| Home radius (m) | number | No | A tracker closer than this to the house location set in Gladys is at home. |
| Low battery threshold (%) | number | No | |
| Tracker lost after (min) | number | No | Without any position for this long, a tracker is shown as unreachable and the "Tracker lost" trigger fires. |
How to install GPSLogger in Gladys
- In Gladys, open Integrations: GPSLogger appears in the catalog, next to the native integrations, with a community badge.
- Click Install. Gladys pulls the Docker image (
ghcr.io/gboulvin/gladys-gpslogger:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration). - Open the Configuration screen of the integration, fill in the settings, and save.
- You can also install it directly from its repository URL: https://github.com/gboulvin/Gladys-GPSLogger.
GPSLogger requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.
Not running Gladys yet? It is free and open source: follow the installation guide to get started.
About external integrations
GPSLogger is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by gboulvin, not by the Gladys core team.
- Browse all integrations, native and community
- Build and publish your own external integration
- Source code on GitHub — source of this documentation