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

Yes 88.1…
It’s indeed strange, but I need to rule out one by one, since you are not affected…

But I still think that a scene is not an actual device in your case, that’s the only thing left :wink:

Actually a good test would be that you expose a few more switches , do that you have more then 20 devices, excluding scenes… :wink:

And then do a ,“sync my devices”… You even don’t have to unlink and link again to set the error

But then again, I all started happening together with the Google fullfillment issue… I didn’t see it in beginning, since I had already a working link… But I noticed that in my house , several home control items were not accessible by voice, it gave me an error… Only 20 items worked… So that why I try unlinked, and then the fun began :frowning:

it makes no sense that cloud is also affected. Do yu really think there aren’t people with more han 20 devices and can’t sync with google outside HA? I just think it’s possible it’s something with HA that is causing this, specifically 0.88.x

Otherwise people all over would be screaming blue murder… Anything on openhab forums about this?

not that i know, but @Lastof did try also a rollback to older version, same issue
i did not try it yet

ok, going todo one other approach, last test
@Lastof , in first post you mentioned, that there is indeed a difference between the expose by default = false , that gives a different error when you sync/link
i have the same config as yours
the difference i see with @DavidFW1960 is that he is not using that line in his config
so @DavidFW1960 am i right, that if you would have lots of lights, that you need to enter those in your google config and set the as expose: false ? so if you make a new light, you also always need to edit your google config,and make sure its not automaticly added?

of btw @Lastof

if you eventuall can link with 19x devices, in deed you dont see them in the google home app
but evetually then will come, normally its like within 5 secs if you link , now it just takes about 15 hours, there is seems an enormous caching issue, but its getting better and better it seems

After being busy all day yesterday finally managed to find a little more time to experiment over lunch.

Step by step Results:

  • I can link a Ikea hub directly to google with more than 19 devices, so clearly it is at least partly something HA is doing
  • expose_by_default: true (or just leaving expose_by_default out of the config so it defaults to true) works again. I know it did when I first hit the issue friday night, but then didn’t when I tested shortly after posting this topic saturday. I think some time in my testing “exposed_domains:” got uncommented and since it was empty just caused google to be sent an empty list
  • expose_by_default: true, but with my usual config also uncommented doesn’t work and errors as usual
  • expose_by_default: true, my usual config, but with all the "room: " entries commented and it works fine
  • expose_by_default: false, my usual config, but with all the "room: " entries commented doesn’t error, but also doesn’t seem to be linked

So, I think room assignments might have something to do with it. Was hopeful when the expose: false + rooms commented didn’t error, but tried it several times and it never appears in the linked services list.

I’ve saved the json results the edits awarecan gave log and will try looking through them to spot differences between times that are working and not this evening (unfortunately right now I should get back to work).

ok, interesting, so its maybe an HA issue after all? but then again, you did a rollback to older version? that didnt work either?

but anway, so you are saying that this config is the way to go ?

but i think with this config in example above me, every entity is exposed, so for example , if you have like 20 switches, and you want to expose on 5 you need to enter the 15 ones in the google config : but then with the line expose: false

am i correct?
he also has rooms in it, so i dont think thats the issue?

btw , also post your findings on the github issue, so it can be fixed offcourse :slight_smile:

ow yeah!!! back in business, 62 devices exposed!! Huray
i still have the expose by default: false
so just commented out the room:

BANG!

Good Job @Lastof and also thnx @DavidFW1960

gonna report this to github also, can you also post your json logging to that site?
this is indeed something with HA after all

EDIT: now, the only difference i see in the config from @DavidFW1960 , isn that in his room config, everything is in lower case, while our room config starts with a uppercase? maybe thats the culprit?

Will try lowercase based stuff when I get a chance later.

Was waiting till I felt I had something more conclusive (i.e., sure it is related to rooms, rather than just suspecting), but feel free to update the issue yourself if you want.

well, just tried it, no succes :frowning:
commented out 62 x times room:
BANG , succesfull link again

so room: must be indeed the culprit ? not ?

another approach, is maybe to make the rooms already manually in the google home app, so HA doesnt need to make the rooms

