Hi everyone.
I am very interested in a solution for this and have for a while tried to do it myself. Being a nerd but no programmer, i have no clue as to how to continue. I have successfully done all the steps but need a way to combine it into a single script which can be run.
You need 3 (2) tokens in order to make requests.
First you can use this link to get a Python script which can fetch the first authentication key. You need to input google authentication / or create an app with password in order to run this. When you run the script, you will also get a Master token (Long lived) which can be used instead of the google authentication.
This script also fetches an Access Token (short lived) which can be used to get the final get the final Local Authorization Token (Very short lived).
To get the Authorization Token, this command can be run.
./grpcurl -H 'authorization: Bearer ya29.*Access Token*' \
-import-path /home/ollioddi/google/internal/home/foyer/ \
-proto /home/ollioddi/google/internal/home/foyer/v1.proto \
googlehomefoyer-pa.googleapis.com:443 \
google.internal.home.foyer.v1.StructuresService/GetHomeGraph | jq '.home.devices[] | {deviceName, localAuthToken}'
This returns a list of available Google Home devices and their Local Authorization Token in the following format.
{
"deviceName": "Oliver's Mini",
"localAuthToken": "*Token here*"
}
And the last request
curl -H "cast-local-authorization-token: *Authorization Token*" --verbose --insecure https://192.168.1.xxx:8443/setup/assistant/alarms
This will then finally get the data.
{"alarm":[{"fire_time":1.6070628e+12,"id":"alarm/e5f4d82f-1650-4506-8f40-2fbdb56062bf","recurrence":[1,2,3,4,5],"status":1,"time_pattern":{"hour":7,"minute":20,"second":0}}],"timer":[]}
I cannot figure out how to make a single script that passes these values and does the whole loop in order to get the data.
The most important thing to me would to get the simple alarm time. If possible, it would be awesome to get the dates and possible even make a custom card since we can tell what day of the week that the alarm fires.
Hopefully this inspires someone to help. I would gladly test it out.
This was mostly made to show an example of what is necessary and what data it returns. Hope it helps!