Google Assistant: "Could not update settings" / "/api/error_log served" if more than a certain number of my devices are set to be sent

So, weird problem. Wanted to make a couple of changes to which devices I sync up to google assistant, so in Google’s Home App unlinked and then tried to relink, and received an error in the google home app:

Could not update settings. Check your connection.

After poking around I’ve hit a dead end, hoping someone knows which errors I should set to be logged/what might be happing. It is not the issue some others seem to be having with creating a test project with google, my test project is up and working, something is failing on the HA side under certain circumstances.

I have google assistant set to “expose_by_default: false”, and then am manually calling out all the lights/switches/etc I want.

If I set “expose_by_default: true”, and remove all my config, it links fine. I was wrong about that… seemed to be true last night, but definitely isn’t now

If I comment out everything below a certain point in the file, it also works fine. I’ve tried commenting out some of the devices above that point, and uncommenting ones below, and it still bugs out. So I think it is some issue with all the devices below that point, rather than an issue with more than a particular number of devices.

Looking at the logs, google’s cloud console log shows me an error with:

{
 insertId:  "<censored>"  
 logName:  "projects/<censored>/logs/actions.googleapis.com%2Factions"  
 receiveTimestamp:  "2019-02-23T10:27:05.831684475Z"  
 resource: {
  labels: {
   action_id:  "SMART_HOME_SYNC"    
   project_id:  "<censored>"    
   version_id:  ""    
  }
  type:  "assistant_action"   
 }
 severity:  "ERROR"  
 textPayload:  "SYNC: Request ID 6550998062884482937 update devices failed: INTERNAL"  
 timestamp:  "2019-02-23T10:27:05.823546174Z"  
}

Bumping up the log levels in HA I managed to get these seemingly related entries:

2019-02-23 10:26:57 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow/87f517e53d6e4425b16b59c9b192d6ff to 172.30.33.3 (auth: False)
2019-02-23 10:26:58 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/token to 172.30.33.3 (auth: False)
2019-02-23 10:26:59 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow to 172.30.33.3 (auth: False)
2019-02-23 10:26:59 INFO (MainThread) [homeassistant.components.http.view] Serving /manifest.json to 172.30.33.3 (auth: False)
2019-02-23 10:27:00 INFO (MainThread) [homeassistant.components.http.view] Serving /api/google_assistant to 172.30.33.3 (auth: True)
2019-02-23 10:27:12 INFO (MainThread) [homeassistant.components.http.view] Serving /api/error_log to 172.30.33.3 (auth: True)

Couldn’t see anything else useful at debug level, but might have been lost in the endless noise from every other component.

This is the working config file: google_assistant.yaml (5.1 KB)
Uncommenting anything below light.living_room_wifename causes it to fail (or at least the 6 or 7 random ones I tried before getting bored).

Currently have homeassistant.components.google_assistant and homeassistant.components.http.view as log level debug in logger.

Any suggestions on what it might be, or what components I should be looking at for errors on to explain what is happening, would be much appreciated.

As a small update to this, seems I was wrong about removing the entity_config: stuff and just setting expose_by_default: true allowing all the devices to appear. It worked last night, but doesn’t now.

Does seem to throw slightly different errors though. No serving /api/google_assistant, instead:

