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

I’m seeing this error happening all the time after I added the Google Assistant component. Everything works, including device sync, but often with a significant delay. Any ideas appreciated.

4 Likes

I’ve just set up my Google Assistant as well & also seeing these errors.
Would like to know where I missed something :frowning:
Thanks
#LMJ

I have the same in my log.
Running a manual setup of google assistant (not nabu casa)
I have not made any changes to my setup lately, but i saw this error right now.

Same with me. Downloaded the json and applied it to my HA config, but I have TONS of 404/500.
Sync works and devices works.

Same problem here:

Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 403
1:31 AM components/google_assistant/http.py (ERROR) - message first occurred at 1:27 AM and shows up 25 times
Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 404
1:27 AM components/google_assistant/http.py (ERROR) - message first occurred at 1:27 AM and shows up 2 times

Google syncs with Home Assistant though and can control Home Assistant devices. But the Home Assistant log is full of these messages…

Note that I do NOT have the HomeGraph API enabled, as I’m using a service account.

My cofiguration.yaml looks like this:

# Google assistant
google_assistant:
  project_id: MyProjectID
  service_account: !include my-service-account-details.json
  report_state: true
1 Like

Ditto I’m seeing a lot of these too
Ha 0.102.1

I’m using hass.io on a Raspberry Pi, version is 0.102.1 and getting this error.
Does anybody know if this is a bug or a configuration problem? Not to mention how to actually solve it :slight_smile:

Same here, Home Assistant 0.102.2 docker image on Ubuntu 18.04.3.
The Google Assistant integration seems to be working, though.

2019-11-29 12:21:55 ERROR (MainThread) [homeassistant.components.google_assistant.http] Request for https://homegraph.googleapis.com/v1/devices:reportStateAndNotification failed: 403

Any chance the devs will read these messages? :slight_smile: I get the feeling that they don’t visit these forums very often, since after days and weeks there’s no reaction from them… Is there a better place to report problems?

1 Like

Some people recommend Discord but I don’t haev an account there.

I think GitHub is probably the best place to put bugs/issues.

I was able to make the error go away by enabling Homegraph API for my project and including api_key: in the google_assistant: section of configuration.yaml. This is in addition to having a valid service_account: configured.
It appears to have had no impact on my Google Assistant integration.
Reminder, instructions are at https://www.home-assistant.io/integrations/google_assistant/#manual-setup

3 Likes

…and this appears to be the currently-open issue: https://github.com/home-assistant/home-assistant/issues/28541

1 Like

Thank you, Walt! I’ve reported my behavior in the GitHub issue, confirming that it behaves just like for others:

  • With HomeGraph API enabled it gives 404 errors
  • With HomeGraph API disabled it gives 403 errors

I faced the same issue and fixed this, within the Google Home App (or Assistant) tiping sync my devices. No error so far and my devices are synced again. I’m using the JSON-Method with service_account.

Thanks for the tip, but can you be a bit more specific? How did you fix it exactly? How did you make the log errors go away?

You only need to open your Google Home App, click on the microphone and say “sync my devices” or type it. That’s it. The error message is gone.
If Google Home / Assistant was working for you before, you don’t need to change anything.

2 Likes

Thank you!

I do not have a microphone icon in the Google Assistant app (using Android version). I can’t type into it either. But I can say “sync my devices” to my Google Home speaker. Does not solve the problem :frowning:

It seems like home assistant is trying to call a google API documented here:

The error messages in the log don’t have the payload, I’m not sure what’s going on:

The documentation says:

404 - Failure: The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible. Typically, this means that we cannot find either the user (agentUserId) or the device. It may also mean that the user has not yet linked with Google, or you didn’t send the agentUserId in the SYNC response.

I’m guessing next step would be to try and enable more logging in the google_assistant component. I’m running HassOS on a Pi, … getting more information about the exact request being sent, and comparing it to published documentation would be much easier for someone running home assistant in a venv on a proper computer, where it’s much easier to just go in and edit the python files.

update: reason I started looking into this because I was trying to figure out how to get temperature sensor information reported by esphome into google home.

I found out some of my temperature sensors were ignored because of missing device_class. (https://github.com/home-assistant/home-assistant/blob/d838a56c1d0b4f04a522fa846f7752a5b58b4004/homeassistant/components/google_assistant/trait.py#L613)

When I added a device_class: “temperature” attribute to my temperature sensor entities using customize_glob, the number of 404s in the logs increased.

This furthers my suspicion that whatever is being reported by google_assistant component is malformed according to Home Graph API.

Some kind of validation tool https://developers.google.com/assistant/smarthome/develop/report-state#test-report-state seems to exist, but I’m not sure if it can help with this.

2 Likes

Error logs in my actions account says

textPayload: “SYNC: Request ID #### failed with code: OPEN_AUTH_FAILURE”