No, you’re awesome, thanks for the screenshot so I could see what’s going on. I was starting to worry there were other things I might be missing, so this is great.
Ironically, about two hours after making everything with the words ‘nest’ or ‘google’ into a log in configuration at debug level, it–randomly started working? No reason. And I still can’t find the script that retrieves and passes hvac_action.
Id like to re-add my thermostat back into HA, but i dont have a creditcard to pay the $5,- fee. Does anyone know if that payment can be done with a Mastercard giftcard or something similar?
I have been trying to add the Nest Integration, and following the official documentation. I am unable to have a successful integration done, and have been trying to debug this since the past 2 days.
I setup my Oath client ID + secret. I also setup the Pub-Sub correctly. The part that fails for me is this, I click on integration and then go through the OAuth consent flow. I eventually get to the point where it should redirect me back to HA external URI. After I click the final “Allow” the tab closes, and I land back to the original tab in HA which keeps saying that this integration needs external config. How should I debug this? I looked into my HA core logs, but I don’t see anything there.
My guess is that the OAuth flow is somehow unable to complete. However, I followed the instructions in the https://developers.google.com/nest/device-access/authorize which should link my account. This part already works. Any clues here would be really helpful, thanks a lot for working on this integration!
The return status code says 200 OK, and the tab closes automatically ( I guess its expected) .However, I don’t see any logs for this call in ha core logs. So I’m not even sure if HA is processing this request (and how come it return 200 OK)?
I will for sure test this when it is merged into the release version. I am not on dev builds as I have too many systems depending on my HA installation. Will revert as soon as I get it installed. Do you know if it will be part of 2021.1.2?
I keep having to reset my auth every 7 days. It seems there is something expiring.
2021-01-14 15:09:22 ERROR (Thread-66) [grpc._plugin_wrapping] AuthMetadataPluginCallback "<google.auth.transport.grpc.AuthMetadataPlugin object at 0x7f86154bd310>" raised exception!
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/grpc/_plugin_wrapping.py", line 77, in __call__
self._metadata_plugin(
File "/usr/local/lib/python3.8/site-packages/google/auth/transport/grpc.py", line 86, in __call__
callback(self._get_authorization_headers(context), None)
File "/usr/local/lib/python3.8/site-packages/google/auth/transport/grpc.py", line 72, in _get_authorization_headers
self._credentials.before_request(
File "/usr/local/lib/python3.8/site-packages/google/auth/credentials.py", line 133, in before_request
self.refresh(request)
File "/usr/local/lib/python3.8/site-packages/google/oauth2/credentials.py", line 200, in refresh
access_token, refresh_token, expiry, grant_response = _client.refresh_grant(
File "/usr/local/lib/python3.8/site-packages/google/oauth2/_client.py", line 248, in refresh_grant
response_data = _token_endpoint_request(request, token_uri, body)
File "/usr/local/lib/python3.8/site-packages/google/oauth2/_client.py", line 124, in _token_endpoint_request
_handle_error_response(response_body)
File "/usr/local/lib/python3.8/site-packages/google/oauth2/_client.py", line 60, in _handle_error_response
raise exceptions.RefreshError(error_details, response_body)
google.auth.exceptions.RefreshError: ('invalid_grant: Token has been expired or revoked.', '{\n "error": "invalid_grant",\n "error_description": "Token has been expired or revoked."\n}')
To do this I have to go into APIs and Services, select OAuth 2.0 Client IDs, navigate to the name of my next integration, click “reset secret” and then update my configuration.yaml with the new value. Once that is complete I remove and re-add the integration. This seems really kludgy but maybe I’m doing something wrong?
Yes. But I don’t see any logs in the ha core logs. I am going to try creating a new app and redo all the steps. Let me see if that helps. Is there a way to add more breakpoints, logs etc in the integration py file? I want to see if certain code paths are even being hit.
https://pastebin.com/xgjfU4y6 This is how my config.yaml looks like. Do I have to enable something else? I don’t see any logs related to oath or nest SDM in ha core logs. The final step does call back to my external URI callback. Any other places I should look for logs?
Would anyone be able to assist with my issue. I had both my thermostats working properly and then about a week or so, my Nest E disappeared. I go into the cloud console to check what devices are in there and it only lists my living room nest.
When I run the URL authorization command, it shows both devices with me granting access to both. I tried restarting the Nest E but no luck.