mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Update Google Maps Device Tracker Instructions (#9918)
* Update Google Maps Device Tracker Instructions
* ✏️ Tweak
This commit is contained in:
parent
d070e10218
commit
f89ac0af1b
@ -14,9 +14,12 @@ The `google_maps` platform allows you to detect presence using the unofficial AP
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You first need to create an additional Google account and share your location with that account. This platform will use that account to fetch the location of your device(s). You have to setup sharing through the Google Maps app on your mobile phone. You can find more information [here](https://support.google.com/accounts?p=location_sharing).
|
You first need to create an additional Google account and share your location with that account. This platform will use that account to fetch the location of your device(s).
|
||||||
|
|
||||||
This platform will create a file named `.google_maps_location_sharing.cookies` extended with the slugified username where it caches your login session.
|
1. You have to setup sharing through the Google Maps app on your mobile phone. You can find more information [here](https://support.google.com/accounts?p=location_sharing).
|
||||||
|
2. You must use `mapscookiegettercli` to get a cookie file which can be used with this device tracker. See more information [here](#maps-cookie-getter)
|
||||||
|
3. Save the cookie file to your Home Assistant configuration directory with the following name: `.google_maps_location_sharing.cookies.` followed by the slugified username of the NEW Google account.
|
||||||
|
- For example: if your email was `location.tracker@gmail.com`, the filename would be: `.google_maps_location_sharing.cookies.location_tracker_gmail_com`.
|
||||||
|
|
||||||
<div class='note warning'>
|
<div class='note warning'>
|
||||||
|
|
||||||
@ -32,7 +35,6 @@ To integrate Google Maps Location Sharing in Home Assistant, add the following s
|
|||||||
device_tracker:
|
device_tracker:
|
||||||
- platform: google_maps
|
- platform: google_maps
|
||||||
username: YOUR_USERNAME
|
username: YOUR_USERNAME
|
||||||
password: YOUR_PASSWORD
|
|
||||||
```
|
```
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
@ -48,4 +50,25 @@ max_gps_accuracy:
|
|||||||
description: Sometimes Google Maps can report GPS locations with a very low accuracy (few kilometers). That can trigger false zoning. Using this parameter, you can filter these false GPS reports. The number has to be in meters. For example, if you put 200 only GPS reports with an accuracy under 200 will be taken into account - Defaults to 100km if not specified.
|
description: Sometimes Google Maps can report GPS locations with a very low accuracy (few kilometers). That can trigger false zoning. Using this parameter, you can filter these false GPS reports. The number has to be in meters. For example, if you put 200 only GPS reports with an accuracy under 200 will be taken into account - Defaults to 100km if not specified.
|
||||||
required: false
|
required: false
|
||||||
type: float
|
type: float
|
||||||
|
scan_interval:
|
||||||
|
description: The frequency (in seconds) to check for location updates.
|
||||||
|
required: false
|
||||||
|
default: 60
|
||||||
|
type: integer
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
### Maps Cookie Getter
|
||||||
|
|
||||||
|
You must run the [`mapscookiegetter`](https://mapscookiegettercli.readthedocs.io/en/latest/) tool to get the cookie file from a computer with a Web Browser. To install, your computer must have Python 3 and PIP installed:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
pip3 install mapscookiegettercli
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run the command:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
maps-cookie-getter
|
||||||
|
```
|
||||||
|
|
||||||
|
This will open up a browser window for you to log-in to the NEW Google Account (the one you are sharing the location with, not your normal account). After logging in, the program will save the pickled cookie file `location_sharing.cookies` in the same directory as you ran the command from. Copy this to your Home Assistant configuration directory and rename as described above.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user