Closed DerekF35 closed 2 years ago
I forgot to mention that when I attempt to Add Integration I get a "Config flow could not be loaded" error as well.
This was reported by the ha-google-home integration also. (https://github.com/leikoilja/ha-google-home/issues/330) . My instance has both installed, however the error on my end if being reported by Google Wifi Integration
Confirmed it is an issue with Google Wifi integration and Google Home integration v1.8.0 both being installed. When Gogole Home integration was downgraded to 1.7.0 the conflict disappeared. The error will be reported for whichever integration is installed second.
Thanks for the debugging, I'll fix it on ha-google-home side.
But better solution will be using glocaltokens in googlewifi-api for fetching local auth tokens. This will help to dedup generated protobuf stubs which may conflict with each other.
I found that it didn't always work even with older version of ha-google-home
.
Protobuf has 2 API implementations depending on the platform: C++ and Python. C++ implementation doesn't allow registering multiple proto files with the same name:
Invalid proto descriptor for file "google/internal/home/foyer/v1.proto":
google/internal/home/foyer/v1.proto: A file with this name is already in the pool.
While Python implementation allows that.
Right now in glocaltokens
that file was renamed to glocaltokens/google/internal/home/foyer/v1.proto
, and it doesn't work with any implementation.
@djtimca I noticed that this integration has quite complex instructions for obtaining refresh token.
Maybe you can use glocaltokens
(actually that will be gpsoauth
) for that? And instead of self._api_token
you can use GLocalAuthenticationTokens.get_access_token()
. It might have different scope than current one, not sure if all endpoints will work with it.
If it works, authorization can be changed to simple login/app_password as we do in ha-google-home.
@KapJI I like that solution - will try to look at it at some point when I have time again.
This should be resolved in the January release
After today's round of fixing, I am attempting to reinstall via HACS but on startup the following error appears in the logs. I've tried removing and reinstalling. Not sure what else to try.