potmat / homebridge-google-nest-sdm

A Homebridge plugin for Google Nest devices that uses the Google Smart Device Management API. Supports Cameras, Doorbells, Displays, and Thermostats. Includes support for HomeKit Secure Video.
ISC License
134 stars 15 forks source link

Go back and do this if you missed the "IMPORTANT DIFFERENCE" step #127

Open joethemonk opened 6 months ago

joethemonk commented 6 months ago

I just finished setting this up for my Nest thermostat, and it works! I can control my Nest thermostat through Apple's Home app, and read the state from it as well. Big thank you @potmat for providing this to us.

I'm using this plugin on Hoobs, running on my Mac Mini, because POTMAT ACTUALLY KEEPS IT UPDATED, unlike every other nest thermostat plugin. Most recent update was under 2mo ago at the time of this writing (12/24/23). The next most recent is from 18mo ago!

AGAIN THANK YOU POTMAT! You're a god damn hero!

I did not find this easy to set up. Potmat has very good instructions. Follow them. Especially his "ONE IMPORTANT DIFFERENCE" point. I'm not familiar with all the Google API / Nest stuff it took me through in the instructions, but Google has a good guide and potmat's explicit instructions worked.

IF YOU MISSED THE "ONE IMPORTANT DIFFERENCE", THIS IS WHAT YOU NEED TO REDO: I didn't get the "one important difference" step when I first set this up, and I got a "scopes" error in the Hoobs detailed debug logging. There was so much complexity in Google's setup that I missed that particular URL potmat says to use instead of the one they give you. It happens in the midst of all these other long inscrutable URLs google gives you in its setup process. So I had to go back over the steps from that point potmat points to, up until I got the new refresh token, and then I replaced the refresh token I'd had and it worked.

To make the error message searchable in case anyone looks for it: 12/24/2023, 10:38:14 AM Google Nest Sdm Bridge homebridge-google-nest-sdm ERROR Plugin initialization failed, there was a failure with event subscription. Did you read the readme: https://github.com/potmat/homebridge-google-nest-sdm#where-do-the-config-values-come-from StatusError: **Request had insufficient authentication scopes**. at MessageStream._onEnd (/private/var/lib/hoobs/googlenestsdmbridge/node_modules/@google-cloud/pubsub/src/message-stream.ts:289:20) at MessageStream._onStatus (/private/var/lib/hoobs/googlenestsdmbridge/node_modules/@google-cloud/pubsub/src/message-stream.ts:330:12) at ClientDuplexStreamImpl.<anonymous> (/private/var/lib/hoobs/googlenestsdmbridge/node_modules/@google-cloud/pubsub/src/message-stream.ts:184:38) at Object.onceWrapper (node:events:640:26) at ClientDuplexStreamImpl.emit (node:events:520:28) at Object.onReceiveStatus (/private/var/lib/hoobs/googlenestsdmbridge/node_modules/@grpc/grpc-js/src/client.ts:695:16) at Object.onReceiveStatus (/private/var/lib/hoobs/googlenestsdmbridge/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48) at /private/var/lib/hoobs/googlenestsdmbridge/node_modules/@grpc/grpc-js/src/call-stream.ts:330:24 at processTicksAndRejections (node: internal/process/task_queues:78:11) { code: 7, details: 'Request had insufficient authentication scopes.', metadata: Metadata { internalRepr: Map(3) { 'google.rpc.errorinfo-bin' => [Array], 'grpc-status-details-bin' => [Array], 'www-authenticate' => [Array] }, options: {} } }

Screenshot 2023-12-24 at 12 04 16 PM