019-02-23 19:59:19 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/authorize to 172.30.33.3 (auth: False)
2019-02-23 19:59:19 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/providers to 172.30.33.3 (auth: False)
2019-02-23 19:59:20 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow to 172.30.33.3 (auth: False)
2019-02-23 19:59:20 INFO (MainThread) [homeassistant.components.http.view] Serving /manifest.json to 172.30.33.3 (auth: False)
2019-02-23 19:59:26 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow/65fceb2fc0a34f10be41e139b8caf058 to 172.30.33.3 (auth: False)
2019-02-23 19:59:27 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/token to 172.30.33.3 (auth: False)
2019-02-23 19:59:28 INFO (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow to 172.30.33.3 (auth: False)
2019-02-23 19:59:28 INFO (MainThread) [homeassistant.components.http.view] Serving /manifest.json to 172.30.33.3 (auth: False)
2019-02-23 19:59:32 INFO (MainThread) [homeassistant.components.http.view] Serving /api/error_log to 172.30.33.3 (auth: True)

and at google’s logs

{
 insertId:  "<censored>"  
 logName:  "projects/<censored>/logs/actions.googleapis.com%2Factions"  
 receiveTimestamp:  "2019-02-23T19:59:29.610768541Z"  
 resource: {
  labels: {
   action_id:  "SMART_HOME_SYNC"    
   project_id:  "<censored>"    
   version_id:  ""    
  }
  type:  "assistant_action"   
 }
 severity:  "ERROR"  
 textPayload:  "SYNC: Request ID 15369187875003283142 failed with code: BACKEND_FAILURE"  
 timestamp:  "2019-02-23T19:59:29.584882381Z"  
}

So seems to be dying a little earlier. Guess it could be a different issue and I managed to change something in the config while bug hunting that I don’t remember.

No further ideas what might be up though. Everything was fine when I updated things a week ago, but now not. Might roll back to 0.87 to check if this is actually an issue somewhere in 0.88.

well, actually i have the same issue
i unlinked and linked again, and also have the “check the connection” issue
i have unlink and linked so many times without any issues, dont know whats wrong :frowning:

so if you uncomment those entities , it fails, if you comment them then you dont have the “check your connection error?”

omfg!! thats it, i also commented lots of entities, and now i can sync!! and link again? defintely somthing wrong, seems there some kind of limit on entities now??
what i did, i removed a lot of entities, then i was able to link, then uncommented them , and did “sync my devices”, but then it gave me a synching error

there is something wrong here, or its with 88 release or google changed something

1 Like

Well, glad to know I’m not the only one.

The fact that Home Assistant logs

2019-02-23 10:27:00 INFO (MainThread) [homeassistant.components.http.view] Serving /api/google_assistant to 172.30.33.3 (auth: True)
2019-02-23 10:27:12 INFO (MainThread) [homeassistant.components.http.view] Serving /api/error_log to 172.30.33.3 (auth: True)

And google has a log that it recieved of “update devices failed: INTERNAL” makes me suspect that it is Home Assistant failing somewhere while feeding the devices to google, rather than google’s end.

verry strange, was testing and testing severalhours, even created a new project…
untill i saw your post
i hope some can fix it fast, what do you think the limit of devices are? maybe i should finally step over to HA cloud now

When I posted earlier, 19 devices worked. Tested a bit more just now, and can’t get those 19 all in… But can with 1. So who knows. I don’t think its a limit on devices, but something else that some devices have in common that is causing a error somewhere that doesn’t call it out. Who knows what though.

there is indeed a limit, i am now deleting some entities, if i do a “sync my devices” after a restart, if i have no error then, then i am good, or maybe i can figure out what the corrupt entity is… although, i dont think there is not a corrupt one…

i am now trying the HA Cloud, same issue on linking
but i see everything is exposed as default ;, this line doesnt work on the cloud edition : expose: true
so i am not sure how i need to exclude entities in cloud to test and limit the entities

but anyway, my first test on HA cloud when eveything is exposed, also gives an linking error
so now trying to exlude stuff, but lots of work

ok, exposed all domains, except 1 in HA cloud, this was my cover: domain, it only had a few entites, now HA cloud links fine!!!

so, what do we now? not an issue in google assistan component? but related to 88.x? or google?

I’ve tried downgrading to 0.87.1, and am getting the same issues then. So not 0.88. I also restored a hassos snapshot from January 29th with 0.86.3 and had the same issue there, and I know I relinked it since then because I added a couple of new devices a week ago, so I think that rules out any local data corruption.

If you are getting it with cloud, and I am with older version, then I guess it must be google’s end. Either they broke something, or changed something that HA is using. sigh

ok, verry frustating , i noticed this day earlier, when a specific light didnt work anymore, while the rest was working fine, … google home gave me always an error when i turned the light on off … even from the home app itself
so thats why i unlinked and tried linking again

i wonder if it has something todo with this google issue, there is an issue, that you cant enable testing anymore in the simulator, so you need todo it with a console now

maybe google is changing something

created an issue here : https://github.com/home-assistant/home-assistant/issues/21373

ok, testing with HA cloud, wanted to go that way anyway, seems limit is indeed about 20 entities, one more, and BAM sync issues, doesnt mather the domain

After more testing I agree with your findings.

19 entities, no matter what they are, it works. 20 and it doesn’t.

Weirdly, sometimes when it has worked it gives me the error anyway, but if I swipe down to refresh it shows [test]Home Assistant as a linked service, or if I ask google assistant to do something. But only if less than 20 items are added. More than 20 is actually not working, not just the error appearing when it worked. Explains why it didn’t seem to be a number limit when I first hit the problem last night if sometimes it gave me an error even when it worked.

Also noticed that right now nothing linked from HA is actually showing in my “Home” app’s rooms. Google Assistant can use them, and knows which rooms they are in, but their app doesn’t seem to be showing them.

yes, indeed same issue, here, they are not in the “home” anymore
i tried deleting the home , doesnt work either

serious issues it seems

i have now 19 devices in HA Cloud, and 19 devices in HA Local, so back up to 38 devices :slight_smile:
had to drop a few though

I’ve managed to cut down to 19 devices I absolutely need (all of which are lights), just a little less granular control, and no voice control over automations/access to the temp sensors I have around the place, etc. But the family likely won’t notice now.

Guess I might think about which of the 30ish remaining ones might be worth doing via HA Cloud at least until google sorts their stuff out (or someone spots what they’ve changed in the spec that HA isn’t doing right).

well, for me at the moment, i dont see them anymore in the home app, but they are linked
but cant control them anymore either ;(

@Lastof are you using aliases? Yes, maybe that’s the issue, in the other thread, @DavidFW1960 is only one that is able to sync with more then 20 devices