home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.91k stars 30.98k forks source link

Request for https://homegraph.googleapis.com/v1/devices:requestSync failed: 400 / Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 400 #124850

Open North117 opened 2 months ago

North117 commented 2 months ago

The problem

Hello everyone, The problem in question occurs when from any Google device (home-mini/nest/nest-audio etc) I give a command to a device present in home assistant and exposed to Google Assistant. (I don't use NABU, I have local integration with NGIX+DUCKDNS). This problem is practically blocking as it does not allow the control of any device unless the Google Home APP does the relink of the HA project. Does anyone have a solution?

What version of Home Assistant Core has the issue?

All

What was the last working version of Home Assistant Core?

2024.8.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Assistant

Link to integration documentation on our website

No response

Diagnostics information

Registratore: homeassistant.components.google_assistant.http Fonte: components/google_assistant/http.py:284 Integrazione: Google Assistant (documentazione, problemi) Prima occorrenza: 26 agosto 2024 alle ore 11:32:44 (462 occorrenze) Ultima registrazione: 11:46:41

Request for https://homegraph.googleapis.com/v1/devices:requestSync failed: 400 Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 400

Example YAML snippet

google_assistant:
  project_id: home-***************
  service_account: !include "********-********.json"
  report_state: true
  exposed_domains:
    - light
    - switch
    - climate
    - sensor
    - scene
    - script
    - boolean

Anything in the logs that might be useful for us?

No response

Additional information

I use Pihole in environment. Trying to turn it off the problem remains.

home-assistant[bot] commented 2 months ago

Hey there @home-assistant/cloud, mind taking a look at this issue as it has been labeled with an integration (google_assistant) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `google_assistant` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign google_assistant` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


google_assistant documentation google_assistant source (message by IssueLinks)

Fremske commented 2 months ago

@North117 I have the same issue, my log is showing.

Logger: homeassistant.components.google_assistant.http Source: components/google_assistant/http.py:284 integration: Google Assistant (documentation, issues) First occurred: 12:37:17 PM (2 occurrences) Last logged: 1:22:29 PM

Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 400 Request for https://homegraph.googleapis.com/v1/devices:requestSync failed: 500

FrostByte2 commented 1 month ago

Hi,

I am experiencing this issue. However, mine is a little different for the error message which is the following.

Logger: homeassistant.components.google_assistant.http Source: components/google_assistant/http.py:284 integration: Google Assistant (documentation, issues) First occurred: 22:12:18 (7 occurrences) Last logged: 22:47:07

Request for https://homegraph.googleapis.com/v1/devices:requestSync failed: 500 Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 404

I have fully removed the SDK and added all the credentials back and I can use the SDK to control my devices on the home assistant instance like broadcast but when it comes to controlling my devices in the google home app by adding the action they all just show offline.

I have tried to relink the account on the home app and it just logs in without issue and goes back to home app where it says that there was a issue connecting to test try again later. So I was wondering if there is a issue with the api or if there is anything I need to do differently. I did find under the google actions under authorisation URL this is set to my home assistant URL with /auth/authorize but when i navigate to that instead of getting a error 405 I get a Invalid redirect URI and was wondering if this can be causing the issue.

If any assistance can be added for this that would be great.

FrostByte2 commented 1 month ago

I would check if you are having these issues if you use Cloudflare tunnels or a Cloudflare fomain the bot fight as this appears to have been changed to be on by default. Since disabling this and going back to IP rules under WAF this is all working again.

Selmaks commented 1 month ago

I would check if you are having these issues if you use Cloudflare tunnels or a Cloudflare fomain the bot fight as this appears to have been changed to be on by default. Since disabling this and going back to IP rules under WAF this is all working again.

Thank You! After spending a few hours trouble shooting why it had stopped working I found you post and sure enough it was that. Can you tell me what ip rules are you using to allow google in waf please ?

HandyHat commented 1 week ago

Can you tell me what ip rules are you using to allow google in waf please ?

See: https://github.com/home-assistant/core/issues/127520