The K and R are uppercase for the account
Do I need to create another google account lower case only?
The K and R are uppercase for the account
Do I need to create another google account lower case only?
No, you just need to name the cookies file with all lower case letters. So:
.google_maps_location_sharing.cookies.59kxxxxxxrxxx_gmail_com
Live and learnâŚA > a
Working fine nowâŚ
Good points, Iâll try again without logging out and see if there is a checkbox.
Thanks Paul, All works now, I guess that was the trick. Didnât see anything on staying logged in, but didnât log out and I can see every status now, itâs pretty nice showing battery, address, if charging, lat/long etc.
Iâve found that âGet cookies.txt LOCALLYâ (the extension the Google Maps doc page recommends for Chrome) also works on Microsoft Edge. I just gave it a try. Itâs a bit easier to use than what I suggested above. Here is a procedure I wrote up for it (which is also a bit more detailed than the one above.)
[email protected]
, the resulting cookie file name would be: .google_maps_location_sharing.cookies.this_is_my_email_address_gmail_com
Be careful that there is no file extension (such as .txt).@pnbruckner Thanks for your clear explanation.
Before trying this out, I first wanted to set up the actual sharing between my family members. Seems (if Iâm not mistaken) that location sharing longer than 24 hours is only possible for people +18 years old.
Just found an integration Geofency but did not have time to try it yet.
I was using Life360 (which was working well for me at the time). I stopped using it based on their data practices. Switched to HA app tracking, itâs ok but no matter what settings I change on my phone, the location (sometimes) needs to phone awake to change. This for me is important for location based automations that require an update within 5 seconds or so.
So I thought Iâd try the Google Maps method. I have tried numerous times, but cannot get at the stage where the known_devices yaml is created.
I have followed the instructions, but cannot figure out what is going on. I have created a fresh Gmail account for the integration and where other existing accounts connect to.
I can see the shared device account on Google Maps android app (signed in with the new account).
Take a look at the following. Iâve written some detailed instructions that have worked for others that had no luck previously getting it working. At some point I hope to update the official Google Maps integration documentation accordingly.
Thanks, those are the instructions I previously found and believe to have followed. Iâve literally tried about 6-7 times, checking all configs, spellings, etc. Even tried to manually create the known devices yaml, but it doesnât populate.
Itâs the ânew email accountâ, that should be the one logged on to, to extract the cookies info, right? I have an existing account which I shared the location of, to that new account.
Also in the configuration yaml, the email should be typed with regular characters and not slugified?
If you manually created a known_devices.yaml
file in your configuration directory, then restarted HA, it should create restored entities for all the items in that file, assuming it is filled in correctly (and assuming the device_tracker
component starts due to other configs.) FWIW, I wouldnât recommend doing this. I donât think it provides any useful data points.
Assuming you created a new Gmail (not just any email) account for the Google Maps integration, then yes, that is the account you need to get a cookies file for.
Correct, in the YAML config, use the exact email address. The Google Maps integration will slugify it to determine the name of the corresponding cookies file.
Hmm yes, I seem to be doing everything correctly.
The system logs donât show anything. Is there anything that can be checked? If not, Iâll have to stick with the HA app for tracking for the time being.
Try turning on debug, then looking in the logs for anything from the google_maps integration:
logger:
logs:
homeassistant.components.google_maps: debug
Iâm assuming you havenât seen any errors or warnings?
Still no error showing.
Also tried using Chrome browser. Not tried Firefox yet.
Also look for debug messages. It could be rejecting location data for a couple of different reasons that is only indicated in debug messages.
FYI, debug messages donât show up on the Settings â System â Logs page by default (even when they are enabled.) You have to click LOAD FULL LOGS. Then type google_maps into the âSearch logsâ box.
If that doesnât tell you anything useful, then you could also enable debug for locationsharinglib. That normally outputs a LOT of messages.
logger:
logs:
locationsharinglib: debug
homeassistant.components.google_maps: debug
Ok, so I think I finally have it working.
It seemed it was down to the sharing of location itself. Although I did check via Google Maps app (logged in with the new account) that I could see the shared one, I couldnât actually see the same when I logged in via the browser. I go via a VPN device on my devices. I disabled that and tried again, this time the shared device was showing in the browser.
Ran the steps again and it seems to be working. Letâs hope it continues (and/or Google doesnt go the same way as Life360).
Thanks for the advice (and for the work on Life360)
Separately, is it possible to change the entity name to something more meaningful?
You canât change the entity ID, but you can change the âfriendlyâ name. To do that you need to edit known_devices.yaml (in the same directory as configuration.yaml.) On the next HA restart, you will see the updated name(s).
FWIW, Iâve started work on a major update of the Google Maps integration. No promises. Iâve had much simpler changes rejected, soâŚ
Thanks for that.
There must be something on my phone thatâs not waking the GPS on time. Even with the Google Maps integration, thereâs a significant enough delay for automations not to work on time.
I have automations to trigger when arriving in the home zone - front lights etc. But barely triggers when Iâve already been on the driveway for 5-10 seconds (if at all) Even expanded the zone a little.
Anyway, Iâll see to post this as a separate issue as itâs not directly integration related per se.
I have been trying to get this working with no luck. I have tried both extensions in Edge and âGet cookies.txt LOCALLYâ on chrome. Created a file with the name as noted in step 10 and placed it in config. None of the three seem to take. One quick question⌠Step 12 confuses me a little. Close the browser, but do NOT log out. Can you elaborate any?
My HA is on a different device. Am I not understanding correctly?
Basically, if the account gets logged out anywhere, it can invalidate the cookies you just grabbed. So, in the incognito/inPrivate browser window that youâve logged into Google Maps on, and grabbed the cookies, do NOT sign out of Google Maps. Just simply close that browser window. Also, do NOT sign out of that Google Maps account anywhere else (any other browser, etc.)
At least thatâs the current understanding. From what I can tell, though, itâs all a bit of guesswork.
Iâm sorry, Iâm not following this part. If you mean youâre using one computer to grab the cookies file, but HA runs on a different computer, that is not a problem. Iâve done that myself.