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
140 stars 17 forks source link

Thermostat not syncing #100

Closed droopdog7 closed 11 months ago

droopdog7 commented 11 months ago

The thermostat in home is staying at 75 degrees regardless of what the actual thermostat shows. I pasted the error below, which seems to suggest that I went wrong somewhere in the settings (which for me were quite complicated). My Jconfig (with redactions) is below the error.

[15/09/2023, 06:07:24] Homebridge v1.6.1 (HAP v0.11.1) (homebridge-google-nest-sdm) is running on port 41084. [15/09/2023, 06:07:24] [homebridge-google-nest-sdm] 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 (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@google-cloud/pubsub/src/message-stream.ts:289:20) at MessageStream._onStatus (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@google-cloud/pubsub/src/message-stream.ts:330:12) at ClientDuplexStreamImpl. (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@google-cloud/pubsub/src/message-stream.ts:184:38) at Object.onceWrapper (node:events:629:26) at ClientDuplexStreamImpl.emit (node:events:514:28) at Object.onReceiveStatus (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@grpc/grpc-js/src/client.ts:695:16) at Object.onReceiveStatus (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48) at /var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@grpc/grpc-js/src/call-stream.ts:330:24 at processTicksAndRejections (node:internal/process/task_queues:77: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: {} } }

JCONFIG

 {
        "clientId": "285416XXXXX8-jevp448rh7jribjeiq77qaratXXXXXXb6p84.apps.googleusercontent.com",
        "clientSecret": "GOCSPX-Wh4qXXXXXXXXSNToZc730gSZ90Hv",
        "projectId": "6XXXXd53-43af-4a6e-b327-ad0XXXXX92c01",
        "refreshToken": "1//06C0m_ARe_dIxCgXXXXXXAYSNwF-L9Irqfc5WYOxl0XXXXXXX6CHt552IWswoGSn5uOiZPXXXXXX2zOzu-MZcP5PR6_uEaQHeE",
        "subscriptionId": "projects/sdm-prod/topics/enterprise-XXXXX53-43af-4a6e-b327-ad0ff7592c01",
        "fanDuration": 900,
        "platform": "homebridge-google-nest-sdm",
        "_bridge": {
            "username": "0E:2FXXXXXX:FB",
            "port": 41084
        }
    },
marcus-antonius1 commented 11 months ago

I have the same issue. This plugin could definitely use better instructions on how to set it up. Got it working for a minute before this error popped up and now it's not working. About to just delete it and give up on Nest thermostats all together.

droopdog7 commented 11 months ago

I have the same issue. This plugin could definitely use better instructions on how to set it up. Got it working for a minute before this error popped up and now it's not working. About to just delete it and give up on Nest thermostats all together.

Mine seems to resync when I reset the plugin in homebridge, but it doesn't last long; will keep trying to see if i can make it work though

marcus-antonius1 commented 11 months ago

Giving up on this plugin. Just ordered a Starling Home hub and will connect my thermostats through that until I replace nest at some point down the road. Wish there was a required standard everyone could agree on to allow devices to work on other systems.

droopdog7 commented 11 months ago

Giving up on this plugin. Just ordered a Starling Home hub and will connect my thermostats through that until I replace nest at some point down the road. Wish there was a required standard everyone could agree on to allow devices to work on other systems.

Well, I have gone through the procedures over and over again, to the point where I have them memorized almost. Still not working, though I managed to whittle it down to a specific error. About ready to give too, but posting here just in case someone that knows better can assist.

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: Invalid resource name given (name=projects/sdm-prod/topics/enterprise-0xxxxxa5-dd36-4fd6-ac24-fxxxxxxxb3fa). Refer to https://cloud.google.com/pubsub/docs/admin#resource_names for more information. at MessageStream._onEnd (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@google-cloud/pubsub/src/message-stream.ts:289:20) at MessageStream._onStatus (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@google-cloud/pubsub/src/message-stream.ts:330:12) at ClientDuplexStreamImpl. (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@google-cloud/pubsub/src/message-stream.ts:184:38) at Object.onceWrapper (node:events:629:26) at ClientDuplexStreamImpl.emit (node:events:514:28) at Object.onReceiveStatus (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@grpc/grpc-js/src/client.ts:695:16) at Object.onReceiveStatus (/var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@grpc/grpc-js/src/client-interceptors.ts:424:48) at /var/lib/homebridge/node_modules/homebridge-google-nest-sdm/node_modules/@grpc/grpc-js/src/call-stream.ts:330:24 at processTicksAndRejections (node:internal/process/task_queues:77:11) { code: 3, details: 'Invalid resource name given (name=projects/sdm-prod/topics/enterprise-03945ea5-dd36-4fd6-ac24-f9b55b61b3fa). Refer to https://cloud.google.com/pubsub/docs/admin#resource_names for more information.', metadata: Metadata { internalRepr: Map(0) {}, options: {} }

potmat commented 11 months ago

You are using the pub/sub topic name, not the subscription name. As the readme and config screen say, the value should look like:

projects/your-gcp-project-id/subscriptions/your-subscription-id