My google device trackers have stopped working after being fine for many, many months so I guess it is something to do with the recent changes and cookies?
However, I have searched the forum and read and re-read the docs but I cannot for the life of me work out the detail of what I have to do.
I have got the Chrome extension (cookies.txt) and exported my cookies but which one do I need??? I have hundreds!
The docs are incredibly vague saying simply…
Save the cookie file to your Home Assistant configuration directory
I’m not ungrateful (on the contrary, I’m very grateful whenever anyone tries to help) but to install another browser just to get the cookie does seem a bit heavy handed!
I already installed Chrome purely because HA works better on it than it does on Edge. Stop laughing at the back, I am a very happy and satisfied Edge user.
In fact given the whole ethos of HA around privacy and data ownership I often find myself amused at how much of Google’s technology is used to support HA.
Indeed, one of the main selling point of Nabu Casa seems to be how it seamlessly integrates Google and Amazon services into HA. I’m not knocking it, it’s just that the irony amuses me.
But I digress…
Back to Google Location cookies… There must be a simpler solution?
However, not sure why you’d have hundreds of cookies. You need to be logged in to chrome as the user you set up to share locations with, not as your normal user. So, unless you use that account regularly it won’t have hundreds of cookies.
I tried that but I didn’t seem to be able to use the cookies.txt extension.
And yes, that is a fair point. As I said I only use that account for HA so for some reason I logged onto Chrome using that account to keep it separate form my MS account. I have clearly over time, drifted onto other websites too. I suppose I could simply clear my cache, logon to Google again and start from there. Seems sensible.
So, is it literally the cookie that appears when logging on to Google or is there a particular part of Google that needs to be visited/authenticated against?
I just went to the google maps page. There was still about 20 odd rows in the export file, which surprised me, but they all seemed to be google related.
I logged out of Chrome.
Deleted all cookies
Logged in to Google
Went to Google Maps
Downloaded my cookies
Renamed the file
Copied it to my config
Restarted HA
Still no luck with getting my Google location into HA though
That is basically what I did and it worked fine, but that’s not to say it will every time I restart … I’m not certain google always processes the log in the same.
Apparently you can set a Chrome extension to be allowed in an incognito window.
FWIW, the cookie file I downloaded is about 15 KB (as opposed to only 3 KB for the older, binary format), and has 70 lines. No idea which line(s) is/are necessary, so I just live with it.
EDIT: I just tried downloading the cookies.txt file from an incognito window and got pretty much the same file. Details are a bit different, but about the same size.
I just go directly to the Google Maps site, log in with the account I want to use in HA, click on the cookies.txt icon in the top-right corner, then click on the link in the window that pops up that says “To download cookies for this tab click here”.
Thnaks.
I found out how to enable the extension in incognito mode.
So I did pretty much as you described except I did log on to Google before going to Google Maps.
My cookies file is only 1KB and appears to only have two cookies in it.
Personally I’ve had a heck of a time with this as well.
Currently I have a separate Google account created and share each my own and my wife’s location with this account (worth noting I do NOT have 2FA on this account - and further that this is the account I’ve setup in configuration.yaml)
Not sure incognito mode is a good thing to use here. By definition, doesn’t that prevent the creation of cookies (so nothing useful to save to the file)??? I’m no browser expert, but it just seems that’s not going to get you what you want.