It like every second request to homeassistant API is throwing empty or error response. I even tried to keep one light only in my configuration for GA - still same 50% error rate on Google side - nothing helps. This is super suspicious.
I run HA core as separate container, and it is updated to latest version every week, now it is 0.108.3. I do not really think that rebuilding HA would help, but I might try this as well - since it helped you @Milster
As part of my last HA install (as it breaks completely every 4-6mths) I imported only the config;
I unlinked+relinked - and everything previous to that;
I Recreated project on GCP and Actions - and everything previous to that.
No luck whatsoever. Next time I get to reinstall I will do it from scratch including confs.
Till then will have to live with 50% errors and a huge error log.
Any news are appreciated, otherwise count me on the list of complains…
Actually, I finally got time to deep a little more into this issue.
I was able to find the problem with 50% of errors in GraphAPI. For some unknown reason I had two accounts in .storage/google_assistant file. One of the account is mine ID from HA, the other account was causing the errors all the time during the request, since routine was reporting states for each of these accounts.
So solution is either modify the file, or delete it and reling your account. 50% of errors are gone.
I still have other problem with Google Actions not reaching my HA api. But that is different story - a lot of “failed with code: BACKEND_FAILURE” in StackDriver logger. Hopefully I will be able to solve this too.
That could have been the case for me. As I reinstalled from scratch the problem was gone. I guess the file you mentioned came with the config restore I did previous. Thanks.
I had this error too. Upon checking i realized that my service account was created under a different project. So i deleted the service account key and created another one under the home assistant project. Replaced the file in config.yaml. unlinked and relinked test app. Enabled homegraph api again. No more errors.
Finally got rid of them! I had this issue too. Did my setup following the instructions about a couple of weeks ago (so that means I used a service account). I got thousands of Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 404 as well as 403’s each day in my log. Enabling HomeGraph API in Google Cloud Console got rid of the 403’s, but the 404’s remained. In Cloud Console I could see that it had done 130.000 requests in the past week, almost exactly 50% of which were failed.
Now this evening, I tried to set report_state: false in my google_assistant config. No more errors! Tried to open the lights screen on a Nest Hub an turning the lights off using a Zigbee switch, and after around 3 seconds the state updated on the Nest Hub. I then disabled HomeGraph API in Cloud Console and restarted Home Assistant; still no errors and still working. Sweet!
Well, that’s not really a fix then is it? You simply disable the report state (which is why the API is needed in the first place). Obviously the errors won’t show up after that, since there is no call anymore.
Just found out you need to pay attention to the error code
error 404 is indeed fixed with a resync
error 400 indicates an access problem with the private key in the Json file. Stangely enough I could sync devices but after regenerating this file the error was gone
I was battling with the problem for days, here is a better explanation of the solution:
I was investigating this issue few weeks ago, since it bothered me too. I have already replied on some other thread my findings and solution:
Most probably you have (or had) multiple accounts in you Home Assistant, and one of the accounts IDs is not linked to Google Assistant project on Action, that is why such close to 50% error rate (one of two accounts is not linked, so API throws error every second call). Two ways to fix it:
Modify your .storage/google_assistant file, by removing all lines which are not your HA account ID (you can find it in UI, Configuration -> Users -> each user has its own ID of 33 characters length)
Just unlink you [test]app in google home app; delete .storage/google_assistant , restart HA, and then re-link it again. New proper .storage/google_assistant will be generated.
Good luck.
have you been able to solve it ?
i have the test app in the list, when i click i get auth screens from HA, i enter user pass and 2FA, and nothing happens.
in logs i see 404s of homegraph.googleapis.com/v1…
I have exactly the same problem. I try to remove integration from google home, but now I can’t add it again. I enter user and pass and nothing happens.
Maybe someone find solution?