but for now , i wait on response on gthub

I still have a config question, so if you expose everything to true as default, then you need to expose: false for every entity you don’t use, right?

So 20 switches, you only want to expose 5, you need to have all 20 entitys configured in Google config with 5 to true and 15 to false, correct?

Had a chance to look through the JSON and do some final testing.

I now have it working with my original config minus the room settings. expose_by_default: false, and just calling out the devices I want.

I’m fairly sure now that the issue occurs if a request to sync a service contains 20 or more devices which specify a roomHint.

Or more simply, if you use room on more than 20 of the entities in your google_assistant: entity_config: section when you first link google assistant (including after unlinking) it’ll fail.

Interestingly resyncing (i.e., by saying “Ok Google, Sync Devices”) actually seems to sync up correctly until you have 21 devices with rooms, not 20.

This seems to be on google’s end, not Home Assistant’s, since HA is just sending JSON that follows the spec.

No idea why occasionally I was also getting the error when it worked. I think that is just a generic error message and maybe something else also caused it unrelated to our problem.

I still have a config question, so if you expose everything to true as default, then you need to expose: false for every entity you don’t use, right?

Yes.

There are three ways to limit what gets show to google:

  1. expose_by_default: false, then manually expose: true each item
  2. specify types of devices in exposed_domains: (i.e., - lights is all lights)
  3. expose_by_default: true, or not stated (defaults to true) then manually expose: false each item you don’t want appearing

expose_by_default: false seems to be working fine for me now. No idea why it was iffy for my sometimes.

thnx for info, thx to you i have it up and running again; well sort off :slight_smile:
there is still a cache issue betweel the google home app and google assistant itself
1 hour ago, when i was testing with the rooms, i stll had 19 devices linked with rooms
so i unlinked succesfull, did sync my devices to make sure the link was really gone
but still those 19 x devices are still visible in home app
then i exposed my normal config, with 62 entities without rooms

in google home app, i still see 19 x devices linked with rooms,but if you go deeper in the settings itself the place where you link, i see my 62 x devices and no rooms there
so if you go to the settings, then actually in background it opens the google app, not the google home app
because in google app, you can also link services, you dont even need the google home app
so there is an issue between home app and google app, nothing we can do …

If anyone comes across this topic with the same issue I’ve posted the update google have sent me in this topic, which I’ll likely keep posting any updates in since it is more active.

TL:DR They know about the issue and it has been assigned to the engineering team.

I have the sam problem, get the “Could not update settings”.
Any suggestions? Thanks

{
 insertId: "xxx"  
 logName: "projects/xxx/logs/actions.googleapis.com%2Factions"  
 receiveTimestamp: "2019-12-01T15:53:38.811670858Z"  
 resource: {…}  
 severity: "ERROR"  
 textPayload: "SYNC: Request ID *** failed with code: BACKEND_FAILURE"  
 timestamp: "2019-12-01T15:53:38.806243279Z"  
}

config:

project_id: !secret ga_project
api_key: !secret api-ga
expose_by_default: false
entity_config:
  light.lounge:
    room: lounge room
    expose: true

the http view log:

2019-12-01 23:49:40 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/providers to 192.168.17.1 (auth: False)
2019-12-01 23:49:40 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow to 192.168.17.1 (auth: False)
2019-12-01 23:49:40 DEBUG (MainThread) [homeassistant.components.http.view] Serving /manifest.json to 192.168.17.1 (auth: False)
2019-12-01 23:49:48 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow/a7cd55da73ce45a39c041df5fb29a351 to 192.168.17.1 (auth: False)
2019-12-01 23:49:53 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/login_flow to 192.168.17.1 (auth: False)
2019-12-01 23:49:53 DEBUG (MainThread) [homeassistant.components.http.view] Serving /manifest.json to 192.168.17.1 (auth: False)
2019-12-01 23:49:54 DEBUG (MainThread) [homeassistant.components.http.view] Serving /auth/token to 108.177.73.19 (auth: False)

Same here.

Has anyone solved this problem? I have exactly the same problem as @cyberdie and @bingooo