From 56977bb35dc0aa6d88239efdd79831e1d9eebed6 Mon Sep 17 00:00:00 2001 From: Rohan Kapoor Date: Sun, 13 Jan 2019 17:15:26 -0800 Subject: [PATCH] Documentation update for splitting gpslogger into a component with a device tracker platform (#8152) * Documentation update for splitting gpslogger into a component with a device tracker platform * Remove redundant line from the device_tracker * Fix stale copy/paste --- .../device_tracker.gpslogger.markdown | 63 +--------------- source/_components/gpslogger.md | 75 +++++++++++++++++++ 2 files changed, 79 insertions(+), 59 deletions(-) create mode 100644 source/_components/gpslogger.md diff --git a/source/_components/device_tracker.gpslogger.markdown b/source/_components/device_tracker.gpslogger.markdown index c512698bedf..05cf381f135 100644 --- a/source/_components/device_tracker.gpslogger.markdown +++ b/source/_components/device_tracker.gpslogger.markdown @@ -1,6 +1,6 @@ --- layout: page -title: "GPSLogger" +title: "GPSLogger Device Tracker" description: "Instructions on how to use GPSLogger to track devices in Home Assistant." date: 2016-11-25 15:00 sidebar: true @@ -11,63 +11,8 @@ ha_category: Presence Detection ha_release: 0.34 --- -The `gpslogger` device tracker platform allows you to detect presence using [GPSLogger](http://code.mendhak.com/gpslogger/). GPSLogger is an open source app for [Android](https://play.google.com/store/apps/details?id=com.mendhak.gpslogger) that allows users to set up a `GET` request to update GPS coordinates. This can be configured with Home Assistant to update your location. +The `gpslogger` device tracker platform allows you to detect presence using [GPSLogger](http://code.mendhak.com/gpslogger/). -## {% linkable_title Configuration %} - -GPSLogger uses long-lived access tokens for authentication. These are setup [under your profile](/docs/authentication/#your-account-profile) and configured in the GPSLogger application on your smartphone as explained below. - -```yaml -# Example configuration.yaml entry -device_tracker: - - platform: gpslogger -``` - -## {% linkable_title Setup on your smartphone %} - -Install [GPSLogger for Android](https://play.google.com/store/apps/details?id=com.mendhak.gpslogger) on your device. - -After the launch, go to **General Options**. Enable **Start on bootup** and **Start on app launch**. - -

- - GPSLogger Settings +

+You must have the [GPSLogger component](/components/gpslogger/) configured to use this device tracker.

- -Go to **Logging details** and disable **Log to GPX**, **Log to KML** and **Log to NMEA**. Enable **Log to custom URL**. - -

- - Logging Details -

- -Right after enabling, the app will take you to the **Log to custom URL** settings. - -

- - Log to custom URL details -

- -The relevant endpoint is: `/api/gpslogger` - -```text -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 `PORT` if 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. -- Add `Authorization: Bearer LLAT` to the HTTP Headers setting (replace `LLAT` with your Long Lived Access Token). -- You can change the name of your device name by replacing `&device=%SER` with `&device=DEVICE_NAME`. - -If your battery drains too fast then you can tune the performance of GPSLogger under **Performance** -> **Location providers** - -

- - Performance -

- -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. diff --git a/source/_components/gpslogger.md b/source/_components/gpslogger.md new file mode 100644 index 00000000000..62cca2a3618 --- /dev/null +++ b/source/_components/gpslogger.md @@ -0,0 +1,75 @@ +--- +layout: page +title: "GPSLogger" +description: "Instructions on how to use GPSLogger to track devices in Home Assistant." +date: 2016-11-25 15:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Presence Detection +ha_release: 0.86 +ha_iot_class: "Cloud Push" +--- + +This component sets up integration with [GPSLogger](http://code.mendhak.com/gpslogger/). GPSLogger is an open source app for [Android](https://play.google.com/store/apps/details?id=com.mendhak.gpslogger) that allows users to set up a `GET` request to update GPS coordinates. This can be configured with Home Assistant to update your location. + +Enabling this component will automatically enable the [GPSLogger Device Tracker](/components/device_tracker.gpslogger/). + +## {% linkable_title Configuration %} + +GPSLogger uses long-lived access tokens for authentication. These are setup [under your profile](/docs/authentication/#your-account-profile) and configured in the GPSLogger application on your smartphone as explained below. + +```yaml +# Example configuration.yaml entry +gpslogger: +``` + +## {% linkable_title Setup on your smartphone %} + +Install [GPSLogger for Android](https://play.google.com/store/apps/details?id=com.mendhak.gpslogger) on your device. + +After the launch, go to **General Options**. Enable **Start on bootup** and **Start on app launch**. + +

+ + GPSLogger Settings +

+ +Go to **Logging details** and disable **Log to GPX**, **Log to KML** and **Log to NMEA**. Enable **Log to custom URL**. + +

+ + Logging Details +

+ +Right after enabling, the app will take you to the **Log to custom URL** settings. + +

+ + Log to custom URL details +

+ +The relevant endpoint is: `/api/gpslogger` + +```text +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 `PORT` if 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. +- Add `Authorization: Bearer LLAT` to the HTTP Headers setting (replace `LLAT` with your Long Lived Access Token). +- You can change the name of your device name by replacing `&device=%SER` with `&device=DEVICE_NAME`. + +If your battery drains too fast then you can tune the performance of GPSLogger under **Performance** -> **Location providers** + +

+ + Performance +

+ +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.